-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
199 lines (181 loc) · 6.15 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
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=66", "setuptools_scm[toml]>=3.5.0", "wheel"]
[project]
name = "catalystcoop.ferc_xbrl_extractor"
description = "A tool for extracting data from FERC XBRL Filings."
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [
{ name = "Catalyst Cooperative", email = "[email protected]" },
{ name = "Zach Schira", email = "[email protected]" },
]
requires-python = ">=3.10,<3.13"
dynamic = ["version"]
license = { file = "LICENSE.txt" }
dependencies = [
"arelle-release>=2.3,<3",
"coloredlogs>=14.0,<15.1",
"frictionless>=5,<6",
"lxml>=4.9.1,<6",
"numpy>=1.16,<3",
"pandas>=1.5,<3",
"pyarrow>=14.0.1", # required starting in pandas 3.0
"pydantic>=2,<3",
"sqlalchemy>=1.4,<3",
"stringcase>=1.2,<2",
]
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",
"Programming Language :: Python :: 3.12",
]
keywords = [
"accounting",
"data",
"electricity",
"energy",
"federal energy regulatory commission",
"ferc",
"finance",
"gas",
"natural gas",
"oil",
"regulation",
"utility",
"xbrl",
]
[project.urls]
"Homepage" = "https://github.com/catalyst-cooperative/ferc-xbrl-extractor"
"Source" = "https://github.com/catalyst-cooperative/ferc-xbrl-extractor"
"Documentation" = "https://catalystcoop-ferc-xbrl-extractor.readthedocs.io"
"Issue Tracker" = "https://github.com/catalyst-cooperative/ferc-xbrl-extractor/issues"
[project.scripts]
xbrl_extract = "ferc_xbrl_extractor.cli:main"
[project.optional-dependencies]
dev = [
"build>=1.0,<1.3",
"ruff>=0.5.0,<0.9", # A very fast linter and autofixer
"tox>=4.16.0,<4.24", # Python test environment manager
"twine>=3.3,<6.1", # Used to make releases to PyPI
]
docs = [
"doc8>=1.0,<1.2", # Ensures clean documentation formatting
"furo>=2022.4.7",
"sphinx>=4,!=5.1.0,<8.2", # The default Python documentation engine
"sphinx-autoapi>=3.1.2,<3.5", # Generates documentation from docstrings
"sphinx-issues>=1.2,<5.1", # Allows references to GitHub issues
]
tests = [
"coverage>=5.3,<7.7", # Lets us track what code is being tested
"doc8>=1.0,<1.2", # Ensures clean documentation formatting
"mypy>=1.0,<1.15", # Static type checking
"pre-commit>=4,<5", # Allow us to run pre-commit hooks in testing
"pydocstyle>=5.1,<6.4", # Style guidelines for Python documentation
"pytest>=6.2,<8.4", # Our testing framework
"pytest-console-scripts>=1.1,<1.5", # Allow automatic testing of scripts
"pytest-cov>=2.10,<6.1", # Pytest plugin for working with coverage
"pytest-mock>=3.0,<3.15",
"ruff>=0.5.0,<0.9", # A very fast linter and autofixer
"tox>=4.16.0,<4.24", # Python test environment manager
]
types = ["types-setuptools"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
[tool.ruff]
# Configurations that apply to both the `format` and `lint` subcommands.
target-version = "py312"
line-length = 88
indent-width = 4
[tool.ruff.format]
# Configuration specfic to the `format` subcommand.
# We use black compatible formatting.
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
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.
"E203", # Space before ':' (black recommends to ignore)
"ISC001", # implicit string concatenation
"PD003", # Use of isna rather than isnull
"PD004", # Use of notna rather than notnull
"PD008", # Use of df.at[] rather than df.loc[]
"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
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.isort]
known-first-party = ["ferc_xbrl_extractor"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports
"tests/*" = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.doc8]
max-line-length = 88
ignore-path = ["docs/_build"]
[tool.pytest.ini_options]
testpaths = "./"
filterwarnings = [
"ignore:distutils Version classes are deprecated:DeprecationWarning",
"ignore:Creating a LegacyVersion:DeprecationWarning:pkg_resources[.*]",
"ignore:The `update_forward_refs` method is deprecated:pydantic.PydanticDeprecatedSince20:pydantic.main",
"ignore:datetime.datetime.utcfromtimestamp\\(\\) is deprecated:DeprecationWarning:dateutil.tz",
]
addopts = "--verbose"
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"]