-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
203 lines (180 loc) · 5.85 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=66,<69",
"setuptools_scm[toml]>=3.5.0",
"wheel",
]
[project]
# This should be the *installed* package name e.g. catalystcoop.pudl not pudl
name = "catalystcoop.cheshire"
description = "Replace this text with a one line description of the package."
readme = {file = "README.rst", content-type = "text/x-rst"}
authors = [
{name = "Catalyst Cooperative", email = "pudl@catalyst.coop"}
]
requires-python = ">=3.10,<3.12"
dynamic = ["version"]
license = {file = "LICENSE.txt"}
dependencies = [
"pandas[parquet,excel,fss,gcp,compression]>=2,<3",
"pydantic[email]>=2,<3",
"sqlalchemy>=2,<3",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
keywords = [
"template",
"testing",
"linting",
"github actions",
"continuous integration",
"continuous delivery",
]
[project.scripts]
# "script_name = dotted.module.path.to:main_script_function",
winston = "cheshire.cli:main"
[project.urls]
# "Homepage" = ""
"Source" = "https://github.com/catalyst-cooperative/cheshire"
"Documentation" = "https://catalystcoop-cheshire.readthedocs.io"
"Issue Tracker" = "https://github.com/catalyst-cooperative/cheshire/issues"
[project.optional-dependencies]
dev = [
"build>=1,<2", # The setuptools package builder
"black>=22,<24", # A deterministic code formatter
"tox>=4,<5", # Python test environment manager
"twine>=4,<5", # Used to make releases to PyPI
]
docs = [
"doc8>=1,<2", # Ensures clean documentation formatting
"furo>=2022.4.7",
"sphinx>=6,<8", # The default Python documentation engine
"sphinx-autoapi>=2,<4", # Generates documentation from docstrings
"sphinx-issues>=1.2,<4", # Allows references to GitHub issues
]
tests = [
"coverage>=7,<8", # Lets us track what code is being tested
"exceptiongroup>=1,<2",
"jupyter", # For integration testing Jupyter notebooks
"mypy>=1.0,<1.9", # Static type checking
"nbconvert>=7,<8",
"nbformat>=5,<6",
"pre-commit>=3,<4", # Allow us to run pre-commit hooks in testing
"pydocstyle>=6,<7", # Style guidelines for Python documentation
"pytest-console-scripts>=1.1,<2", # Allow automatic testing of scripts
"pytest-cov>=4,<5", # Pytest plugin for working with coverage
"pytest>=7,<8", # Our testing framework
"ruff>=0.0.290", # A very fast python linter & autofixer
"tox>=4,<5", # Python test environment manager
]
types = [
"types-setuptools",
]
[tool.setuptools_scm]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.black]
line-length = 88
target-version = ["py310", "py311"]
include = "\\.pyi?$"
[tool.doc8]
max-line-length = 88
ignore-path = ["docs/_build"]
[tool.pytest.ini_options]
testpaths = "./"
filterwarnings = [
# Examples of how to filter out pytest warnings from dependencies
# "ignore:distutils Version classes are deprecated:DeprecationWarning",
# "ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning",
# "ignore:Deprecated call to.*declare_namespace:DeprecationWarning:pkg_resources",
]
addopts = "--verbose --pdbcls=IPython.terminal.debugger:TerminalPdb"
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 = "DEBUG"
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
]
[tool.ruff]
select = [
"A", # flake8-builtins
# "ARG", # unused arguments
# "B", # flake8-bugbear
"C", # Limit cyclomatic complexity using mccabe
"D", # pydocstyle errors
"E", # pycodestyle errors
"EXE", # executable file issues
# "ERA", # eradicate: find commented out code
"F", # pyflakes
"I", # isort
"ISC", # implicit string concatenation
"N", # pep8-naming
"NPY", # NumPy specific checks
"PD", # pandas checks
"PGH", # pygrep-hooks
# "PL", # pylint
# "PT", # pytest style
"PTH", # use pathlib
"Q", # flake8-quotes
"RET", # check return values
"RSE", # unnecessary parenthises on raised exceptions
"S", # flake8-bandit
"SIM", # flake8-simplify
# "T", # print statements found
"UP", # pyupgrade (use modern python syntax)
"W", # pycodestyle warnings
]
ignore = [
"D401", # Require imperative mood in docstrings.
"D417",
"E501", # Overlong lines.
"PD003", # Use of isna rather than isnull
"PD004", # Use of notna rather than notnull
"PD010", # Use of df.stack()
"PD013", # Use of df.unstack()
"PD015", # Use of pd.merge() rather than df.merge()
"PD901", # df as variable name
"RET504", # Ignore unnecessary assignment before return
"S101", # Use of assert
]
# Assume Python 3.11
target-version = "py311"
line-length = 88
# Don't automatically concatenate strings -- sometimes we forget a comma!
unfixable = ["ISC"]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports
"tests/*" = ["D"]
[tool.ruff.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["pydantic.validator", "pydantic.root_validator"]
[tool.ruff.isort]
known-first-party = ["pudl"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true