Skip to content

Commit

Permalink
Run test update
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Nov 24, 2024
1 parent 19cbe8a commit df17fe6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# dev
.vim
env
*.sqlite3

*.py[cod]

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
python=./env/bin/python
pytest=./env/bin/pytest
package=rmsd

## Setup

env:
conda env create -f ./environment.yaml -p ./env --quiet
conda env create -f ./environment.yml -p ./env --quiet
${python} -m pre_commit install
${python} -m pip install -e .

Expand All @@ -23,10 +25,10 @@ test-dist:

types:
${python} -m monkeytype run $$(which ${pytest}) ./tests
${python} -m monkeytype list-modules | grep ${pkg} | parallel -j${j} "${python} -m monkeytype apply {} > /dev/null && echo {}"
${python} -m monkeytype list-modules | grep ${package} | parallel -j1 "${python} -m monkeytype apply {} > /dev/null && echo {}"

cov:
${python} -m pytest --cov=${pkg} --cov-config .coveragerc --cov-report html tests
${python} -m pytest --cov=${package} --cov-config .coveragerc --cov-report html tests

compile:
${python} _compile.py
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
numpy
scipy
scipy-stubs
matplotlib
qmllib
mypy
Expand Down
18 changes: 9 additions & 9 deletions rmsd/calculate_rmsd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
__doc__ = """
Calculate Root-mean-square deviation (RMSD) between structure A and B, in XYZ
or PDB format, using transformation and rotation.
Expand All @@ -19,16 +19,16 @@

import numpy as np
from numpy import ndarray
from scipy.optimize import linear_sum_assignment # type: ignore
from scipy.spatial import distance_matrix # type: ignore
from scipy.spatial.distance import cdist # type: ignore
from scipy.optimize import linear_sum_assignment
from scipy.spatial import distance_matrix
from scipy.spatial.distance import cdist

try:
import qmllib # type: ignore
from qmllib.kernels import laplacian_kernel # type: ignore
from qmllib.representations import generate_fchl19 # type: ignore
except ImportError: # pragma: no cover
qmllib = None # pragma: no cover
except ImportError:
qmllib = None


METHOD_KABSCH = "kabsch"
Expand Down Expand Up @@ -1939,8 +1939,8 @@ def main(args: Optional[List[str]] = None) -> str:
use_view: bool = True

if settings.ignore_hydrogen:
p_view = np.where(p_atoms != 1) # type: ignore
q_view = np.where(q_atoms != 1) # type: ignore
(p_view,) = np.where(p_atoms != 1)
(q_view,) = np.where(q_atoms != 1)

elif settings.remove_idx:
index = np.array(list(set(range(p_size)) - set(settings.remove_idx)))
Expand Down Expand Up @@ -2088,5 +2088,5 @@ def main(args: Optional[List[str]] = None) -> str:


if __name__ == "__main__":
result = main() # pragma: no cover
result = main()
print(result)

0 comments on commit df17fe6

Please sign in to comment.