-
Notifications
You must be signed in to change notification settings - Fork 217
Expand file tree
/
Copy pathpyproject.toml
More file actions
197 lines (177 loc) · 5.18 KB
/
Copy pathpyproject.toml
File metadata and controls
197 lines (177 loc) · 5.18 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
189
190
191
192
193
194
195
196
197
[build-system]
requires = ["hatchling>=1.8.0", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "NetKet"
description = "Netket : Machine Learning toolbox for many-body quantum systems."
authors = [
{ name = "Giuseppe Carleo" },
{ name = "Filippo Vicentini" },
{ name = "The NetKet authors" },
]
license = { text = "Apache 2.0" }
readme = "README.md"
keywords = [
"Machine Learning",
"Quantum",
"Neural Networks",
"Neural Quantum States",
"Jax",
"Monte Carlo",
]
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Topic :: Scientific/Engineering :: Physics",
]
dynamic = ["version"]
requires-python = ">=3.11"
dependencies = [
"numpy>=1.20,<3.0",
"scipy>=1.5.3, <2",
"tqdm>=4.60, <5",
"rich>=12.0",
"numba>=0.59",
"igraph>=0.10.0",
# jax 0.11.2 breaks flax 0.12.9 (google/flax#5596). Remove once flax is fixed.
"jax>=0.7.0,<0.11.2",
"equinox>=0.12.2",
"flax>=0.10.6",
"orjson>=3.10.7, <4",
"optax>=0.2.2, <0.3",
"plum-dispatch>=2.4",
"sparse>=0.12.0",
"einops>=0.8.1",
]
[project.optional-dependencies]
cuda = ["jax[cuda12]; sys_platform == 'linux'"]
pyscf = ["pyscf>=2.0"]
extra = ["tensorboardx>=2.0.0", "openfermion>=1.0.0", "h5py>=3.7.0", "qutip>=4", "mlflow>=2.0.0", "jaxmg>=0.0.9,<1.0.0; sys_platform == 'linux'"]
dev = [
"networkx>=2.4",
"matplotlib>=3",
"pytest>=6",
"pytest-xdist[psutil]>=2",
"pytest-cov>=2.10.1",
"pytest-json-report>=1.3",
"coverage>=5",
"pre-commit>=2.7",
"black==25.1.0",
"ruff==0.14.1",
"qutip>=5",
"wheel>=0.38.1",
"build>=1",
]
docs = [
"Sphinx>=8.2.3,<9.2.0",
"sphinx-design>=0.4.0",
"sphinx-autodoc-typehints>=1.22,<4.0",
"sphinxcontrib-fulltoc~=1.2.0",
"sphinxcontrib-jsmath~=1.0.1",
"myst-parser>=2.0.0,<5.2.0",
"myst-nb>=1.0,<1.5",
"sphinx-book-theme>=1.1,<1.5",
"sphinx-copybutton>=0.5.2",
"nbconvert>=7.16.6",
"ipywidgets>=8.1.7",
]
[dependency-groups]
dev = [
"netket[pyscf,extra,dev,docs]",
"ipykernel>=6.20",
"pyscf>=2.9.0",
]
docs = [
"netket[docs]"
]
[project.scripts]
djaxrun = "netket.tools.djaxrun:main"
netket-cite = "netket.utils.citations.cli:cite_cli"
[project.urls]
homepage = "https://www.netket.org"
documentation = "https://netket.readthedocs.io/en/latest/#"
repository = "https://github.com/netket/netket"
changelog = "https://netket.readthedocs.io/en/latest/docs/changelog.html"
[tool.hatch.build]
include = ["netket*"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "netket/_version.py"
# Development tools
[tool.black]
line-length = 88
target-version = ['py311', 'py312', 'py313']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.coverage.run]
branch = true
parallel = true
concurrency = ["multiprocessing"]
command_line = "-m pytest --verbose test"
source = ["netket"]
[tool.pytest.ini_options]
addopts = "--color=yes --verbose --durations=50 -n auto --tb=short --import-mode=importlib"
doctest_optionflags = "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL NUMBER"
markers = [
"slow: marks tests as slow (deselected by default in CI)",
]
filterwarnings = [
"ignore::UserWarning",
"ignore:No GPU/TPU found, falling back to CPU.:UserWarning",
"ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning",
"ignore:`np.long`",
"ignore:`np.int` is a deprecated alias for the builtin `int`",
"ignore::DeprecationWarning:tensorboardX",
"ignore:jax.core.Effect is deprecated. Use jax.extend.core.Effect.:DeprecationWarning:flax.nnx.variablelib",
"ignore:jax.core.get_opaque_trace_state is deprecated. Use jax.extend.core.get_opaque_trace_state.:DeprecationWarning:flax.core.tracers",
"ignore:jax.random.KeyArray is deprecated.",
"ignore:Raw arrays as random keys to",
"ignore:Defaulting to `holomorphic=False`,",
"ignore::PendingDeprecationWarning: the matrix subclass",
"ignore::netket.errors.HolomorphicUndeclaredWarning",
"ignore::netket.errors.UnoptimalSRtWarning",
"ignore::netket.errors.InitializePeriodicLatticeOnSmallLatticeWarning",
]
testpaths = ["test"]
[tool.ruff]
target-version = "py311"
line-length = 88
exclude = ["Examples", "docs/conf.py", "*.ipynb"]
[tool.ruff.lint]
select = ["E", "F", "W", "D410", "UP", "TID252", "TC010"]
fixable = ["E", "F", "W", "D", "UP"]
ignore = ["E501", "E731", "E721", "E701", "E741", "UP007", "UP035"]
#ignore = ["E266"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"netket/nn/activation.py" = ["F401"]
"Examples/" = ["F401"]
"docs/sphinx_extensions/*" = ["UP", "D"]
"!netket/utils/*.py" = ["TID252"]
[tool.mypy]
show_error_codes = true
disable_error_code = "attr-defined, name-defined, annotation-unchecked, import-untyped"
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = ["netket"]
ignore_missing_imports = true