ModelXplorer is a Dash application to explore, fit, and analyze Ordinary Differential Equations. It supports interactive single-trace fitting (onefit) and batch dataset fits, with optional experiment tracking in MongoDB via Sacred and visualization in Omniboard.
- Interactive single-trace fitting (onefit mode)
- Batch fitting across uploaded datasets (batch mode)
- Sacred experiment tracking and optional Omniboard dashboard
- Clean Dash UI with Bootstrap styling
- Waitress production server
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install --upgrade pip
pip install -r requirements.txt
# Optional: set app mode (onefit | batch)
echo "APP_VERSION=onefit" >> .env
python index.pyApp default: http://127.0.0.1:8050
cp .env.example .env # then edit
docker compose up -d --build- App: http://localhost:8050
- Omniboard: http://localhost:9000
Copy .env.example to .env in the project root.
Root-only authentication (recommended for this stack):
MONGO_DB_NAME=fit_data_test
MONGO_DB=fit_data_test
PORT=8050
# Root credentials for MongoDB (used by both app and Omniboard)
MONGO_ROOT_USER=root
MONGO_ROOT_PASSWORD=changeme_admin
# App auth mapping (handled by compose):
MONGO_USE_AUTH=1
MONGO_AUTH_SOURCE=admin
MONGO_USERNAME=${MONGO_ROOT_USER}
MONGO_PASSWORD=${MONGO_ROOT_PASSWORD}Full URI override (e.g., Atlas):
MONGO_URI=mongodb+srv://user:pass@cluster.example.mongodb.netApp modes (set in .env):
APP_VERSION=onefit # or: batchInternally, config/config.py reads APP_VERSION and defaults to onefit if invalid.
app.py # Dash app instance
index.py # Entrypoint (Waitress + mode selection + Omniboard optional)
layouts/ # UI layouts
callbacks/ # Dash callbacks (onefit, batch, dataset, system)
model_new.py # NPQ model
fit_params_parallel.py # Fitting routines
tools.py # Utilities (plotting, file IO, normalization)
config/params.py # MongoDB config (env-driven)
Dockerfile # App image
docker-compose.yml # App + Mongo + Omniboard stack
pdf2imagerequires Poppler installed and on PATH (Windows: addbinto PATH).- LaTeX image generation requires
pdflatex.- Docker image includes TeX Live and enables images by default (
DISABLE_LATEX_IMAGE=0). - Bare metal: install TeX Live or set
DISABLE_LATEX_IMAGE=1to skip.
- Docker image includes TeX Live and enables images by default (
- Sacred + Omniboard requires a reachable MongoDB.
- App uses Waitress in
index.py.
- Branches:
main(stable), feature branches for changes; current working branch example:docker. - Releases & tags: use semantic versioning (e.g.,
v1.2.0).
Use annotated tags for releases so you can include a message and signature.
- Create an annotated tag locally
git tag -a v1.2.3 -m "Release v1.2.3"- Push a single tag to origin
git push origin v1.2.3Or push all local tags:
git push --tags- Verify the tag exists on the remote
git ls-remote --tags origin- Update (force-move) a tag — use with caution
git tag -f v1.2.3
git push --force origin v1.2.3- Delete a tag (local and remote)
git tag -d v1.2.3
git push origin :refs/tags/v1.2.3- Create a GitHub release (optional)
-
Web UI: open the tag on GitHub → “Draft a new release”
-
CLI (requires GitHub CLI):
gh release create v1.2.3 --notes "Changelog and highlights"
Tips:
-
Keep tag names consistent (
vMAJOR.MINOR.PATCH). -
Tag the commit on the main branch you intend to release.
-
CI/CD can be triggered on tags to build and publish release artifacts.
-
Commits: keep small, descriptive messages; consider Conventional Commits for clarity.
- Example:
fix(callbacks): correct outputs and safer batch concurrencychore(docker): remove app healthcheckrefactor(index): fail-safe Omniboard startup
- Example:
We welcome pull requests!
- Fork the repo and create a feature branch.
- Make focused changes with clear commit messages.
- Update README or docs when behavior changes.
- Open a PR; include screenshots or logs when relevant.
Issue triage:
- Use labels:
bug,enhancement,docs,question. - Provide steps to reproduce and environment details.
- Do not commit secrets: keep
.envout of version control (it’s ignored). - In Docker, MongoDB is unexposed by default; the app connects via the compose network.
- Use MongoDB authentication in production (
SCRAM-SHA-256, TLS for remote). - Run containers as non-root (Dockerfile config).
- Omniboard not found: install globally (
npm i -g omniboard) or setOMNIBOARD_DISABLE=1. - MongoDB auth errors: verify
MONGO_AUTH_SOURCEand credentials. pdf2imageissues: ensure Poppler is installed and on PATH.- See logs for app mode selection; set
CONFIG_DEBUG=1to print selected mode.
GPL-3.0. See LICENSE.
