Development

We welcome contributions to the development of ensemble-integration. To contribute follow the below instructions to submit a pull request:

  1. Install Python. First of all make sure you have a supported version of Python on your local machine (see GitHub for supported versions).

  2. Install Poetry. eipy uses Poetry to manage dependencies. To install Poetry follow the instructions on their website.

  3. Fork the repo.

git fork https://github.com/GauravPandeyLab/eipy.git
  1. Set up a virtual environment. Navigate to the eipy directory and create and activate a virtual environment.

python -m venv .venv
source .venv/bin/activate
  1. Install dependencies. If editing the documentation make sure to include the --with docs argument.

poetry install --with docs
  1. Make contributions.

  2. Linting and formating. We use Flake8 for linting and Black for formatting. For linting type, for example,

flake8 eipy/ei.py

For formatting type, for example,

black eipy/ei.py
  1. Run tests. All tests can be found in the tests folder and can be run by typing

pytest

Note that new test file names must have the prefix test_.

9. Submit pull request. Updates must be made via a pull request. Internal users should note that pushing to the main branch has been disabled.

10. Publishing new versions to PyPI (internal only). We now use poetry-dynamic-versioning to iterate version numbers in pyproject.toml automatically. You can publish to PyPI by creating a new release, which will run the “Publish to PyPI” workflow. This workflow determines the PyPI version number from the GitHub release tag, which you should manually iterate. Note: to test things out first, you can try manually running the “Publish to test PyPI” workflow.