-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
193 lines (171 loc) · 5.4 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
[tool.poetry]
name = "pytudes"
version = "0.1.1"
description = "Pytudes"
authors = ["Teo Zosa <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/TeoZosa/pytudes"
homepage = "https://github.com/TeoZosa/pytudes"
include = ["pytudes/py.typed"]
keywords = []
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
]
[tool.poetry.urls]
Changelog = "https://github.com/TeoZosa/pytudes/releases"
[tool.poetry.dependencies]
python = "^3.10,<3.11"
# Project-specific
coolname = "^2.2.0"
jupyter = "^1.0.0"
pandas = "^2.2.1"
pydantic = "^2.6"
scikit-learn = "^1.4.1"
scipy = "^1.13.0"
[tool.poetry.dev-dependencies]
# Standardized Developer Workflow Orchestration
cruft = "^2.15.0" # Automated Cookiecutter template synchronization
# Type Checking and Data Validation
mypy = "^1.9" # Static type checker
# Testing
pytest = "^8.1.1"
pytest-cov = "^5.0.0"
pytest-emoji = "^0.2.0"
pytest-mock = "^3.14.0"
pytest-sugar = "^1.0.0"
pytest-xdist = "^3.5.0"
xdoctest = {extras = ["all"], version = "^1.1.3"}
tox = "^3.28.0"
tox-wheel = "^1.0.0"
# Linting
## Code formatting
black = "^24.3" # see: https://black.readthedocs.io/en/stable/editor_integration.html
## Code quality
pylint = "^3.1.0"
## Automation and management
pre-commit = "^3.7.0"
# CI/CD
tox-gh-actions = "^2.12.0"
# Documentation
darglint = "^1.8.1"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
emoji = "^2.11.0"
importlib-metadata = "^7.1.0"
myst-parser = "^2.0.0"
pygments = "^2.17.2"
sphinx = "^6.2.1"
sphinx-autoapi = "^3.0.0"
sphinx-rtd-theme = "^2.0.0"
types-emoji = "^2.1.0" # PEP 561 compliant stub package for mypy
#################################################################################
# Tooling configs #
#################################################################################
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing"]
omit =[
# Private (unversioned) files
"pytudes/_2021/private/*",
]
parallel = true
source = ["pytudes"]
[tool.coverage.report]
exclude_lines =[
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
fail_under = 100
show_missing = true
skip_covered = true
[tool.flakeheaven]
# specify any flake8 options
exclude = [".*"] # Ignore dotfiles
# make output nice
format = "grouped"
# show line of source code in output
show_source = true
# list of plugins and rules for them
[tool.flakeheaven.plugins]
# cyclomatic complexity (https://github.com/PyCQA/mccabe)
mccabe = ["+*"]
# include everything in pyflakes except F401
pyflakes = ["+*", "-F401"]
# include everything in pycodestyle except what Black covers
pycodestyle = ["+*",
"-E203", # Whitespace before ":"
"-E501", # Line too long (82 > 78 characters)
"-W503", # Line break occurred before a binary operator <- this is now considered best practice by PEP 8
# Break convention for coding problems
# given that their purpose and characteristics
# distinguish them from typical software engineering programs
# (e.g., generally independent modules)
"-E266", # Too many leading '#' (e.g., salient sub-section headers idiosyncratic to this project)
"-E731", # Lambda expression assignment; simplifies code formatting for trivial functions/implicitly documents through naming
"-E402", # Module level import not at top of file; for a given problem in a module, that module may contain different algorithms, with dependent libraries imported prior to the definition of those algorithms
]
[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = false
fail-under = 0 # adjust `fail-under` value as quality standards permit
whitelist-regex = []
color = true
[tool.isort]
profile = "black"
atomic = true
combine_as_imports = true
[tool.mypy]
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_context = true
show_error_codes = true
[tool.pylint.messages_control]
disable = [
# Explicitly document only as needed
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
# Black & Flake8 purview
"line-too-long",
"c-extension-no-member",
# Break convention for coding problems
# given that their purpose and characteristics
# distinguish them from typical software engineering programs
# (e.g., generally independent modules)
"duplicate-code",
"invalid-name",
"no-else-return",
"pointless-string-statement",
"too-few-public-methods",
"unnecessary-lambda-assignment",
"unnecessary-pass",
"unused-import", # some imports are used in doctests which pylint does not register as usages
"useless-else-on-loop",
"wrong-import-order",
"wrong-import-position",
]
[tool.pylint.similarities]
# Ignore imports when computing similarities.
ignore-imports = "yes"
[tool.pytest.ini_options]
addopts = ["-rfsxX", "-l", "--tb=short", "--strict-markers", "-vv", "--emoji", "--xdoctest"]
xfail_strict = true
testpaths = ["tests",]
norecursedirs = [".*", "*.egg", "build", "dist",]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"