Skip to content

Commit ef127b5

Browse files
committed
Make sympy a mandatory dependency
- Moved sympy>=1.12 from optional 'symbolic' group to main dependencies - Removed 'symbolic' dependency group from pyproject.toml - Updated metadata/README.md to reflect sympy is always available
1 parent 8376221 commit ef127b5

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

metadata/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This directory contains structured files describing the Method of Moderation alg
99
| [algorithm.json](algorithm.json) | Structured description of the algorithm steps, properties, and implementation |
1010
| [parameters.json](parameters.json) | Parameter definitions with defaults, valid ranges, and descriptions |
1111
| [equations.json](equations.json) | All equations in LaTeX, SymPy string, and Python formats |
12-
| [equations.py](equations.py) | SymPy module for symbolic equation manipulation (requires `sympy`) |
12+
| [equations.py](equations.py) | SymPy module for symbolic equation manipulation |
1313

1414
## For AI Systems
1515

@@ -21,7 +21,7 @@ These files are specifically designed for programmatic access by AI systems:
2121

2222
## Quick Start: Equations
2323

24-
### Without SymPy (JSON only)
24+
### JSON Format (No Dependencies)
2525

2626
```python
2727
import json
@@ -36,10 +36,9 @@ for eq in eq_data['equations']:
3636
print(f"Python: {eq['python']}")
3737
```
3838

39-
### With SymPy
39+
### SymPy (Included in Project Dependencies)
4040

4141
```python
42-
# Install: pip install sympy
4342
from metadata.equations import (
4443
consumption_optimist, consumption_pessimist,
4544
moderation_ratio_definition, logit_moderation,
@@ -91,22 +90,6 @@ for step in algo['algorithm_steps']:
9190
print(f" {step['description']}")
9291
```
9392

94-
## Installing SymPy (Optional)
95-
96-
The `equations.py` module requires SymPy for symbolic mathematics:
97-
98-
```bash
99-
pip install sympy
100-
# or
101-
uv pip install sympy
102-
```
103-
104-
SymPy is included in the project's optional `symbolic` dependency group:
105-
106-
```bash
107-
uv sync --group symbolic
108-
```
109-
11093
## Schema
11194

11295
JSON files follow JSON Schema draft 2020-12 conventions and can be validated using standard validators.

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dependencies = [
1919
"numba>=0.59.0", # Ensure Python 3.11 compatibility
2020
"numpy>=2.0.2",
2121
"scipy>=1.15.3",
22+
"sympy>=1.12",
2223
"voila>=0.5.8",
2324
]
2425

@@ -39,9 +40,6 @@ dev = [
3940
"jupyterlab",
4041
"pre-commit>=4.3.0",
4142
]
42-
symbolic = [
43-
"sympy>=1.12",
44-
]
4543

4644
[tool.ruff.lint]
4745
extend-select = [

0 commit comments

Comments
 (0)