Contributing#

If you find an issue with this package, please search for or raise it on GitHub. If you would like to contribute to the package, please find an issue and let us know in the comments, or fork the repository and make a pull request.

  1. To start making changes, fork the repository using the link in the top-right of our GitHub page.

  2. Then, clone your fork,

    git clone https://github.com/<your-username>/asterion.git
    cd asterion
    
  3. We recommend setting up a virtual python environment to use while developing asterion. For example,

    mkdir ~/.venvs
    python -m venv ~/.venvs/asterion
    

    To activate the environment and work on the package,

    source ~/.venvs/asterion/bin/activate
    

    When you have finished working, deactivate the environment with the command deactivate.

  4. Install the package (activate the virtual environment first if applicable),

    pip install -e .
    
  5. Add the main repository to your git environment,

    git remote add upstream https://github.com/alexlyttle/asterion.git
    git remote -v
    

    The output should look like this,

    origin      https://github.com/<your-username>/asterion.git (fetch)
    origin      https://github.com/<your-username>/asterion.git (push)
    upstream    https://github.com/alexlyttle/asterion.git (fetch)
    upstream    https://github.com/alexlyttle/asterion.git (push)
    
  6. Create a branch to work on your changes. Pull the latest version of the source code,

    git checkout main
    git pull upstream main
    

    Then, create your branch,

    git checkout -b <branch-name>
    
  7. Before adding your changes, run the unit tests (coming soon)…

  8. Add and commit your changes. Please be specific in the commit message,

    git add <added-or-modified-file>
    git commit -m "<description of your changes>"
    
  9. Push changes to GitHub and open a pull request (you may open it as a draft if you are not ready for review),

    git push origin <branch-name>
    

    Then, go here and click on the button “Compare and open a pull request” to submit your changes.

Tests#

To change or run the tests, install the package with the following option,

pip install -e '.[tests]'

Once you have made changes to the codebase or tests, run them using pytest,

pytest .

Documentation#

To modify and update the documentation you need to install the package with the docs option:

pip install -e '.[docs]'

Once you have made changes to documentation, run the following commands to update the HTML documentation and check that the docs compile locally:

cd docs
make clean
make html