This page contains developer instructions to build and maintain mdadash.
- Installation
- Run
- Develop
- Lint checks
- Tests
- Code Coverage
- Build
- Verify GitHub actions locally
- Docs
- Publishing
To build mdadash from source,we highly recommend using virtual environments. If possible, we strongly recommend that you use Anaconda as your package manager. Below we provide instructions both for conda and for pip.
Ensure that you have conda installed.
Create a virtual environment and activate it:
conda create --name mdadash
conda activate mdadashInstall the development, testing and documentation dependencies:
conda env update --name mdadash --file devtools/conda-envs/dev_env.yaml
conda env update --name mdadash --file devtools/conda-envs/test_env.yaml
conda env update --name mdadash --file docs/requirements.yamlBuild this package from source:
pip install -e .If you want to update your dependencies (which can be risky!), run:
conda update --allAnd when you are finished, you can exit the virtual environment with:
conda deactivateTo build the package from source, run:
pip install .If you want to create a development environment, install the dependencies required for tests and docs with:
pip install ".[dev,test,doc]"The frontend code needs to be built before running the backend server. This can be done as follows:
cd mdadash/frontend
npm install
npm run buildTo run the dashboard server:
mdadash --topology <topology_filename> --trajectory <trajectory_url>To see the options available:
mdadash --helpDeveloper instructions for frontend code can be found here.
- Use the
editableinstallation above (pip install -e .)
npm run lint --prefix mdadash/frontendruff checknpm run test:unit --prefix mdadash/frontend -- --runpytest -vcd mdadash/frontend
npx vitest --run --coverageThe coverage details will be shown on the console. Open coverage/index.html to view the interactive coverage report in the browser.
To see coverage output on the console:
pytest -v --cov=mdadashTo write coverage output to html file:
pytest -v --cov=mdadash --cov-report=htmlOpen htmlcov/index.html to view the coverage report in the browser.
To build this package:
rm -rf mdadash.egg-info dist && python -m buildTo verify the created wheel in an isolated environment:
uv run --no-project --refresh --with path.to.whl mdadash <options>To check the created distribution:
twine check dist/*GitHub actions can be verified locally using act.
Note that this requires Docker. Running on Mac needs an additional param
--container-architecture linux/arm64. To bypass the repo name check, you can pass--env GITHUB_REPOSITORY=MDAnalysis/mdadash. Both these can be set in~/.actrcas well.
To list the jobs:
act -lTo run a job (eg: pylint_check):
act -j pylint_checkTo run all jobs:
actSetting up the docs environment:
conda env update --name mdadash --file docs/requirements.yamlBuilding docs locally:
cd docs
make clean && make htmlOpen docs/_build/html/index.html to view the docs in the browser.
Create a new tag to trigger TestPyPI deployment (needs to be done from command line as it is not possible from GitHub web UI directly):
Example:
git tag -a v0.1.0 -m "v0.1.0"
git push origin v0.1.0
After the action runs successfully, verify at: https://test.pypi.org/project/mdadash/
Create a new release with the tag above after verifying on TestPyPI.
After the action runs successfully, verify at: https://pypi.org/project/mdadash/
Feedstock repo: https://github.com/conda-forge/mdadash-feedstock
A new PR will automatically get created by regro-cf-autotick-bot after a few hours of the new package version being available on PyPI.
To manually trigger a version update:
Create a new issue with the type Bot commands and enter @conda-forge-admin, please update version in the issue title. The bot will create a new PR immediately.