Skip to content

Commit 46119b0

Browse files
Copilotpancetta
andcommitted
Document project-specific dependency constraints and DAE scipy requirement
- Add documentation on when and why to use tighter constraints - Document DAE project's scipy<1.15 requirement - Add explanatory comment in DAE environment.yml - Provide best practices for handling project-specific needs Co-authored-by: pancetta <[email protected]>
1 parent 4ceea3e commit 46119b0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/contrib/08_dependency_management.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,29 @@ When creating a new project in `pySDC/projects/`:
272272

273273
See [Adding a Project](./06_new_project.md) for more details.
274274

275+
### Project-Specific Constraints
276+
277+
Some projects have **tighter version constraints** than the general guidelines due to specific requirements:
278+
279+
**Example: DAE Project**
280+
```yaml
281+
dependencies:
282+
- scipy>=0.17.1,<1.15 # Tighter than general <2.0 constraint
283+
```
284+
285+
**Reason**: The DAE project contains tests for fully implicit index-2 differential-algebraic equation solvers that are sensitive to numerical precision changes. Scipy versions >= 1.15 introduce minor numerical differences that cause test failures in convergence order tests.
286+
287+
**When to use tighter constraints**:
288+
- Numerical precision requirements in scientific computing
289+
- Known compatibility issues with specific version ranges
290+
- Project relies on deprecated features being removed in newer versions
291+
292+
**Best practices**:
293+
- Document the reason in the project README or environment file
294+
- Add a comment explaining why the constraint is tighter
295+
- Periodically review if the constraint can be relaxed
296+
- Consider opening an issue to track updating code for newer versions
297+
275298
## Examples
276299

277300
### Good Dependency Specification
@@ -293,6 +316,8 @@ dependencies:
293316
- qmat>=0.1.8
294317
```
295318

319+
**Note**: Some projects may require tighter constraints due to numerical precision requirements. For example, the DAE project uses `scipy>=0.17.1,<1.15` because newer scipy versions introduce numerical differences that affect the fully implicit index-2 DAE solver tests. Always respect project-specific constraints when they exist.
320+
296321
### Version Constraint Patterns
297322

298323
- **Stable, mature libraries**: `numpy>=1.15.4,<3.0` (allow minor updates within major version)

pySDC/projects/DAE/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ channels:
55
- conda-forge
66
dependencies:
77
- numpy>=1.15.4,<3.0
8+
# scipy<1.15 required: newer versions cause numerical precision differences
9+
# in fully implicit index-2 DAE solver tests (convergence order tests)
810
- scipy>=0.17.1,<1.15
911
- dill>=0.2.6
1012
- mpich

0 commit comments

Comments
 (0)