Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 2.58 KB

CONTRIBUTING.md

File metadata and controls

78 lines (54 loc) · 2.58 KB

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

Get Started!

Ready to contribute? Here's how to set up morflowgenesis for local development.

  1. Fork the morflowgenesis repo on GitHub.

  2. Clone your fork locally:

    git clone git@github.com:{your_name_here}/morflowgenesis.git
  3. Install the project in editable mode. (It is also recommended to work in a virtualenv or anaconda environment):

    cd morflowgenesis/
    pip install -e .[dev]
  4. Create a branch for local development:

    git checkout -b {your_development_type}/short-description

    Ex: feature/read-tiff-files or bugfix/handle-file-not-found
    Now you can make your changes locally.

  5. When you're done making changes, check that your changes pass linting and tests, including testing other Python versions with make:

    make build
  6. Commit your changes and push your branch to GitHub:

    git add .
    git commit -m "Resolves gh-###. Your detailed description of your changes."
    git push origin {your_development_type}/short-description
  7. Submit a pull request through the GitHub website.

Notes on testing code during development

Due to how prefect fetches code during runtime, some local files are used during runtime and some are not. Code that is referenced by a deployment is accessed from github, so if you expect to code run using the Prefect server, your code most be on github. If testing a single step, it is recommended that you test that step in isolation (e.g. by adding a if __name__ == '__main__'at the bottom and loading local ImageObjects) instead of running the code through the Prefect server after every change. If you are making use of new packages, you will have to add a docker image using

make docker ssh-file-name=your_ssh_file_name

where your_ssh_file_name is the name of the file generated by ssh-keygen in your ./ssh folder. Since the repo is currently private, you will have to use ssh-keygen to create an ssh key, add it to your github account, and replace the ssh key path in the make docker script with the path to your ssh key.

Deploying

A reminder for the maintainers on how to deploy. Make sure all your changes are committed. Then run:

$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags
git branch -D stable
git checkout -b stable
git push --set-upstream origin stable -f

This will release a new package version on Git + GitHub and publish to PyPI.