Skip to content

Commit

Permalink
switch to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Lioscro committed Nov 21, 2023
1 parent 8e21711 commit cf6fccc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
- repo: https://github.com/google/yapf
rev: v0.40.2
hooks:
- id: yapf
- repo: https://github.com/pycqa/flake8
rev: 3.9.0
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

test:
rm -f .coverage
nosetests --verbose --with-coverage --cover-package ngs_tools tests/*
pytest -v --cov=ngs_tools tests

check:
flake8 ngs_tools && echo OK
yapf -r --diff ngs_tools && echo OK
pre-commit run --all-files

build:
python setup.py sdist
Expand Down
11 changes: 6 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
bumpversion==0.6.0
coverage==5.1
flake8==3.9.0
nose==1.3.7
pre-commit==2.4.0
coverage>=5.1
flake8==6.1.0
pre-commit>=2.4.0
pytest>=7.4.3
pytest-cov>=4.1.0
sphinx>=3.3.1
sphinx-autoapi>=1.5.1
sphinx_rtd_theme>=0.5.0
twine>=2.0.0
wheel==0.34.2
yapf==0.30.0
yapf==0.40.2
9 changes: 5 additions & 4 deletions ngs_tools/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@
'V': 'B',
}
NUCLEOTIDE_MASKS = {
n: np.array([
_n in NUCLEOTIDES_AMBIGUOUS.get(n, [n]) for _n in NUCLEOTIDES_STRICT
],
dtype=bool)
n:
np.array([
_n in NUCLEOTIDES_AMBIGUOUS.get(n, [n]) for _n in NUCLEOTIDES_STRICT
],
dtype=bool)
for n in NUCLEOTIDES
}
MASK_TO_NUCLEOTIDE = {tuple(mask): n for n, mask in NUCLEOTIDE_MASKS.items()}
Expand Down

0 comments on commit cf6fccc

Please sign in to comment.