Skip to content

Commit 8e61663

Browse files
Format pyproject.toml (#2111)
* Support PEP 639 * Automatically format config file * Fix * update releasehistory --------- Co-authored-by: Jeff Wagner <[email protected]>
1 parent 2a66046 commit 8e61663

File tree

3 files changed

+62
-66
lines changed

3 files changed

+62
-66
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ci:
22
autoupdate_schedule: "quarterly"
3-
files: ^openff|(^examples/((?!deprecated).)*$)|^docs|(^utilities/((?!deprecated).)*$)
3+
files: ^pyproject.toml|openff|(^examples/((?!deprecated).)*$)|^docs|(^utilities/((?!deprecated).)*$)
44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
66
rev: v0.12.11
@@ -13,3 +13,7 @@ repos:
1313
hooks:
1414
- id: blacken-docs
1515
files: ^docs/.*\.(rst|md)$
16+
- repo: https://github.com/tox-dev/pyproject-fmt
17+
rev: v2.7.0
18+
hooks:
19+
- id: pyproject-fmt

docs/releasehistory.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,14 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w
66
* `minor` increments add features but do not break API compatibility
77
* `micro` increments represent bugfix releases or improvements in documentation
88

9-
## Current development
10-
11-
### API-breaking changes
12-
13-
### Behavior changes
9+
## 0.17.1
1410

1511
### Bugfixes
1612
- [PR #2107](https://github.com/openforcefield/openff-toolkit/pull/2107): Fixes [Issue #2093](https://github.com/openforcefield/openff-toolkit/issues/2093), where in rare cases `Topology.from_pdb` would mangle the order/coordinates of loaded atoms, by making it raise a `PDBMoleculeHasNoncontiguousAtomIndicesError` instead.
1713
- [PR #2109](https://github.com/openforcefield/openff-toolkit/pull/2109): Fixes [Issue #2108](https://github.com/openforcefield/openff-toolkit/issues/2108) by updating tests to reflect that smirnoff99Frosst is no longer installed as a dependency of the OpenFF Toolkit.
1814

19-
20-
### New features
21-
2215
### Improved documentation and warnings
23-
16+
- [PR #2111](https://github.com/openforcefield/openff-toolkit/pull/2111): Formats and cleans up pyproject.toml.
2417

2518
## 0.17.0
2619

pyproject.toml

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,59 @@
11
[build-system]
2-
requires = ["setuptools", "versioningit"]
32
build-backend = "setuptools.build_meta"
3+
requires = [ "setuptools>=77.0.3", "versioningit" ]
44

55
[project]
6-
name="openff-toolkit"
6+
name = "openff-toolkit"
77
description = "openff-toolkit"
8-
license = {text = "MIT"}
9-
urls = {Homepage = "https://github.com/openforcefield/openff-toolkit"}
10-
authors = [{name = "Open Force Field Consortium", email = "[email protected]"}]
11-
keywords=["molecular mechanics", "force field", "parameterization",]
12-
classifiers=[
13-
"Development Status :: 3 - Alpha",
14-
"Topic :: Utilities",
15-
"License :: OSI Approved :: MIT",
16-
'Programming Language :: Python :: 3',
17-
]
188
readme = "README.md"
9+
keywords = [ "force field", "molecular mechanics", "parameterization" ]
10+
license = "MIT"
11+
license-files = [ "LICENSE" ]
12+
authors = [ { name = "Open Force Field Consortium", email = "[email protected]" } ]
1913
requires-python = ">=3.11"
20-
dynamic = ["version"]
14+
classifiers = [
15+
"Development Status :: 3 - Alpha",
16+
"Programming Language :: Python :: 3 :: Only",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
20+
"Topic :: Utilities",
21+
]
22+
23+
dynamic = [ "version" ]
24+
urls = { Homepage = "https://github.com/openforcefield/openff-toolkit" }
2125

2226
[tool.setuptools.packages]
2327
find = {}
2428

25-
[tool.versioningit]
26-
2729
[tool.ruff]
2830
line-length = 119
29-
exclude = ["examples/deprecated/", "utilities/deprecated"]
31+
exclude = [ "examples/deprecated/", "utilities/deprecated" ]
3032

31-
[tool.ruff.lint]
32-
ignore = ["E721","D105","D107","D200","D203","D212", "RUF012"]
33-
select = ["I", "E", "F", "W", "NPY", "UP", "RUF"]
34-
35-
[tool.ruff.lint.per-file-ignores]
36-
"openff/toolkit/**/__init__.py" = ["F401"]
37-
"openff/toolkit/_tests/**/*.py" = ["E501"]
38-
"openff/toolkit/typing/engines/smirnoff.parameters.py" = ["RUF012"]
39-
"openff/toolkit/_tests/_stale_tests.py" = ["F821"]
40-
"docs/users/molecule_cookbook.ipynb" = ["F821", "E402"]
41-
"examples/visualization/visualization.ipynb" = ["F821"]
42-
43-
[tool.ruff.lint.isort]
33+
lint.select = [ "E", "F", "I", "NPY", "RUF", "UP", "W" ]
34+
lint.ignore = [ "D105", "D107", "D200", "D203", "D212", "E721", "RUF012" ]
35+
lint.per-file-ignores."docs/users/molecule_cookbook.ipynb" = [ "E402", "F821" ]
36+
lint.per-file-ignores."examples/visualization/visualization.ipynb" = [ "F821" ]
37+
lint.per-file-ignores."openff/toolkit/**/__init__.py" = [ "F401" ]
38+
lint.per-file-ignores."openff/toolkit/_tests/**/*.py" = [ "E501" ]
39+
lint.per-file-ignores."openff/toolkit/_tests/_stale_tests.py" = [ "F821" ]
40+
lint.per-file-ignores."openff/toolkit/typing/engines/smirnoff.parameters.py" = [ "RUF012" ]
41+
lint.isort.known-first-party = [ "openff.toolkit" ]
4442
# can't find a clean way to get Rust's globset to handle this via regex ...
4543
# https://docs.astral.sh/ruff/settings/#lint_isort_known-third-party
46-
known-third-party = ["openff.interchange", "openff.utilities", "openff.units"]
47-
known-first-party = ["openff.toolkit"]
44+
lint.isort.known-third-party = [ "openff.interchange", "openff.utilities", "openff.units" ]
4845

4946
[tool.coverage.run]
5047
omit = [
51-
"*/*/_tests/*",
48+
"*/*/_tests/*",
5249
]
5350

5451
[tool.coverage.report]
5552
exclude_lines = [
56-
"pragma: no cover",
57-
"if TYPE_CHECKING:",
58-
"raise NotImplementedError",
59-
"@overload",
53+
"pragma: no cover",
54+
"if TYPE_CHECKING:",
55+
"raise NotImplementedError",
56+
"@overload",
6057
]
6158

6259
[tool.mypy]
@@ -71,25 +68,27 @@ exclude = "openff/toolkit/_tests/|openff/toolkit/data/"
7168

7269
[[tool.mypy.overrides]]
7370
module = [
74-
"openff.units",
75-
"openff.units.*",
76-
"openff.nagl.*",
77-
"openff.nagl_models.*",
78-
"mdtraj",
79-
"openmm",
80-
"openmm.app",
81-
"openmm.unit",
82-
"rdkit",
83-
"rdkit.Chem",
84-
"rdkit.Chem.Draw",
85-
"rdkit.DataStructs.cDataStructs",
86-
"openeye",
87-
"openeye.oechem",
88-
"parmed",
89-
"msgpack",
90-
"qcelemental",
91-
"nglview",
92-
"nglview.base_adaptor",
93-
"constraint",
71+
"openff.units",
72+
"openff.units.*",
73+
"openff.nagl.*",
74+
"openff.nagl_models.*",
75+
"mdtraj",
76+
"openmm",
77+
"openmm.app",
78+
"openmm.unit",
79+
"rdkit",
80+
"rdkit.Chem",
81+
"rdkit.Chem.Draw",
82+
"rdkit.DataStructs.cDataStructs",
83+
"openeye",
84+
"openeye.oechem",
85+
"parmed",
86+
"msgpack",
87+
"qcelemental",
88+
"nglview",
89+
"nglview.base_adaptor",
90+
"constraint",
9491
]
9592
ignore_missing_imports = true
93+
94+
[tool.versioningit]

0 commit comments

Comments
 (0)