This guide is for contributors extending DifferentialLab internals or adding new problem modules.
pip install -e ".[dev]"Optional docs toolchain:
pip install -e ".[docs]"src/config: schema, constants, paths, equation catalogssrc/solver: parser + numerical solvers + statisticssrc/frontend: Tk dialogs and plotting embeddingsrc/complex_problems: plugin subsystemsrc/pipeline.py: orchestration for standard solve flowtests: pytest suitedocs: Sphinx + MyST docs
- Keep compute kernels independent from UI code.
- Prefer typed dataclasses for solver outputs.
- Validate user input in UI before solver invocation.
- Use shared helpers in
complex_problems/commonfor safe expressions and background solve handling. - Keep plugin defaults computationally reasonable (interactive-scale runtime).
- Use Unicode math formatting in labels when it improves readability (
xₘᵢₙ,Nₓ,|ψ|², ...). - If a Unicode subscript is unavailable for a symbol, use
base_subscriptfallback (for exampleN_θ,N_φ). - Prefer non-selectable labels for static help/description text.
- Keep copy-oriented text areas only where users intentionally need to paste symbols/expressions (custom-equation and transform helpers).
- Create package under
src/complex_problems/<plugin_id>/. - Implement:
problem.pywith descriptor andopen_dialogui.pyfor inputssolver.pyfor numericsresult_dialog.pyfor plots- optional
model.py
- Export in package
__init__.py. - Register module in
src/complex_problems/problem_registry.py. - Add tests in
tests/:- solver behavior
- registry dispatch
- Update docs (
docs/complex-problems.mdanddocs/api/complex_problems.rst).
- Implement feature.
- Run focused tests.
- Run broader regression set.
- Update docs and examples.
pytest
pytest tests/test_complex_problems_registry.py
ruff check src tests
mypy srcpip install -e ".[docs]"
cd docs
make htmlFor Windows:
make.bat html- Version updated where required.
- Changelog entry added.
- Tests pass in CI scope.
- Docs updated for user-visible changes.
- New plugin appears in registry and guide pages.