The installation requires three steps:
- Install python and other dependencies with
conda
- Install the custom version of bwa
- Install
prymer
with `poetry.
Install the required Python version, poetry
, and `primer3 into your environment manager of choice, e.g.
$ mamba env create -y -f prymer.yml
$ conda activate prymer
Install the custom version of bwa:
$ git clone -b interactive_aln [email protected]:fulcrumgenomics/bwa.git
$ cd bwa
$ make -j 12
$ cp bwa ${CONDA_PREFIX}/bin
Note: the virtualenvs.create false
setting in poetry.toml
stops poetry from creating new virtual environments and forces it to use the active conda environment instead.
This can be set once per machine/user and stored in the user's poetry configuration with:
$ poetry config settings.virtualenvs.create false
Install the prymer with poetry
.
$ poetry install
Follow the instructions above
$ poetry install --with dev
Make sure that instructions for development work have been followed.
Use poetry
to format, lint, type-check, and test your code.
Note that poetry run pytest
will run mypy
and ruff
code checks in addition to pytest
unit tests, and will provide a unit test coverage report.
$ poetry run pytest
However, pytest
will neither run the ruff formatter nor apply ruff
's automatic lint fixes, which can be done by calling ruff
directly.
$ poetry run ruff format && poetry run ruff check --fix
Static type checking is performed using mpyp
.
poetry run mypy
Make sure that instructions for development work have been followed.
Use mkdocs
to build and serve the documentation.
$ poetry install --with dev
$ poetry run mkdocs build
$ poetry run mkdocs serve
- Clone the repository recursively and ensure you are on the
main
(un-dirty) branch - Checkout a new branch to prepare the library for release
- Bump the version of the library to the desired SemVer with
poetry version #.#.#
- Commit the version bump changes with a Git commit message like
chore(release): bump to #.#.#
- Push the commit to the upstream remote, open a PR, ensure tests pass, and seek reviews
- Squash merge the PR
- Tag the new commit on the main branch of the repository with the new SemVer
GitHub Actions will take care of the remainder of the deployment and release process with:
- Unit tests will be run for safety-sake
- A source distribution will be built
- Many multi-arch multi-Python binary distributions will be built
- Assets will be deployed to PyPi with the new SemVer
- A Conventional Commit-aware changelog will be drafted
- A GitHub release will be created with the new SemVer and the drafted changelog
Consider editing the changelog if there are any errors or necessary enhancements.