Thanks for your interest in improving strainFlye's code!
Assuming that you already have conda installed, the following installation instructions should work for most Linux or macOS systems. (However, please feel free to open an issue if you encounter any problems.)
First, you should fork strainFlye; this will make contributing your changes back up to the main branch easier.
After this, the following instructions should work (assuming that conda is installed):
# Clone your fork of strainFlye's source code
git clone https://github.com/your-github-username-goes-here/strainFlye.git
# Create and activate a conda environment based on the "environment.yml" file
# (by default, it'll be named "strainflye")
cd strainFlye
conda env create -f environment.yml
conda activate strainflye
# Install strainFlye from the cloned source in "editable mode"
pip install -e .[dev]
You may prefer to create the environment using
mamba instead of conda, since mamba can be much
faster. As of writing, probably the easiest way to do this is to create an
empty environment and then
update it based on environment.yml
.
If you want to work on strainFlye smooth assemble
then you may also want to
install LJA, as is discussed in the
strainFlye README. (That said: as of writing strainFlye's tests do not rely on
LJA being installed, so this step is optional.)
strainFlye's
Makefile
,
in the root of its repository, provides a few useful commands for development.
These are described here. All of these commands assume that strainFlye has been
installed as described above, that Make
is installed, and that you are
running these commands from the root of strainFlye's repository.
strainFlye uses pytest
and pytest-cov
to run its automated tests.
You can run these tests using:
make test
Thanks to our use of pytest-cov
, this command will create a few formats
of coverage report after running:
- it'll display a summary on the terminal,
- it'll create an XML file in the root of strainFlye's repository that is useful for passing coverage information to CodeCov,
- and it'll create a directory in the root of strainFlye's repository
called
htmlcov
.
The last of these (htmlcov
) is probably the most useful for local
development.
strainFlye uses flake8
to lint and style-check its source code, and black
to auto-format its source code.
To run linting and style-checking, you can use the following command:
make stylecheck
To auto-format the source code:
make style
Note that, in some rare cases, flake8
and black
can disagree. If you run
into trouble trying to get the style-checking to pass (or with other
development steps), feel free to open an issue in this repository.