Things to check if new functionality added:
Ensure functions are unit tested.
Ensure functions have numpy style docstrings.
Ensure code is PEP8 compliant.
If module, add to docs/api.rst for autosummarizing.
Add to quimb/__init__.py and "__all__" if appropriate (or the
tensor network equivalent quimb.tensor.__init__.py).
Add to changelog and elsewhere in docs.
Testing quimb requires pytest (as well as coverage and pytest-cov) and simply involves running pytest in the root quimb directory.
The tests can also be run with pre-spawned mpi workers using the command quimb-mpi-python -m pytest (but not in syncro mode – see Distributed Parallelism - MPI).
quimb-mpi-python -m pytest
Building the docs requires sphinx, pydata-sphinx-theme, and nbsphinx.
To start from scratch, remove quimb/docs/_autosummary and quimb/docs/_build.
Run make html (make.bat html on windows) in the quimb/docs folder.
Launch the page: quimb/docs/_build/html/index.html.
quimb uses versioneer
to manage versions and releases. The steps to release a new version
on pypi are as follows:
Make sure all tests are passing, as well as the continuous integration
and readthedocs build.
git tag the release with next X.Y.Z (n.b. no ‘v’ prefix).
Remove any old builds: rm dist/*`
Build the tar and wheel python setup.py bdist_wheel sdist
python setup.py bdist_wheel sdist
Optionally remove the build folder.
Upload using twine: twine upload dist/*
twine upload dist/*