Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
188 lines (157 loc) · 5.27 KB
/
Copy pathpyproject.toml
File metadata and controls
188 lines (157 loc) · 5.27 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
[project]
name = "inspired"
description = "Inelastic Neutron Scattering Prediction for Instantaneous Results and Experimental Design"
dynamic = ["version"]
requires-python = "~=3.12"
license = { text = "GPL-3.0-or-later" }
readme = "README.md"
keywords = ["neutrons", "inelastic", "prediction"]
[project.urls]
homepage = "https://github.com/neutrons/inspired/"
repository = "https://github.com/neutrons/inspired/"
documentation = "https://github.com/neutrons/inspired/"
[project.gui-scripts]
inspired = "inspired.inspired:gui"
[build-system]
requires = [
"hatchling",
"versioningit"
]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "versioningit"
[tool.hatch.build]
artifacts = ["*.yml", "*.yaml", "*.json"]
[tool.hatch.build.hooks.versioningit-onbuild]
source-file = "src/inspired/_version.py"
build-file = "src/inspired/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/inspired"]
[tool.versioningit.vcs]
method = "git"
default-tag = "0.2.0"
[tool.versioningit.next-version]
method = "smallest"
[tool.versioningit.format]
distance = "{next_version}.dev{distance}"
dirty = "{version}"
distance-dirty = "{next_version}.dev{distance}"
[tool.versioningit.write]
file = "src/inspired/_version.py"
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["A", "ARG","ASYNC","BLE","C90", "D", "E", "F", "I", "N", "UP032", "W"]
ignore = ["D203", # conflict with D211
"D213", # conflict with D212
"D205", # conflicts
"D400", "D401","D404", "N806", "N802", "N803", "D107", "D100","D101", "D102","E741", "D415","D414", # Unnecessary
"D104","E402", "N801", "F841","F821","C901","E501","E712", "BLE001","E722","ARG002","A002","N812","C901", # maybe todo
"N815"]
unfixable = ["F401"]
# ------------------ #
# Pixi configuration #
# ------------------ #
[tool.pixi.workspace]
preview = ["pixi-build"] # Need this to access pixi-build feature
platforms = ["linux-64"]
channels = [
"conda-forge",
"https://prefix.dev/pixi-build-backends",
]
[tool.pixi.package]
name = "inspired"
version = "0.0.0" # placeholder, can be updated by task sync-version
[tool.pixi.package.build]
backend = { name = "pixi-build-python", version = "0.4.*" }
[tool.pixi.package.host-dependencies]
hatchling = "*"
versioningit = "*"
[tool.pixi.package.run-dependencies]
#dependencies for the conda package - for inspired to run
pandas = "*"
qtpy = "*"
spglib = "*"
seekpath = "*"
phonopy= "==2.28.0"
phono3py = "*"
python-dateutil= ">=2.1,<3.0.0"
fsspec= "*"
pymatgen="*"
libblas = "*"
liblapack = "*"
[tool.pixi.dependencies]
# Conda package dependencies for the local environment though pixi
pandas = "*"
qtpy = "*"
spglib = "*"
seekpath = "*"
phonopy= "==2.28.0"
phono3py = "*"
python-dateutil= ">=2.1,<3.0.0"
fsspec= "*"
pymatgen="*"
libblas = "*"
liblapack = "*"
[tool.pixi.pypi-dependencies]
# PyPI dependencies for the local environment though pixi
#including this package to allow local editable installs
inspired = { path = ".", editable = true }
torch = "==2.7.1"
torch-geometric = "*"
torch-sparse = "*"
torch-scatter = "*"
torch-cluster = "*"
sevenn = "*"
#e3nn= "==0.5.0"
pyqt5 = "*"
mattersim = ">=1.1.2"
torchvision = "== 0.22.1"
torchaudio = "==2.7.1"
[tool.pixi.pypi-options]
extra-index-urls = ["https://download.pytorch.org/whl/cpu"]
find-links = [{url ="https://pytorch-geometric.com/whl/torch-2.7.0%2Bcpu.html" }]
[tool.pixi.environments]
#environment definitions with feature dependencies
default = { features = ["package", "developer"], solve-group = "default" }
[tool.pixi.feature.package.dependencies]
#conda package
anaconda-client = ">=1.13.0"
check-wheel-contents = ">=0.6.2"
versioningit = ">=3.2.0"
#python package
pip = "*"
[tool.pixi.feature.package.pypi-dependencies]
toml-cli = "*"
#code analysis tools
[tool.pixi.feature.developer.dependencies]
pip = ">=25.1.1"
pip-audit = ">=2.9.0"
pre-commit = ">=4.2.0"
ruff = "*"
codecov = ">=2.1.13"
[tool.pixi.activation.env]
OMP_NUM_THREADS = "1"
[tool.pixi.tasks]
# Packaging
conda-build-command = { cmd = "pixi build", description = "Wrapper for building the conda package - used by `conda-build`" }
conda-build = { description = "Build the conda package", depends-on = [
"sync-version",
"conda-build-command",
"reset-version",
] }
conda-publish = { cmd = "anaconda upload *.conda", description = "Publish the .conda package to anaconda.org", depends-on = [
"conda-build",
] }
# Misc
audit-deps = { cmd = "pip-audit --local -s osv", description = "Audit the package dependencies for vulnerabilities" }
clean = { cmd = 'rm -rf .ruff_cache **/*.egg-info **/dist **/__pycache__ **/_version.py', description = "Clean up various caches and build artifacts" }
clean-conda = { cmd = "rm -f *.conda", description = "Clean the local .conda build artifacts" }
clean-docs = { cmd = "rm -rf docs/_build", description = "Clean up documentation build artifacts" }
clean-all = { description = "Clean all artifacts", depends-on = [
"clean",
"clean-conda",
"clean-docs",
] }
sync-version = { cmd = 'version=$(python -m versioningit); toml set tool.pixi.package.version "$version" --toml-path pyproject.toml', description = "Sync pyproject.toml version with Git version" }
reset-version = { cmd = "toml set tool.pixi.package.version \"0.0.0\" --toml-path pyproject.toml", description = "Reset the package version to 0.0.0" }