Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated environment
  • Loading branch information
charnley committed Nov 24, 2024
commit 4de0e41ec14d3c736502c5edb555066361357c5b
60 changes: 53 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,59 @@
python=./env/bin/python

## Setup

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

## Development

env-qml:
./env/bin/pip install git+https://github.com/qmlcode/qml@develop
update-format:
${python} -m pre_commit autoupdate

format:
${python} -m pre_commit run --all-files

test:
python -m pytest -vrs tests
${python} -m pytest -rs ./tests

test-dist:
${python} -m twine check 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 {}"

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

compile:
${python} _compile.py

build:
${python} -m build --sdist --skip-dependency-check .

upload:
${python} -m twine upload ./dist/*.tar.gz

## Version

## Github

## Clean

clean:
find ./rmsd/ -type f \
-name "*.so" \
-name "*.pyc" \
-name ".pyo" \
-delete
rm -rf ./rmsd/*.egg-info/
rm -rf *.whl
rm -rf ./build/ ./__pycache__/
rm -rf ./dist/

test-cov-html:
python -m pytest -vrs --cov=rmsd --cov-report html tests
clean-env:
rm -rf ./env/
rm ./.git/hooks/pre-commit
11 changes: 3 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ channels:
- defaults
- conda-forge
dependencies:
- matplotlib
- mypy
- numpy
- pre-commit
- pylint
- pytest
- pytest-cov
- scipy
- pip
- pip:
- -r requirements.txt
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "rmsd"
dynamic = ["version"]
authors = []
requires-python = ">=3.9"
readme="README.rst"
description="Calculate Root-mean-square deviation (RMSD) of two molecules, using rotation, in xyz or pdb format "
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Chemistry",
]
keywords = ["pdb", "atoms", "kabsch", "reordering", "rotation", "xyz", "rmsd"]
dependencies=["numpy", "scipy"]

[project.urls]
Homepage = "https://github.com/charnley/rmsd"

[options.packages.find]
where="."

[tool.setuptools]
include-package-data = true

[tool.setuptools.dynamic]
version = {attr = "rmsd.__version__"}
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
numpy
scipy
matplotlib
qmllib
mypy
numpy
pre-commit
pylint
pytest
pytest-cov
scipy
build
twine
2 changes: 1 addition & 1 deletion tests/test_reorder_qml.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import rmsd as rmsdlib

qml = pytest.importorskip("qmllib")
qmllib = pytest.importorskip("qmllib")


def test_reorder_qml() -> None:
Expand Down