Upgrade cel-rust to 0.13.0 and trim docs by hardbyte · Pull Request #32 · hardbyte/python-common-expression-language · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 35 additions & 0 deletions CHANGELOG.md
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.27", features = ["chrono", "py-clone"]}
cel = { version = "0.12.0", features = ["chrono", "json", "regex", "bytes"] }
cel = { version = "0.13.0", features = ["chrono", "json", "regex", "bytes"] }
log = "0.4.27"
pyo3-log = { git = "https://github.com/a1phyr/pyo3-log.git", branch = "pyo3_0.27" }
chrono = { version = "0.4.42", features = ["serde"] }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ uv run pytest
## Contributing

Contributions are welcome! Please see our [documentation](https://python-common-expression-language.readthedocs.io/) for:
- [CEL compliance status](docs/reference/cel-compliance.md)
- [CHANGELOG](CHANGELOG.md) — release notes and behaviour changes
- Development setup and guidelines
- Areas where help is needed

Expand Down
15 changes: 1 addition & 14 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,9 @@ uv sync --dev

# Build the Rust extension
uv run maturin develop
# → 🔗 Found pyo3 bindings
# → 📦 Built wheel for CPython 3.11 to target/wheels/common_expression_language-0.11.0-cp311-cp311-linux_x86_64.whl
# → 📦 Installed common-expression-language-0.11.0

# Run tests to verify setup
uv run pytest
# → ========================= test session starts =========================
# → collected 300+ items
# → tests/test_basics.py ........ [ 95%]
# → ========================= 300 passed in 2.34s =========================
```

### Code Organization
Expand Down Expand Up @@ -152,7 +145,7 @@ def test_lower_ascii_not_implemented(self):
cel.evaluate('"HELLO".lowerAscii()')
# → RuntimeError: Undefined variable or function 'lowerAscii'

@pytest.mark.xfail(reason="String utilities not implemented in cel v0.11.1", strict=False)
@pytest.mark.xfail(reason="String utility not implemented upstream yet", strict=False)
def test_lower_ascii_expected_behavior(self):
"""This test will pass when upstream implements lowerAscii()."""
result = cel.evaluate('"HELLO".lowerAscii()')
Expand Down Expand Up @@ -266,16 +259,10 @@ See https://pyo3.rs/main/type-stub to opt-in to the automated types when impleme
```bash
# Clean rebuild
uv run maturin develop --release
# → 🔗 Found pyo3 bindings
# → 📦 Built wheel for CPython 3.11 to target/wheels/common_expression_language-0.11.0-cp311-cp311-linux_x86_64.whl
# → 📦 Installed common-expression-language-0.11.0

# Check Rust toolchain
rustc --version
# → rustc 1.75.0 (82e1608df 2023-12-21)

cargo --version
# → cargo 1.75.0 (1d8b05cdd 2023-11-20)
```

**Test Failures:**
Expand Down
5 changes: 2 additions & 3 deletions docs/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ print(result) # → True (cached on subsequent calls)
> - Never trust user-provided expressions without sandboxing
> - Monitor expression performance for DoS protection

**→ [Full Production Guide](how-to-guides/production-patterns-best-practices.md) | [API Reference](reference/python-api.md)**
**→ [API Reference](reference/python-api.md) | [Error Handling](how-to-guides/error-handling.md)**

---

Expand All @@ -337,8 +337,7 @@ print(result) # → True (cached on subsequent calls)
2. **Learn Fundamentals**: [CEL Language Basics](tutorials/cel-language-basics.md) - Master the syntax
3. **Practice**: [CLI Recipes](#cli-recipes) - Get comfortable with the tools
4. **Build**: [Business Logic](#data-transformation) - Implement your first real use case
5. **Secure**: [Error Handling](#error-handling) - Make it production-ready
6. **Scale**: [Production Patterns](#production-patterns) - Deploy with confidence
5. **Handle errors**: [Error Handling](#error-handling) - Make it production-ready

## 💡 Can't Find What You're Looking For?

Expand Down
18 changes: 1 addition & 17 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,20 @@ Getting Python CEL up and running is quick and easy.

```bash
uv add common-expression-language
# → Adding common-expression-language to dependencies
# → Resolved 15 packages in 1.23s
# → Installed common-expression-language-0.11.0
```

=== "uv tool (CLI only)"

Install the CLI tool globally:

```bash
uv tool install common-expression-language
# → Installed common-expression-language 0.11.0
# → Installed executables: cel
```

=== "pip"

```bash
pip install common-expression-language
# → Collecting common-expression-language
# → Successfully installed common-expression-language-0.11.0
```


Expand All @@ -56,8 +49,6 @@ print("✓ Basic evaluation working correctly")

```bash
cel --version
# → cel 0.11.0

cel '1 + 2'
# → 3
```
Expand All @@ -81,17 +72,10 @@ cd python-common-expression-language

# Install in development mode
pip install maturin
# → Successfully installed maturin-1.4.0

maturin develop
# → 🔗 Found pyo3 bindings
# → 📦 Built wheel for CPython 3.11 to target/wheels/
# → 📦 Installed common-expression-language-0.11.0

# Or with uv
uv run maturin develop
# → 🔗 Found pyo3 bindings
# → 📦 Built wheel and installed successfully
```

## Troubleshooting
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/quick-start.md
Loading
Loading