Contributing
Thanks for contributing to Hypothesis-Bio! Every little bit helps and it's always appreciated.
There are a bunch of ways to contribute:
Types of contribution
File bug reports
Please report any bugs to our issue tracker. If you are reporting a bug, please provide as much information as you can including:
- Hypothesis-Bio version
- Hypothesis version
- Python version
- OS and version
- How to reproduce the error
Write documentation
Hypothesis-Bio could always use more documentation. The documentation is contained in:
Docstrings in the source code.
These docstrings are the source of the documentation about each strategy. They're written in Markdown and contain a list of each argument's meaning, usage examples, and information about what exactly is being generated. The docstrings are rendered by the website into the full API documentation.
The README.md and CONTRIBUTING.md files. These files contain the key information for using and working on Hypothesis-Bio. Specifically, the README file is used both as the project's homepage on GitHub and landing page on the documentation website.
A documentation website. In addition to containing the rendered docstrings and README/CONTRIBUTING files, the site also (should) contain tutorials and additional information. To get the site up an running, you'll need a copy of Node. Then, inside the
docs/
directory, runnpm i
andnpm run dev
to set up a development server. The site is built with Vuepress, a simple static site generator whose configuration is defined indocs/.vuepress/config.js
.
Add new strategies
The heart of Hypothesis-Bio are its strategies, the functions that generate examples that are used for testing. If you have a biological data type or format that isn't represented in Hypothesis-Bio, we'd love you to contribute it via a pull request. For information about how to write a strategy, take a look at Hypothesis's documentation on composite strategies as well as the source code for examples. If you need any help, please don't hesitate to reach out.
Add unit tests
In order to ensure that the software is correct, we rely on unit testing. All code (new and existing) should have unit tests. We use pytest for our testing and all tests must pass before merging a pull request is allowed.
How to contribute
Ready to contribute to Hypothesis-Bio? Here's how to set up your local environment for development:
Fork the
hypothesis-bio
repo on GitHub.Clone your fork locally:
$ git clone git@github.com:your_name_here/hypothesis_bio.git
Install your local copy into a virtualenv and install
tox
for running tests and checks.$ cd hypothesis-bio/ $ virtualenv env $ source env/bin/activate (env) $ pip install tox
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you're done making changes, check that your changes pass flake8, mypy, black, and isort:
(env) $ tox -e fix_lint
Also, run your code through our test suite to ensure nothing breaks:
(env) $ tox
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
← User Guide blast6 →