Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[USING, DON'T MERGE THO] Enable Lexical-style parsing #1

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
cf619fd
Set up tests
zswaff Mar 21, 2024
e606efe
Improve comments
zswaff Mar 21, 2024
4b1b72f
Update tests
zswaff Mar 27, 2024
d5785dc
Start implementing rust version and add JS version for reference
zswaff Apr 4, 2024
9441f3d
Set up python binding for direct function
zswaff May 6, 2024
bec43ee
Added parse_nested_xml_text_nodes test
ahonko May 21, 2024
59379af
Clean up
ahonko May 21, 2024
022f618
Removed playground.ts
ahonko May 22, 2024
c1623a9
Clean up lexical parsing XML text nodes
ahonko May 22, 2024
cc486a1
Clean up tests
ahonko May 22, 2024
c3582f6
Reverted non related changes in tests
ahonko May 22, 2024
0f64aeb
Moved parse_nested_xml_text_nodes test to y_doc module
ahonko May 22, 2024
ef62cbd
Polish
zswaff May 22, 2024
08bd33b
Tweak version to fix issues with pip resolution
zswaff May 22, 2024
fdbb622
Added more tests
ahonko May 24, 2024
bf079d5
Refactored, removed rust tests
ahonko May 25, 2024
6ce5e4d
Clean up
ahonko May 25, 2024
7bd93d4
Cleanup test
zswaff May 25, 2024
f2903d9
ypy reverse direction
ahonko May 31, 2024
54a944f
Tweak comments
zswaff May 31, 2024
7f93c38
Tweak again
zswaff May 31, 2024
ae613ba
Merge pull request #2 from its-dart/ahonko/DA-54-ypy-reverse-direction
zswaff May 31, 2024
d8d5aa8
ypy enable ints and nulls
ahonko Jun 4, 2024
712cb3a
Merge pull request #3 from its-dart/ahonko/DA-148-ypy-enable-ints-and…
zswaff Jun 4, 2024
c61b1c7
Update version in Cargo.toml
zswaff Jun 4, 2024
8a4c454
ypy use XmlText rather than XmlElement for tree
ahonko Jun 10, 2024
f9d0507
Clean up
ahonko Jun 10, 2024
627e0ef
Clean up
ahonko Jun 10, 2024
f8359b2
Merge pull request #4 from its-dart/ahonko/DA-159-ypy-use-XmlText-rat…
zswaff Jun 10, 2024
f9732ab
Update Cargo.toml
zswaff Jun 10, 2024
c6e6f17
Revert BigInt stuff
zswaff Jun 10, 2024
93f432e
Simplify version
zswaff Jun 10, 2024
b9c796a
Merge pull request #5 from its-dart/zack/revert-bigint
zswaff Jun 10, 2024
c1accaf
Set up library workflow
zswaff Jul 16, 2024
ffa6bad
Update Cargo.toml
ahonko Jul 16, 2024
fcbd331
Install correct lib for testing
zswaff Jul 16, 2024
8b09e9a
Keep improving wheel build process
zswaff Jul 16, 2024
b1ec2a0
Bump version
zswaff Jul 16, 2024
3e21db2
Comment out macos tests
zswaff Jul 16, 2024
0161dbd
Remove all mac tests
zswaff Jul 16, 2024
c4519c7
Rename package
zswaff Jul 16, 2024
496a023
Bump version to get new y-crdt
zswaff Jul 17, 2024
d2b3a37
Revert package rename
zswaff Jul 17, 2024
a34b648
Bump pyo3 version
zswaff Jul 19, 2024
d519732
Bump pyo3 version
zswaff Jul 19, 2024
8002cea
Fix version
zswaff Jul 19, 2024
6720b0c
Create test
zswaff Jul 19, 2024
a2ecb74
Added parsing Element and Fragment XML nodes while processing Text node
ahonko Jul 19, 2024
8ec52e9
Fixed tests
ahonko Jul 19, 2024
52b1afc
Merge pull request #6 from its-dart/zack/parse-nested-elements
zswaff Jul 20, 2024
de73c6b
Bump version
zswaff Jul 20, 2024
e9d95e6
Attempt to enable pushing xml elements
zswaff Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,10 @@ jobs:
with:
target: x86_64
args: --release --out dist --sdist -i 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9
- name: Test built wheel - x86_64
run: |
pip install y-py --no-index --find-links dist --force-reinstall
pip install pytest
pytest
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist -i 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9
- name: Test built wheel - universal2
run: |
pip install y-py --no-index --find-links dist --force-reinstall
pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -70,7 +61,7 @@ jobs:
args: --release --out dist -i ${{ matrix.platform.interpreter }}
- name: Test built wheel
run: |
pip install y-py --no-index --find-links dist --force-reinstall
pip install y-py-dart --no-index --find-links dist --force-reinstall
pip install pytest
pytest
- name: Upload wheels
Expand Down Expand Up @@ -100,7 +91,7 @@ jobs:
- name: Test built wheel
if: matrix.target == 'x86_64'
run: |
pip install y-py --no-index --find-links dist --force-reinstall
pip install y-py-dart --no-index --find-links dist --force-reinstall
pip install pytest
pytest
- name: Upload wheels
Expand Down Expand Up @@ -139,7 +130,7 @@ jobs:
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
run: |
pip3 install y-py --no-index --find-links dist/ --force-reinstall
pip3 install y-py-dart --no-index --find-links dist/ --force-reinstall
pytest

- name: Upload wheels
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Cargo.lock
docs/_*
.DS_Store
*.pyc
dist
dist
.venv
15 changes: 12 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "y-py"
version = "0.7.0-alpha.1"
version = "0.6.3-alpha.12"
rust-version = "1.72"
edition = "2021"

Expand All @@ -12,8 +12,17 @@ crate-type = ["cdylib"]

[dependencies]
lib0 = "0.16.10"
yrs = "0.16.10"
yrs = { git = "https://github.com/its-dart/y-crdt.git", branch = "v0.16.10" }

[dev-dependencies]
assert-json-diff = "2.0.2"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = { version = "1.0.79", features = ["unbounded_depth"] }

[dependencies.pyo3]
version = "0.19.2"
version = "0.21.0"
# Make the extension-module feature optional and default.
# See https://pyo3.rs/v0.21.2/faq.html#i-cant-run-cargo-test-or-i-cant-build-in-a-cargo-workspace-im-having-linker-issues-like-symbol-not-found-or-undefined-reference-to-_pyexc_systemerror for more details
# extension-module = ["pyo3/extension-module"]
# default = ["extension-module"]
features = ["extension-module"]
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["maturin>=1.2.3,<2"]
build-backend = "maturin"

[project]
name = "y-py"
name = "y-py-dart"
description = "Python bindings for the Y-CRDT built from yrs (Rust)"
license = { file = "LICENSE" }
authors = [
Expand All @@ -30,10 +30,10 @@ classifiers = [
]

[project.urls]
Homepage = "https://github.com/y-crdt/ypy"
Source = "https://github.com/y-crdt/ypy"
Issues = "https://github.com/y-crdt/ypy/issues"
Pypi = "https://pypi.org/project/y-py"
Homepage = "https://github.com/its-dart/ypy"
Source = "https://github.com/its-dart/ypy"
Issues = "https://github.com/its-dart/ypy/issues"
Pypi = "https://pypi.org/project/y-py-dart"

[tool.hatch.envs.test]
dependencies = ["pytest", "maturin"]
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![recursion_limit = "512"]

use pyo3::prelude::*;
use pyo3::wrap_pyfunction;
mod json_builder;
Expand Down
Loading
Loading