Contributing¶
Setting up a development environment¶
Fork the basicsynbio repository.
Clone your fork:
git clone https://github.com/username/basicsynbio.git
cd into the directory.
Using a virtual environment running Python 3.8 or greater install the dependencies:
pip install -r requirements.txt
Install the package in editable mode:
pip install -e .
Confirm all test pass:
pytest [--runslow]
Making changes¶
Steps¶
set the upstream repository:
git remote add upstream https://github.com/LondonBiofoundry/basicsynbio.git
Pull the latest changes to origin/master:
git pull upstream master
Create a new branch for your development:
git checkout -b dev/foobar
Make the development then stage and commit:
git add . git commit -m "make this desirable development to basicsynbio"
Push the development back to GitHub:
git push origin dev/foobar
Go to GitHub and create a new Pull Request.
Guidelines for changes¶
General Guidelines¶
Code should be formatted using black.
New code should have associated tests written using pytest.
Update the documentation if required. The documentation is formatted using Sphinx and as such all files must be written in reST.
Update GitHub pages by running
make github
in the /docsource directory. This implements GitHub Pages as described by Anne Gentle.New releases are made online (https://github.com/LondonBiofoundry/basicsynbio/releases). Releases are automatically published to PyPi via the build-publish.yml workflow.
Guidelines for docstrings¶
Format docstrings according to the Google Style Guide. This enables automated documentation of the API using sphinx.ext.napoleon.
Where the same argument is used by multiple methods/functions, the
basicsynbio.decorators.addargs2docs()
decorator may be used. Associated instances ofbasicsynbio.decorators.ArgDescription
are placed inbasicsynbio.main.CommonArgDocs
.