-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
143 lines (129 loc) · 4.09 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
# This file is used to configure the project.
# Read more about the various options under:
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[build-system]
requires = ["setuptools >= 61.0", "setuptools_scm"]
build-backend = "setuptools.build_meta"
###############################################################################
# Main library #
###############################################################################
[project]
name = "curvlinops-for-pytorch"
authors = [
{ name = "Felix Dangel" },
{ name = "Runa Eschenhagen" },
{ name = "Lukas Tatzel" },
]
urls = { Repository = "https://github.com/f-dangel/curvlinops" }
description = "scipy Linear operators for curvature matrices in PyTorch"
readme = { file = "README.md", content-type = "text/markdown; charset=UTF-8; variant=GFM" }
license = { text = "MIT" }
# Add all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version"]
# Dependencies of the project:
dependencies = [
"backpack-for-pytorch>=1.6.0,<2.0.0",
"torch>=2.0",
"scipy>=1.7.1,<2.0.0",
"numpy<2.0.0",
"tqdm>=4.61.0,<5.0.0",
"einops",
"einconv",
]
# Require a specific Python version, e.g. Python 2.7 or >= 3.4
requires-python = ">=3.9"
###############################################################################
# Development dependencies #
###############################################################################
[project.optional-dependencies]
# Dependencies needed to run the tests.
test = [
"matplotlib",
"tueplots",
"coveralls",
"pytest",
"pytest-cov",
"pytest-optional-tests",
]
# Dependencies needed for linting.
lint = [
"ruff",
"darglint",
"pydocstyle",
]
# Dependencies needed to build/view the documentation.
docs = [
"memory_profiler",
"transformers",
"tiktoken",
"datasets",
"matplotlib",
"sphinx-gallery",
"sphinx-rtd-theme",
"tueplots"
]
###############################################################################
# Development tool configurations #
###############################################################################
[tool.setuptools_scm]
[tool.pydocstyle]
convention = "google"
match = '.*\.py'
match_dir = '^(?!(test|.git)).*'
[tool.ruff]
line-length = 88
[tool.ruff.lint]
# Enable all rules from flake8 (E, F), plus additional ones including isort (I)
select = ["E", "F", "B", "C", "W", "B9", "PLE", "PLW", "PLR", "I"]
ignore = [
# E501 max-line-length (replaced by B950 (max-line-length + 10%))
"E501",
# C408 use {} instead of dict() (ignored because pytorch uses dict)
"C408",
# E203 whitespace before :
"E203",
# E231 missing whitespace after ','
"E231",
# W291 trailing whitespace
"W291",
# E203 line break before binary operator (replaces W503)
"E203",
# Line break occurred after a binary operator (replaces W504)
"E226",
# B905 `zip()` without an explicit `strict=` parameter
"B905",
# Too many arguments in function definition (9 > 5)
"PLR0913",
# Magic value comparison
"PLR2004",
# Loop variable overwritten by assignment target
"PLW2901",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
exclude = [
".eggs",
".git",
".pytest_cache",
"docs/rtd",
"build",
"dist",
]
[tool.ruff.lint.per-file-ignores]
# Add any per-file ignores here if needed
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["pytest.raises", "pytest.warns", "pytest.mark.skip"]