Skip to content

Commit 9cf576a

Browse files
committed
docs: upgrade the docs to rely on bwa-aln-interactive in bioconda
1 parent e942368 commit 9cf576a

File tree

5 files changed

+138
-141
lines changed

5 files changed

+138
-141
lines changed

README.md

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,62 @@
11
# Python Primer Design Library
22

33
[![Python Versions][language-badge]][language-link]
4-
[![Code Style][code-style-badge]][code-style-link]
5-
[![Type Checked][type-checking-badge]][type-checking-link]
6-
[![PEP8][pep-8-badge]][pep-8-link]
7-
[![Code Coverage][code-coverage-badge]][code-coverage-link]
84
[![License][license-badge]][license-link]
9-
10-
---
11-
12-
[![Install with Bioconda][bioconda-badge]][bioconda-link]
13-
[![Bioconda][bioconda-dl-badge]][bioconda-dl-link]
14-
[![PyPI version][pypi-badge]][pypi-link]
15-
[![PyPI download total][pypi-downloads-badge]][pypi-downloads-link]
16-
[![Python package][python-package-badge]][python-package-link]
5+
[![MyPy Checked][type-checking-badge]][type-checking-link]
6+
[![Poetry][poetry-badge]][poetry-link]
7+
[![Ruff][ruff-badge]][ruff-link]
178

