Skip to content

Commit 8a13cc7

Browse files
authored
build: update misc configs from software template (#60)
1 parent 93af1ea commit 8a13cc7

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.github/workflows/checks.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ jobs:
1414
with:
1515
python-version: ${{ matrix.python-version }}
1616

17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
19+
with:
20+
enable-cache: true
21+
1722
- name: Install dependencies
18-
run: python3 -m pip install ".[tests]"
23+
run: uv sync --extra tests
1924

2025
- name: Run tests
21-
run: python3 -m pytest tests/
26+
run: uv run pytest
2227
python-lint:
2328
runs-on: ubuntu-latest
2429
steps:
@@ -29,11 +34,16 @@ jobs:
2934
with:
3035
python-version: 3.11
3136

37+
- name: Install uv
38+
uses: astral-sh/setup-uv@v6
39+
with:
40+
enable-cache: true
41+
3242
- name: Install dependencies
33-
run: python3 -m pip install ".[dev]"
43+
run: uv sync --extra dev
3444

3545
- name: Check style
36-
run: python3 -m ruff check . && ruff format --check .
46+
run: uv run ruff check && uv run ruff format --check
3747
rust-lint:
3848
runs-on: ubuntu-latest
3949
defaults:

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ classifiers = [
1717
"Programming Language :: Python :: 3.13",
1818
"Topic :: Scientific/Engineering :: Bio-Informatics",
1919
"Intended Audience :: Science/Research",
20-
"License :: OSI Approved :: MIT License",
2120
]
2221
requires-python = ">=3.11"
2322
description = "Another Genome Conversion Tool: Python frontend to Rust chainfile crate"
24-
license = {file = "LICENSE"}
23+
license = "MIT"
24+
license-files = ["LICENSE"]
2525
dependencies = ["wags-tails"]
2626

2727
[project.optional-dependencies]
@@ -121,6 +121,7 @@ fixable = [
121121
"FURB",
122122
"RUF"
123123
]
124+
# ANN003 - missing-type-args
124125
# ANN003 - missing-type-kwargs
125126
# ANN101 - missing-type-self
126127
# ANN102 - missing-type-cls
@@ -140,7 +141,7 @@ fixable = [
140141
# PLC0206 - dict-index-missing-items
141142
# *ignored for compatibility with formatter
142143
ignore = [
143-
"ANN003",
144+
"ANN002", "ANN003",
144145
"D203", "D205", "D206", "D213", "D300", "D400", "D415",
145146
"E111", "E114", "E117", "E501",
146147
"W191",

tests/test_converter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
"""Module for testing Converter initialization"""
22

33
import re
4+
from pathlib import Path
45

56
import pytest
6-
from tests.conftest import DATA_DIR
77

88
from agct import Converter, Genome
99

1010

11-
def test_valid():
11+
def test_valid(data_dir: Path):
1212
"""Test valid initialization"""
1313
assert Converter(
14-
chainfile=str(DATA_DIR / "ucsc-chainfile" / "chainfile_hg19_to_hg38_.chain")
14+
chainfile=str(data_dir / "ucsc-chainfile" / "chainfile_hg19_to_hg38_.chain")
1515
)
1616

1717

@@ -20,7 +20,9 @@ def test_invalid():
2020
with pytest.raises(ValueError, match="Must provide both `from_db` and `to_db`"):
2121
Converter()
2222

23-
with pytest.raises(ValueError, match="Liftover must be to/from different sources."):
23+
with pytest.raises(
24+
ValueError, match=re.escape("Liftover must be to/from different sources.")
25+
):
2426
Converter(Genome.HG19, Genome.HG19)
2527

2628
with pytest.raises(

0 commit comments

Comments
 (0)