-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (149 loc) · 5.33 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (149 loc) · 5.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[project]
name = "molcrafts-molpy"
dynamic = ["version"]
description = "Modern Python framework for molecular simulation and analysis"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "BSD-3-Clause" }
authors = [{ name = "Roy Kid", email = "lijichen365@gmail.com" }]
maintainers = [{ name = "Roy Kid", email = "lijichen365@gmail.com" }]
keywords = [
"molecular-simulation",
"computational-chemistry",
"molecular-dynamics",
"force-fields",
"scientific-computing",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Chemistry",
"Typing :: Typed",
]
# Runtime: numpy (scientific baseline) + MolCrafts ecosystem only.
# No lark / zarr / RDKit / etc. as hard deps — those live in molrs or optional extras.
dependencies = [
"numpy>=2.0",
"molcrafts-molrs>=0.14.0,<0.15",
"molcrafts-mollog>=1.0.0",
"molcrafts-molcfg>=1.2.0",
]
[project.optional-dependencies]
dev = [
"pytest>=6.0.0",
"pytest-xdist>=3.0",
"ruff==0.16.1",
"ty==0.0.65",
"tox>=4.23",
]
rdkit = ["rdkit"] # optional: exercises the RDKitAdapter example only
doc = [
"zensical>=0.0.53",
# 0.2.9: equal chart margins + plain VL fences (no annotation passthrough).
# 0.2.8+ required for ``$file`` data refs in molplot fences.
"molcrafts-zensical-theme>=0.2.9",
"mkdocstrings[python]>=0.24.0",
]
all = ["molcrafts-molpy[dev,doc]"]
[project.scripts]
molpy = "molpy.cli:main"
# Formats molpy owns, published for any molcrafts viewer to read. Declaring
# them here rather than importing a host keeps the arrow one-way: molpy says
# what it can parse, and a platform picks it up at install time.
[project.entry-points."molcrafts.metric_readers"]
lammps_log = "molpy.integrations.metric_readers:LammpsLogReader"
mrec = "molpy.integrations.metric_readers:MrecReader"
mlp_jsonl = "molpy.integrations.metric_readers:MlpJsonlReader"
[project.urls]
Homepage = "https://github.com/MolCrafts/molpy"
Documentation = "https://molpy.molcrafts.org"
Repository = "https://github.com/MolCrafts/molpy.git"
Issues = "https://github.com/MolCrafts/molpy/issues"
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.dynamic]
version = { attr = "molpy.version.version" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"molpy.data" = ["README.md"]
"molpy.data.forcefield" = ["*.xml", "*.ff"]
[tool.ruff]
# Matches requires-python: the lint gate must reject syntax the floor
# (3.12) cannot parse — PEP 758 `except A, B:` slipped in exactly this way.
target-version = "py312"
line-length = 88
[tool.ruff.lint]
# Keep the historical default-style gate (E4/E7/E9/F); ruff 0.16 still honors
# an explicit select so we do not inherit future default expansions mid-release.
select = ["E4", "E7", "E9", "F", "RUF100"]
# E402: readers/writers import lazily inside functions by design (layering);
# E741: single-letter names in the maths-heavy kernels stay.
ignore = ["E402", "E741"]
[tool.ty.environment]
python-version = "3.14"
root = ["./src"]
[tool.ty.rules]
all = "warn"
# ty 0.0.65 is stricter; keep release gate green while types catch up.
missing-override-decorator = "ignore"
missing-type-argument = "ignore"
unresolved-import = "ignore"
invalid-argument-type = "ignore"
invalid-assignment = "ignore"
invalid-method-override = "ignore"
invalid-return-type = "ignore"
unsupported-operator = "ignore"
not-iterable = "ignore"
unknown-argument = "ignore"
invalid-type-arguments = "ignore"
not-subscriptable = "ignore"
index-out-of-bounds = "ignore"
no-matching-overload = "ignore"
missing-argument = "ignore"
division-by-zero = "ignore"
invalid-parameter-default = "ignore"
too-many-positional-arguments = "ignore"
invalid-type-form = "ignore"
call-non-callable = "ignore"
redundant-cast = "ignore"
[tool.ty.terminal]
output-format = "full"
[tool.pytest.ini_options]
testpaths = ["tests"]
# No __init__.py under tests/: same basenames (four test_lammps.py) resolve by path.
addopts = "--import-mode=importlib"
pythonpath = ["src"]
filterwarnings = [
"error",
"ignore::pytest.PytestUnraisableExceptionWarning",
]
# No [tool.uv.sources] override: molcrafts-molrs 0.14.0 is on PyPI, so the pin in
# [project] dependencies resolves everywhere, including a CI runner, which has no
# sibling checkout to point at. Do not reintroduce a path or git source without
# removing it again before the next release: it silently disables
# .pre-commit/check_molrs_pin_on_pypi.py, and uv honours a path dependency's own
# sources transitively, so a downstream that points at this directory inherits
# them (that is how molhub once got a molrs without `molrs.io.mrec`).
[tool.tox]
requires = ["tox>=4.23"]
env_list = ["lint"]
[tool.tox.env.lint]
skip_install = true
base_python = ["python3.14"]
deps = ["ruff==0.16.1", "ty==0.0.65"]
commands = [
["ruff", "format", "--check", "src/", "tests/"],
["ruff", "check", "src/", "tests/"],
["ty", "check", "src/molpy/"],
]