Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 0 additions & 15 deletions .coveragerc

This file was deleted.

5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503
max-line-length = 88
max-complexity = 18
select = B,C,E,F,W,T4
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python -m pip install flake8
- name: Install package
run: |
python setup.py develop --no-deps
python -m pip install -e . --no-deps
- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
python -m pip install types-requests
- name: Install package
run: |
python setup.py develop --no-deps
python -m pip install -e . --no-deps
- name: Lint with mypy
run: |
mypy
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ Contributors: @RMeli
### Added

* Python `3.13` and `3.14` in CI [PR #147 | @RMeli]
* Optional dependencies for testing (`test`), development (`dev`), and parallelization (`parallel`) in `pyproject.toml` [PR #152 | @copilot]
Comment thread
RMeli marked this conversation as resolved.

### Changed

* Migrated all package configuration from `setup.cfg` and `setup.py` to `pyproject.toml` [PR #152 | @copilot]

### Removed

* support for Open Babel [PR #151 | @RMeli]
* Python `3.9` and `3.10` from CI [PR #147 | @RMeli]
* `setup.cfg` and `setup.py` in favour of `pyproject.toml` [PR #152 | @copilot]
Comment thread
RMeli marked this conversation as resolved.

## Version 0.9.0

Expand Down
87 changes: 78 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,84 @@
requires = ["flit_core >=2,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.metadata]
module = "spyrmsd"
dist-name = "spyrmsd"
description-file = "README.md"
author = "Rocco Meli"
author-email = "rocco.meli@cscs.ch"
home-page = "https://spyrmsd.readthedocs.io"
[project]
name = "spyrmsd"
version = "0.10.0-dev"
description = "Python tool for symmetry-corrected RMSD"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Rocco Meli", email = "r.meli@bluemail.ch"}
Comment thread
RMeli marked this conversation as resolved.
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",]
"Programming Language :: Python :: 3",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
]
requires-python = ">=3.9"
Comment thread
RMeli marked this conversation as resolved.
requires = ["numpy", "scipy", "rustworkx"]
dependencies = ["numpy", "scipy", "rustworkx"]

[project.urls]
Homepage = "https://spyrmsd.readthedocs.io"

[project.optional-dependencies]
bib = ["duecredit"]
rdkit = ["rdkit"]
networkx = ["networkx"]
parallel = ["pebble"]
test = [
"pytest",
"pytest-cov",
"pytest-benchmark",
"requests",
]
dev = [
"mypy",
"types-requests",
"flake8",
"black",
"isort",
"pre-commit",
]

[tool.flit.module]
name = "spyrmsd"

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers"
markers = [
"slow",
]

[tool.coverage.run]
source = ["spyrmsd"]
omit = [
"spyrmsd/_version.py",
"spyrmsd/due.py",
"*/tests/*",
]

[tool.coverage.report]
exclude_lines = [
"# Don't complain if tests don't hit defensive assertion code:",
"raise AssertionError",
"raise NotImplementedError",
"# Don't complain if non-runnable code isn't run:",
"if 0:",
"if __name__ == .__main__.:",
]

[tool.mypy]
files = ["spyrmsd", "tests"]
ignore_missing_imports = true

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
33 changes: 0 additions & 33 deletions setup.cfg

This file was deleted.

39 changes: 0 additions & 39 deletions setup.py

This file was deleted.

14 changes: 8 additions & 6 deletions tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ def test_match_graphs_not_isomorphic_lattice(n) -> None:
G1 = graph.lattice(n, n)
G2 = graph.lattice(n + 1, n)

with pytest.raises(
NonIsomorphicGraphs, match=gc.error_non_isomorphic_graphs
), pytest.warns(UserWarning, match=gc.warn_no_atomic_properties):
with (
pytest.raises(NonIsomorphicGraphs, match=gc.error_non_isomorphic_graphs),
pytest.warns(UserWarning, match=gc.warn_no_atomic_properties),
):
graph.match_graphs(G1, G2)


Expand All @@ -134,9 +135,10 @@ def test_match_graphs_not_isomorphic_cycle(n) -> None:
G1 = graph.cycle(n)
G2 = graph.cycle(n + 1)

with pytest.raises(
NonIsomorphicGraphs, match=gc.error_non_isomorphic_graphs
), pytest.warns(UserWarning, match=gc.warn_no_atomic_properties):
with (
pytest.raises(NonIsomorphicGraphs, match=gc.error_non_isomorphic_graphs),
pytest.warns(UserWarning, match=gc.warn_no_atomic_properties),
):
graph.match_graphs(G1, G2)


Expand Down
Loading