diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..ec2db7c --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,51 @@ +name: Coverage + +on: + push: + branches: + - master + paths: + - 'web/**' + - 'respro/**' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: coverage-${{ github.ref }} + cancel-in-progress: true + +jobs: + pytest: + name: Pytest + Codecov (Python 3.11) + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + fetch-depth: 2 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: '3.11' + cache: pip + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r web/backend/requirements.txt + python -m pip install -e ".[dev]" + + - name: Run test suite with coverage + run: | + pytest --cov=respro --cov-branch --cov-report=xml --cov-report=term-missing + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v7 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + fail_ci_if_error: false diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 1acb92c..f30e71d 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -76,5 +76,16 @@ markdown_extensions: plugins: - search + - glightbox: + touchNavigation: true + loop: false + effect: zoom + slide_effect: slide + width: 100% + height: auto + zoomable: true + draggable: true + skip_classes: + - respro-no-lightbox - mermaid2: version: 11.4.1 diff --git a/pyproject.toml b/pyproject.toml index 60f0bf6..7cac5df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ [project.optional-dependencies] dev = ['pytest>=7.4', 'pytest-cov>=4.1', 'ruff>=0.1', 'httpx>=0.27', 'fakeredis>=2.0', 'mypy>=1.10'] -docs = ['mkdocs>=1.6', 'mkdocs-material>=9.5', 'mkdocs-mermaid2-plugin>=1.1'] +docs = ['mkdocs>=1.6', 'mkdocs-material>=9.5', 'mkdocs-mermaid2-plugin>=1.1', 'mkdocs-glightbox>=0.4'] [project.scripts] respro = 'respro.cli.main:app' diff --git a/respro/io/genbank.py b/respro/io/genbank.py index e6facaa..f762076 100644 --- a/respro/io/genbank.py +++ b/respro/io/genbank.py @@ -75,7 +75,7 @@ def parse_genbank_sources(genbank_paths: list[Path]) -> list[ParsedGenBankRefere def parse_genbank_records(genbank_path: Path) -> list[ParsedGenBankReference]: """ - Parse one or more GenBank records from a file. + Parse one or more GenBank records from a .gb file. The project stores one internal reference per GenBank record and one feature per CDS feature. Feature identifiers are extracted from the GenBank qualifiers and are