generated from njzjz/python-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
124 lines (108 loc) · 2.91 KB
/
pyproject.toml
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
[build-system]
requires = [
"scikit-build-core>=0.3.0",
]
build-backend = "build_backend.dp_backend"
backend-path = ["."]
[project]
name = "deepmd-gnn"
dynamic = ["version"]
description = "DeePMD-kit plugin for graph neural network models."
authors = [
{ name = "Jinzhe Zeng", email = "[email protected]"},
]
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
dependencies = [
"torch",
"deepmd-kit[torch]>=3.0.0b2",
"mace-torch>=0.3.5",
"nequip",
"e3nn",
"dargs",
]
requires-python = ">=3.9"
readme = "README.md"
keywords = [
]
[project.scripts]
[project.entry-points."deepmd.pt"]
mace = "deepmd_gnn.mace:MaceModel"
nequip = "deepmd_gnn.nequip:NequipModel"
[project.urls]
repository = "https://github.com/njzjz/deepmd-gnn"
[project.optional-dependencies]
test = [
'pytest',
'pytest-cov',
"dargs>=0.4.8",
]
[tool.scikit-build]
wheel.py-api = "py2.py3"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = [
"/deepmd_gnn/_version.py",
]
[tool.scikit-build.cmake.define]
BUILD_PY_IF = true
BUILD_CPP_IF = false
[tool.setuptools_scm]
version_file = "deepmd_gnn/_version.py"
[tool.ruff.lint]
select = [
"ALL",
]
ignore = [
"PLR0912",
"PLR0913", # Too many arguments in function definition
"PLR0915",
"PLR2004",
"FBT001",
"FBT002",
"N803",
"FA100",
"S603",
"ANN101",
"ANN102",
"C901",
"E501",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"S101", # asserts allowed in tests...
"ANN",
"D101",
"D102",
]
[tool.coverage.report]
include = ["deepmd_gnn/*"]
[tool.cibuildwheel]
test-command = [
"""python -c "import deepmd_gnn.op" """,
]
build = ["cp312-*"]
skip = ["*-win32", "*-manylinux_i686", "*-musllinux*"]
manylinux-x86_64-image = "manylinux_2_28"
[tool.cibuildwheel.macos]
repair-wheel-command = """delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} --ignore-missing-dependencies"""
[tool.cibuildwheel.linux]
repair-wheel-command = "auditwheel repair --exclude libc10.so --exclude libtorch.so --exclude libtorch_cpu.so -w {dest_dir} {wheel}"
environment-pass = [
"CIBW_BUILD",
]
[tool.cibuildwheel.linux.environment]
# use CPU version of torch for building, which should also work for GPU
# note: uv has different behavior from pip on extra index url
# https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY.md#packages-that-exist-on-multiple-indexes
UV_EXTRA_INDEX_URL = "https://download.pytorch.org/whl/cpu"