jsonatapy 2.2.11__tar.gz → 2.2.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.gitignore +5 -4
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/.gitignore +1 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/conventions.md +2 -2
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/core.md +4 -4
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/suggested_commands.md +1 -1
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/task_completion.md +2 -2
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/tech_stack.md +2 -2
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/CHANGELOG.md +573 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/Cargo.lock +127 -101
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/Cargo.toml +5 -4
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/PKG-INFO +8 -8
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/README.md +4 -4
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/benches/evaluator_bench.rs +1 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/bindings/c/README.md +1 -1
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/pyproject.toml +8 -5
- jsonatapy-2.2.13/src/allocator.rs +134 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/ast.rs +159 -18
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/ast_transform.rs +415 -210
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/builtins.rs +106 -150
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/capi.rs +1 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/compiler.rs +38 -21
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/evaluator.rs +5920 -4150
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/functions.rs +349 -154
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/lazy.rs +101 -18
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/lib.rs +35 -7
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/parser.rs +980 -244
- jsonatapy-2.2.13/src/pystack.rs +175 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/signature.rs +64 -5
- jsonatapy-2.2.13/src/value.rs +1835 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/vm.rs +130 -62
- jsonatapy-2.2.13/tests/array_flags_test.rs +151 -0
- jsonatapy-2.2.13/tests/common/mod.rs +15 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/datetime_picture_suite.rs +1 -1
- jsonatapy-2.2.13/tests/deep_value_drop_test.rs +178 -0
- jsonatapy-2.2.13/tests/evaluator_reuse_test.rs +125 -0
- jsonatapy-2.2.13/tests/fixtures/array_flags_differential.json +1919 -0
- jsonatapy-2.2.13/tests/fixtures/builtin_arity.json +1 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/fixtures/builtin_differential.json +1 -1
- jsonatapy-2.2.13/tests/fixtures/path_semantics_combinations.json +2790 -0
- jsonatapy-2.2.13/tests/fixtures/path_semantics_combinations_known.json +4 -0
- jsonatapy-2.2.13/tests/fixtures/path_semantics_differential.json +15704 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/host_functions_test.rs +64 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/integration_test.rs +1635 -94
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/lambda_closure_suite.rs +376 -11
- jsonatapy-2.2.13/tests/path_semantics_test.rs +277 -0
- jsonatapy-2.2.13/tests/step_cache_test.rs +158 -0
- jsonatapy-2.2.11/.serena/project.yml +0 -160
- jsonatapy-2.2.11/src/value.rs +0 -941
- jsonatapy-2.2.11/tests/fixtures/builtin_arity.json +0 -1
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.gitmodules +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/architecture.md +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/.serena/memories/memory_maintenance.md +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/CONTRIBUTORS.md +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/LICENSE +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/SECURITY.md +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/bindings/c/examples/smoke.c +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/bindings/c/jsonata.h +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/examples/evaluator_demo.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/examples/host_functions.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/examples/parser_demo.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/examples/simd_json_bench.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/__init__.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/__main__.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/_cli/__init__.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/_cli/bindings.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/_cli/error_format.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/_cli/mcp_server.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/_cli/resolve.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/_cli/run.py +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/python/jsonatapy/py.typed +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/bin/jsonata/bindings.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/bin/jsonata/error_format.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/bin/jsonata/main.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/bin/jsonata/resolve.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/datetime.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/src/expression.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/study/cli_fixtures.json +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/study/cli_fixtures_testdata.json +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/study/cli_spec.md +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/cli_fixtures_test.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/cli_test.rs +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/fixtures/builtin_signatures.json +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/fixtures/fastpath_differential.json +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/fixtures/fastpath_known_divergences.json +0 -0
- {jsonatapy-2.2.11 → jsonatapy-2.2.13}/tests/parent_and_focus_binding_suite.rs +0 -0
|
@@ -63,10 +63,11 @@ benchmarks/javascript/package-lock.json
|
|
|
63
63
|
# Test artifacts
|
|
64
64
|
# tests/jsonata-js/ - Now a git submodule, don't ignore
|
|
65
65
|
|
|
66
|
-
# Claude Code local
|
|
67
|
-
# not meant to be shared across the team)
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
# Claude Code local state (personal per-developer permissions/config, worktrees
|
|
67
|
+
# and lock files, not meant to be shared across the team). Nothing under here is
|
|
68
|
+
# tracked; the previous two-line form left stray lock files showing up as
|
|
69
|
+
# untracked on every `git status`.
|
|
70
|
+
.claude/
|
|
70
71
|
|
|
71
72
|
# Temporary files
|
|
72
73
|
*.tmp
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
non-negotiable), `Result<T, E>` for fallible ops, rustdoc `///` on public APIs, comments should
|
|
24
24
|
explain *deviations from JS behavior*, not restate what code does.
|
|
25
25
|
- **Python style**: PEP 8 via ruff, type hints required on public APIs (mypy strict), ruff
|
|
26
|
-
double-quote/100-col formatting — no black despite CLAUDE.
|
|
26
|
+
double-quote/100-col formatting — no black despite CLAUDE.md mentioning it (ruff format is
|
|
27
27
|
what's actually configured in pyproject.toml).
|
|
28
28
|
- **Test-driven against the JS suite**: the JSONata-js reference suite
|
|
29
29
|
(`tests/python/test_reference_suite.py` over the `tests/jsonata-js` submodule) is the
|
|
30
30
|
compatibility oracle. Any evaluator/compiler change should be checked against the FULL
|
|
31
|
-
|
|
31
|
+
1686-case suite, not just a hand-picked subset — subtle regressions have historically hidden
|
|
32
32
|
in low-frequency edge cases (e.g. lambda id aliasing at ~0.5% call frequency).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## jsonatapy: source map
|
|
2
2
|
|
|
3
3
|
Rust-based Python extension implementing JSONata (JSON query/transform language), targeting
|
|
4
|
-
100% compatibility with the reference `jsonata-js` v2.
|
|
4
|
+
near-100% compatibility with the reference `jsonata-js` v2.2.2 test suite (1686/1686 passing).
|
|
5
5
|
Two published artifacts from one codebase: `jsonata-core` (crates.io, pure Rust) and
|
|
6
|
-
`jsonatapy` (PyPI, PyO3 wrapper). See root `CLAUDE.
|
|
7
|
-
this memory only covers what CLAUDE.
|
|
6
|
+
`jsonatapy` (PyPI, PyO3 wrapper). See root `CLAUDE.md` for full project charter/design goals —
|
|
7
|
+
this memory only covers what CLAUDE.md omits or what changes faster than that doc.
|
|
8
8
|
|
|
9
9
|
### Layout
|
|
10
10
|
- `src/` — Rust crate (`jsonata-core`). Core files: `ast.rs`, `parser.rs` (+ `src/parser/README.md`),
|
|
@@ -14,7 +14,7 @@ this memory only covers what CLAUDE.MD omits or what changes faster than that do
|
|
|
14
14
|
`signature.rs`, `lib.rs` (PyO3 Python boundary).
|
|
15
15
|
- `python/jsonatapy/` — thin Python package; `__init__.py` re-exports the compiled `_jsonatapy`
|
|
16
16
|
extension module and adds optional orjson-backed `json_dumps`/`json_loads`.
|
|
17
|
-
- `tests/jsonata-js/` — git submodule, the upstream JS reference suite (source of the
|
|
17
|
+
- `tests/jsonata-js/` — git submodule, the upstream JS reference suite (source of the 1686 cases).
|
|
18
18
|
- `tests/python/test_reference_suite.py` — runs the submodule's cases against the compiled extension.
|
|
19
19
|
- `tests/integration_test.rs` — Rust-side integration tests (separate from inline `#[cfg(test)]`).
|
|
20
20
|
- `benchmarks/` — cross-language perf comparisons (Python/JS/Rust) driving the "faster than JS" claim.
|
|
@@ -10,7 +10,7 @@ maturin build --release # produce a wheel in dist/
|
|
|
10
10
|
### Test
|
|
11
11
|
```bash
|
|
12
12
|
cargo test # Rust unit + tests/integration_test.rs
|
|
13
|
-
uv run pytest tests/python/test_reference_suite.py #
|
|
13
|
+
uv run pytest tests/python/test_reference_suite.py # 1686 JSONata-js reference cases (primary compat gate; 1686 pass)
|
|
14
14
|
uv run pytest tests/python/ -v # full Python suite
|
|
15
15
|
uv run pytest tests/python/test_functions.py::test_string_functions -v # single test
|
|
16
16
|
```
|
|
@@ -8,7 +8,7 @@ cargo fmt --check # or `cargo fmt` to auto-fix, then verify
|
|
|
8
8
|
cargo clippy -- -D warnings
|
|
9
9
|
cargo test
|
|
10
10
|
maturin develop --release # rebuild extension so Python tests exercise the new Rust code
|
|
11
|
-
uv run pytest tests/python/test_reference_suite.py # full
|
|
11
|
+
uv run pytest tests/python/test_reference_suite.py # full 1686-case JS compat suite (1686 pass)
|
|
12
12
|
uv run pytest tests/python/ -v # rest of the Python suite
|
|
13
13
|
uv run ruff check python/ tests/
|
|
14
14
|
uv run mypy python/
|
|
@@ -20,4 +20,4 @@ fast path is bypassed (forcing the tree-walker) — see `mem:architecture` for h
|
|
|
20
20
|
verified this dual-path parity.
|
|
21
21
|
|
|
22
22
|
If the change is user-facing (new function, new signature, changed error), update
|
|
23
|
-
`CHANGELOG.md` per Keep a Changelog format (per CLAUDE.
|
|
23
|
+
`CHANGELOG.md` per Keep a Changelog format (per CLAUDE.md).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
## Tech stack
|
|
2
2
|
|
|
3
3
|
- **Rust**: edition 2021, `rust-version = "1.70"` (stable channel only, no nightly features per
|
|
4
|
-
CLAUDE.
|
|
4
|
+
CLAUDE.md). Crate name `jsonata-core` (lib name `jsonata_core`), cdylib+rlib.
|
|
5
5
|
- **Key Rust deps**: `pyo3` 0.29 (optional, feature `python`), `serde`/`serde_json` (preserve_order),
|
|
6
6
|
`simd-json` 0.17 (optional, feature `simd`, default-on — SIMD JSON parsing fast path),
|
|
7
7
|
`indexmap` (ordered maps for JSONata objects), `regex`, `chrono`, `thiserror`, `stacker`
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
mypy (strict mode), pytest (+pytest-cov, pytest-xdist for parallel runs).
|
|
16
16
|
- **Benchmarking**: Criterion (Rust, `cargo bench`, `evaluator_bench`), plus Python-side
|
|
17
17
|
benchmarks comparing against `jsonata` (JS) and `jsonata-rs`.
|
|
18
|
-
- **Docs**: mkdocs + mkdocs-material (`docs/`, `mkdocs.yml`), not Sphinx despite CLAUDE.
|
|
18
|
+
- **Docs**: mkdocs + mkdocs-material (`docs/`, `mkdocs.yml`), not Sphinx despite CLAUDE.md
|
|
19
19
|
mentioning Sphinx — mkdocs is what's actually wired up in pyproject.toml `[project.optional-dependencies.docs]`.
|