Developer Guide
This guide is for contributors extending DifferentialLab internals or adding new problem modules.
Local environment
pip install -e ".[dev]"
Optional docs toolchain:
pip install -e ".[docs]"
Repository layout
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
Coding conventions
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).
UI text conventions
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).
Adding a new complex problem plugin
Create package under
src/complex_problems/<plugin_id>/.Implement:
problem.pywith descriptor andopen_dialogui.pyfor inputssolver.pyfor numericsresult_dialog.pyfor plotsoptional
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).
Typical quality loop
Implement feature.
Run focused tests.
Run broader regression set.
Update docs and examples.
Useful commands
pytest
pytest tests/test_complex_problems_registry.py
ruff check src tests
mypy src
Documentation workflow
pip install -e ".[docs]"
cd docs
make html
For Windows:
make.bat html
Release hygiene checklist
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.