generated from catalyst-cooperative/cheshire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
173 lines (161 loc) · 5.33 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "rmi.dispatch"
description = "A simple and efficient dispatch model."
license = {file = "LICENSE.txt"}
readme = "README.rst"
dynamic = ["version"]
classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.10,<3.13"
dependencies = [
"bottleneck >= 1.3,< 1.4.3",
"numba >= 0.60.0,< 0.61",
"numexpr >= 2.8, < 2.10.3",
"numpy >= 1.18.5,< 3",
"pandas >= 1.4,< 2.3",
"pandera >= 0.20.1, < 0.23",
"pyarrow>=7, <19",
"rmi.etoolbox @ git+https://github.com/rmi/etoolbox.git",
]
[project.optional-dependencies]
dev = [
"ruff>0.0.215,<0.8.5",
"tox>=4.16.0,<4.24",
"twine>=3.3,<6.1", # Used to make releases to PyPI
]
doc = [
"doc8>=0.9,<1.2",
"furo>=2023.09.10",
"sphinx>=4,!=5.1.0,<8.1.4",
"sphinx-autoapi>=1.8,<3.5",
"sphinx-issues>=1.2,<5.1",
"sphinx-autodoc-typehints>1.19,<2.6.0",
"sphinxcontrib-mermaid>0.7,<1.1.0",
]
tests = [
"coverage>=5.3,<7.7",
"doc8>=0.9,<1.2",
"pre-commit>=2.9,<4.1",
"pytest>=6.2,<8.4",
"pytest-console-scripts>=1.1,<1.5",
"pytest-cov>=2.10,<6.1",
"rstcheck[sphinx,toml]>=5.0,<6.3",
"ruff>0.0.215,<0.8.5",
"tox>=4.16.0,<4.24",
]
viz = [
"plotly>5.10,<5.25",
"kaleido>0.2,<0.2.2",
]
[tool.setuptools.dynamic]
version = {attr = "dispatch._version.__version__"}
[tool.setuptools_scm]
version_file = "src/dispatch/_version.py"
#######################################################################################
# Configurations for linters and other tools
#######################################################################################
[tool.doc8]
max-line-length = 88
ignore-path = "docs/_build"
[tool.pytest.ini_options]
testpaths = ["."]
addopts = ["--verbose", "--doctest-modules"]
log_format = "%(asctime)s [%(levelname)8s] %(name)s:%(lineno)s %(message)s"
log_date_format=" %Y-%m-%d %H:%M:%S"
log_cli = true
log_cli_level = "INFO"
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL", "ELLIPSIS"]
filterwarnings = [
"ignore:distutils Version classes are deprecated:DeprecationWarning",
"ignore:Creating a LegacyVersion:DeprecationWarning:pkg_resources[.*]",
]
[tool.rstcheck]
report_level = "WARNING"
ignore_roles = ["pr", "issue", "user", "include"]
ignore_messages = '(Hyperlink target .* is not referenced\.$|Duplicate implicit target name:|An `AttributeError` error occured.*)'
ignore_directives = ["bibliography", "todo", "include"]
[tool.ruff]
line-length = 88
show-fixes = true
[tool.ruff.format]
# Enable reformatting of code snippets in docstrings.
docstring-code-format = true
[tool.ruff.lint]
select = [ # https://beta.ruff.rs/docs/rules/
"A", # flake8-builtins
"B", # flake8-bugbear
"C",
"C4", # flake8-comprehensions
"D", # flake8-docstrings
"E", # pycodestyle
"F", # Pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"TID", # flake8-tidy-imports
"N", # pep8-naming
"PD", # pandas
"PT", # flake8-pytest-style
"PGH", # pygrep-hooks
"S", # bandit
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle
"RUF", # Ruff-specific rules
"Q", # flake8-quotes
]
ignore = [
"D105",
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line of docstring should be in imperative mood: "{first_line}"
"D407", # dashed-underline-after-section, upsets Sphinx
"D416",
"D417",
"E501", # black handles code line length
# conflict with ruff format
"W191", # tab-indentation
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
]
flake8-tidy-imports.ban-relative-imports = "all"
flake8-type-checking.strict = true
mccabe.max-complexity = 15 # Unlike Flake8, default to a complexity level of 10.
pycodestyle.max-doc-length = 88
pydocstyle.convention = "google"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"docs/conf.py" = ["E501"]
"engine.py" = ["E501", "B905", "S101"]
"model.py" = [
"E501",
"W505", # Doc line too long, these are in doctest lines
# to clean up later
"PD010", # `.pivot_table` is preferred to `.pivot` or `.unstack`; provides same functionality
"PD013", # `.melt` is preferred to `.stack`; provides same functionality
"PD901", # `df` is a bad variable name. Be kinder to your future self.
]
"tests/*.py" = ["S101", "SIM117", "F841", "D101", "PD901", "FBT003"]
"tests/engine_test.py" = ["E501"]