-
Notifications
You must be signed in to change notification settings - Fork 21
/
pyproject.toml
183 lines (148 loc) · 4.01 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
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
[build-system]
requires = [
"setuptools >= 35.0.2",
"wheel >= 0.29.0",
"setuptools_scm[toml]==7.0.5",
]
build-backend = "setuptools.build_meta"
[project]
name = "mygrad"
dynamic = ["version"]
description = "Drop-in automatic differentiation to NumPy"
readme = "README.md"
requires-python = ">=3.9"
dependencies = ["numpy >= 1.24, !=1.25.0", "typing-extensions >= 4.1.0, !=4.6.0"]
license = { text = "MIT" }
authors = [
{ name = "Ryan Soklaski", email = "[email protected]" },
]
maintainers = [{ name = "Ryan Soklaski", email = "[email protected]" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
[project.optional-dependencies]
test = ["pytest >= 3.8", "hypothesis >= 6.17.1", "scipy"]
rnn = ["numba>=0.34.0"]
[project.urls]
"Homepage" = "https://mygrad.readthedocs.io/en/latest/"
"Bug Reports" = "https://github.com/rsokl/MyGrad/issues"
"Source" = "https://github.com/rsokl/MyGrad"
[tool.setuptools_scm]
write_to = "src/mygrad/_version.py"
version_scheme = "no-guess-dev"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests*", "tests.*"]
[tool.setuptools.package-data]
mygrad = ["py.typed"]
[tool.isort]
known_third_party = ["graphviz", "hypothesis", "numpy", "numba", "pytest", "scipy"]
known_first_party = ["mygrad", "tests"]
profile = "black"
src_paths=["src/mygrad","tests"]
[tool.coverage.run]
omit = ["src/mygrad/_version.py", "src/mygrad/computational_graph.py"]
[tool.coverage.report]
omit = ["src/mygrad/_version.py"]
[tool.codespell]
skip = ["*.po","*.ts","**/_version.py","docs/source/generated/*"]
ignore-words-list = ["ND","nd","nin","dout"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py39,py310,py311,py312,format,min_numpy
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv]
deps =
pytest
hypothesis
scipy
pytest-xdist
commands = pytest -n auto --hypothesis-profile ci \
{posargs}
extras = rnn
[testenv:min_numpy]
deps = numpy==1.24
{[testenv]deps}
basepython = python3.9
commands = pytest -n auto --hypothesis-profile ci \
{posargs}
extras =
[testenv:py310]
deps = {[testenv]deps}
commands = pytest -n auto --hypothesis-profile ci \
{posargs}
extras =
[testenv:py311]
deps = {[testenv]deps}
commands = pytest -n auto --hypothesis-profile ci \
{posargs}
extras =
[testenv:py312] # exclude numba dependency for now
deps = pytest
pytest-xdist
hypothesis
scipy
commands = pytest -n auto --hypothesis-profile ci \
{posargs}
extras =
[testenv:coverage]
setenv = NUMBA_DISABLE_JIT=1
MYGRAD_COVERAGE_MODE=1
usedevelop = true
basepython = python3.10
deps = {[testenv]deps}
coverage
pytest-cov
commands = pytest -n auto --cov-report term-missing --cov-config=pyproject.toml --cov-fail-under=100 --cov=mygrad tests
[testenv:format]
deps =
autoflake
black
isort
commands =
autoflake --recursive --in-place --remove-duplicate-keys --remove-unused-variables .
isort .
black .
[testenv:pre-release] # test against pre-releases of dependencies
pip_pre = true
deps = pytest
hypothesis
scipy
pytest-xdist
basepython = python3.11
commands = pytest -n auto --hypothesis-profile ci \
{posargs}
extras =
[testenv:enforce-format]
skip_install=true
basepython=python3.11
deps=black
isort
flake8
pytest
codespell
commands=
black src/ tests/ --diff --check
isort src/ tests/ --diff --check
flake8 src/ tests/
codespell src/ docs/
"""