You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: docs/contrib/08_dependency_management.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,6 +272,29 @@ When creating a new project in `pySDC/projects/`:
272
272
273
273
See [Adding a Project](./06_new_project.md) for more details.
274
274
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
+
275
298
## Examples
276
299
277
300
### Good Dependency Specification
@@ -293,6 +316,8 @@ dependencies:
293
316
- qmat>=0.1.8
294
317
```
295
318
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
+
296
321
### Version Constraint Patterns
297
322
298
323
- **Stable, mature libraries**: `numpy>=1.15.4,<3.0` (allow minor updates within major version)
0 commit comments