Installation, Testing, & Publishing

Basic Installation

pip install monaco

Installing from Source

git clone https://github.com/scottshambaugh/monaco.git
cd monaco
pip install poetry
poetry install --extras "pandas numba"

Running Tests and Type Checking

poetry run coverage run --source=monaco -m pytest && poetry run coverage report -m 
poetry run mypy src tests/test*

Building Docs

ReadTheDocs will automatically build when the main branch is updated.

pip install sphinx sphinx_rtd_theme myst_parser
cd docs
poetry run make clean && poetry run make html

Releasing a New Version and Publishing to PyPi

  1. Update CHANGELOG.md

  2. Update the version in pyproject.toml

  3. Update and install the package

    poetry update
    poetry install --extras "pandas numba"
    
  4. Run tests, type checking, and linting locally

    poetry run coverage run --source=monaco -m pytest && poetry run coverage report -m 
    poetry run mypy src tests/test*
    poetry run flake8
    
  5. Run plotting tests manually

  6. Commit any changes and push up the develop branch

  7. Push all changes up to the main branch

    git checkout main
    git merge develop
    git push
    
  8. Wait for CI tests to pass

  9. Check that the docs are building

  10. Create a new release, creating a new tag and including a changelog:

    **Changelog**: https://github.com/scottshambaugh/monaco/blob/main/CHANGELOG.md    
    **Full Diff**: https://github.com/scottshambaugh/monaco/compare/v0.x.x...v0.x.x
    

    This will automatically publish the release to PyPI.