189
[language-badge]: https://img.shields.io/badge/python-3.11_|_3.12-blue
1910
[language-link]: http://www.python.org/
20-
[code-style-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
21-
[code-style-link]: https://black.readthedocs.io/en/stable/
22-
[type-checking-badge]: http://www.mypy-lang.org/static/mypy_badge.svg
23-
[type-checking-link]: http://mypy-lang.org/
24-
[pep-8-badge]: https://img.shields.io/badge/code%20style-pep8-brightgreen.svg
25-
[pep-8-link]: https://www.python.org/dev/peps/pep-0008/
26-
[code-coverage-badge]: https://codecov.io/gh/fulcrumgenomics/prymer/branch/main/graph/badge.svg
27-
[code-coverage-link]: https://codecov.io/gh/fulcrumgenomics/prymer
2811
[license-badge]: http://img.shields.io/badge/license-MIT-blue.svg
2912
[license-link]: https://github.com/fulcrumgenomics/prymer/blob/main/LICENSE
30-
[bioconda-badge]: https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat
13+
[type-checking-badge]: http://www.mypy-lang.org/static/mypy_badge.svg
14+
[type-checking-link]: http://mypy-lang.org/
15+
[poetry-badge]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
16+
[poetry-link]: https://python-poetry.org/
17+
[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
18+
[ruff-link]: https://docs.astral.sh/ruff/
19+
20+
[![Install with Bioconda][bioconda-badge]][bioconda-link]
21+
[![PyPI version][pypi-badge]][pypi-link]
22+
23+
[bioconda-badge]: https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?label=Install%20with
3124
[bioconda-link]: http://bioconda.github.io/recipes/prymer/README.html
32-
[bioconda-dl-badge]: https://img.shields.io/conda/dn/bioconda/prymer.svg?label=Bioconda
33-
[bioconda-dl-link]: https://anaconda.org/bioconda/prymer
34-
[pypi-badge]: https://badge.fury.io/py/prymer.svg
25+
[pypi-badge]: https://img.shields.io/pypi/v/prymer?label=Install%20with%20PyPi
3526
[pypi-link]: https://pypi.python.org/pypi/prymer
36-
[pypi-downloads-badge]: https://img.shields.io/pypi/dm/prymer
27+
28+
[![Bioconda][bioconda-dl-badge]][bioconda-dl-link]
29+
[![PyPI download total][pypi-downloads-badge]][pypi-downloads-link]
30+
31+
32+
[bioconda-dl-badge]: https://img.shields.io/conda/dn/bioconda/prymer.svg?label=Bioconda%20downloads
33+
[bioconda-dl-link]: https://anaconda.org/bioconda/prymer
34+
[pypi-downloads-badge]: https://img.shields.io/pypi/dm/prymer.svg?label=PyPi%20downloads
3735
[pypi-downloads-link]: https://pypi.python.org/pypi/prymer
38-
[python-package-badge]: https://github.com/fulcrumgenomics/prymer/actions/workflows/publish_prymer.yml/badge.svg
39-
[python-package-link]: https://github.com/fulcrumgenomics/prymer/actions/workflows/publish_prymer.yml
4036

41-
## Quick setup
37+
[![tests][python-tests-badge]][python-tests-link]
38+
[![publish prymer][publish-prymer-badge]][publish-prymer-link]
39+
[![Code Coverage][code-coverage-badge]][code-coverage-link]
40+
41+
[publish-prymer-badge]: https://github.com/fulcrumgenomics/prymer/actions/workflows/publish_prymer.yml/badge.svg
42+
[publish-prymer-link]: https://github.com/fulcrumgenomics/prymer/actions/workflows/publish_prymer.yml
43+
[python-tests-badge]: https://github.com/fulcrumgenomics/prymer/actions/workflows/tests.yml/badge.svg
44+
[python-tests-link]: https://github.com/fulcrumgenomics/prymer/actions/workflows/tests.yml
45+
[code-coverage-badge]: https://codecov.io/gh/fulcrumgenomics/prymer/branch/main/graph/badge.svg
46+
[code-coverage-link]: https://codecov.io/gh/fulcrumgenomics/prymer
47+
48+
## Recommended Installation
49+
50+
The package `prymer` requires installation of [Primer3](https://github.com/primer3-org/primer3) and [interactive `bwa`](https://github.com/fulcrumgenomics/bwa-aln-interactive).
51+
52+
To satisfy these requirements, it is recommended to install using [bioconda](https://bioconda.github.io/):
53+
54+
```console
55+
mamba install -c bioconda prymer
56+
```
57+
58+
## Development and Testing
4259

43-
See [Installation](docs/installation.md).
60+
See the [developer's instructions][developers-instructions-link] for more information.
4461

62+
[developers-instructions-link]: https://prymer.readthedocs.io/en/latest/installation-and-developers-documentation.html#installation-for-development

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Python Primer Design Library
44

55
## Documentation Contents
66

7-
* [Installation](installation.md)
7+
* [Installation](installation-and-developers-documentation.md)
88
* [Overview](overview.md)
99
* [API](reference/prymer/index.md)
1010

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Installation and Developer's Documentation
2+
3+
## Recommended Installation
4+
5+
The package `prymer` requires installation of [Primer3](https://github.com/primer3-org/primer3) and [interactive `bwa`](https://github.com/fulcrumgenomics/bwa-aln-interactive).
6+
7+
To satisfy these requirements, it is recommended to install using [bioconda](https://bioconda.github.io/):
8+
9+
```console
10+
mamba install -c bioconda prymer
11+
```
12+
13+
## Installation for Development and Release
14+
15+
1. Install the environment manager [`mamba`](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html)
16+
2. Install the Python build tool [`poetry`](https://python-poetry.org/docs/#installing-with-the-official-installer)
17+
3. Create an environment with Python, [Primer3](https://github.com/primer3-org/primer3), and [interactive `bwa`](https://github.com/fulcrumgenomics/bwa-aln-interactive):
18+
```console
19+
mamba env create -y -f prymer.yml
20+
```
21+
4. Activate the environment:
22+
```console
23+
mamba activate prymer
24+
```
25+
5. Configure `poetry` to install into pre-existing virtual environments:
26+
```console
27+
poetry config settings.virtualenvs.create false
28+
```
29+
6. Install `prymer` into the virtual environment:
30+
```console
31+
poetry install
32+
```
33+
34+
# Checking the Build
35+
36+
Use `poetry` to format, lint, type-check, and test your code.
37+
38+
Note that `poetry run pytest` will run `mypy` and `ruff` checks, `pytest` unit tests, and will provide a unit test coverage report.
39+
40+
```console
41+
poetry run pytest
42+
```
43+
44+
However, `pytest` will neither run the ruff formatter nor apply `ruff`'s automatic lint fixes, which can be done by calling `ruff` directly.
45+
46+
```console
47+
poetry run ruff format && poetry run ruff check --fix
48+
```
49+
50+
# Building the Documentation
51+
52+
Use `mkdocs` to build and serve the documentation.
53+
54+
```console
55+
poetry run mkdocs build && poetry run mkdocs serve
56+
```
57+
58+
# Creating a Release on PyPi
59+
60+
1. Clone the repository recursively and ensure you are on the `main` (un-dirty) branch
61+
2. Checkout a new branch to prepare the library for release
62+
3. Bump the version of the library to the desired SemVer with `poetry version #.#.#`
63+
4. Commit the version bump changes with a Git commit message like `chore(release): bump to #.#.#`
64+
5. Push the commit to the upstream remote, open a PR, ensure tests pass, and seek reviews
65+
6. Squash merge the PR
66+
7. Tag the new commit on the main branch of the origin repository with the new SemVer
67+
68+
> [!NOTE]
69+
> This project follows [Semantic Versioning](https://semver.org/).
70+
> In brief:
71+
>
72+
> * `MAJOR` version when you make incompatible API changes
73+
> * `MINOR` version when you add functionality in a backwards compatible manner
74+
> * `PATCH` version when you make backwards compatible bug fixes
75+
76+
GitHub Actions will take care of the remainder of the deployment and release process with:
77+
78+
1. Unit tests will be run for safety-sake
79+
2. A source distribution will be built
80+
3. Multi-arch multi-Python binary distributions will be built
81+
4. Assets will be deployed to PyPi with the new SemVer
82+
5. A [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)-aware changelog will be drafted
83+
6. A GitHub release will be created with the new SemVer and the drafted changelog
84+
85+
> [!IMPORTANT]
86+
> Consider editing the changelog if there are any errors or necessary enhancements.

docs/installation.md

Lines changed: 0 additions & 102 deletions
This file was deleted.

prymer.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ name: prymer
22
channels:
33
- bioconda
44
- conda-forge
5+
- defaults
56
dependencies:
6-
# Python
7-
- python>=3.11.*
8-
- ruff>=0.2.1
9-
- mypy>=1.8
10-
- pytest>=8.0.0
11-
- pytest-workflow=2.1.0
12-
- poetry=1.7.1
13-
- primer3=2.6.1
14-
- pyproject_hooks=1.0.0
7+
- bioconda::bwa-aln-interactive=0.7.18
8+
- bioconda::primer3=2.6.1
9+
- conda-forge::python>=3.11.*

0 commit comments

Comments
 (0)