-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
245 lines (227 loc) · 6.82 KB
/
Copy pathpyproject.toml
File metadata and controls
245 lines (227 loc) · 6.82 KB
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
[project]
name = "bolster"
version = "0.7.0"
description = "Bolster's Brain, you've been warned"
authors = [
{name = "Andrew Bolster", email = "andrew.bolster@gmail.com"},
]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
keywords = [
"bolster",
"api",
"data science",
"data",
"data engineering",
"data analysis",
"data pipeline",
"data processing",
"data wrangling",
"data transformation",
"cli",
"command line interface",
"python",
]
requires-python = ">=3.11,<4.0"
dependencies = [
"boto3>=1.42.43",
"bs4>=0.0.2",
"click>=8.1.8",
"click-log>=0.4.0",
"dateparser>=1.2.1",
"feedparser>=6.0.12",
"import-linter>=2.0",
"lxml>=5.3.2",
"numpy>=1.25.0,<3.0",
"odfpy>=1.4.1",
"openpyxl>=3.1.5",
"pandas>=2.0.3",
"pillow>=12.2.0",
"plotly>=6.5.0",
"psycopg2-binary>=2.9.10",
"pytest-cov>=5.0.0",
"requests>=2.33.1",
"requests-cache>=1.2.1",
"urllib3>=2.6.3",
"rich>=14.2.0",
"scipy>=1.10.1",
"tqdm>=4.67.1",
"waybackpy>=3.0.6",
"xlrd>=2.0.1",
]
[project.urls]
Homepage = "https://github.com/andrewbolster/bolster"
Documentation = "https://bolster.help"
Repository = "https://github.com/andrewbolster/bolster.git"
"Bug Tracker" = "https://github.com/andrewbolster/bolster/issues"
[project.scripts]
bolster = "bolster.cli:cli"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
version = { source = "file", path = "src/bolster/__init__.py" }
[tool.pdm.build]
excludes = ["tests", "docs", "notebooks"]
[tool.pytest.ini_options]
testpaths = ["tests","src"]
pythonpath = "src"
addopts = [
"--cov=bolster",
"--cov-report=term-missing",
"--import-mode=importlib",
"--doctest-modules",
"--doctest-continue-on-failure",
"--ignore=notebooks"
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"network: marks tests requiring network access (deselect with '-m \"not network\"')",
"integration: marks optional integration tests requiring real network (run with '-m integration')"
]
log_cli = true
log_cli_level = "WARNING"
log_cli_format = "%(asctime)s %(levelname)s %(name)s: %(message)s"
log_cli_date_format = "%H:%M:%S"
filterwarnings = []
[tool.ruff]
# Select rule categories - adding more for quality gate
lint.select = [
"E", # pycodestyle errors
"F", # Pyflakes
"I", # isort
"W", # pycodestyle warnings
"D", # pydocstyle - for docstring validation
"UP", # pyupgrade - for modern Python patterns
"B", # flake8-bugbear - for common bugs
"C4", # flake8-comprehensions
"T20", # flake8-print - catches print() statements
"RET", # flake8-return - for return style
"LOG", # flake8-logging - for proper logging patterns
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"PGH", # pygrep-hooks
]
lint.ignore = [
"E501", # Line too long (handled by formatter)
"D100", # Missing docstring in public module (too strict initially)
"D104", # Missing docstring in public package (too strict initially)
"D105", # Missing docstring in magic method (too pedantic)
"D203", # 1 blank line required before class docstring (conflicts with D211)
"D212", # Multi-line docstring summary should start at the first line (conflicts with D213)
"D213", # Multi-line docstring summary should start at the second line (conflicts with D212)
]
line-length = 120
# Configure docstring requirements for data source modules
[tool.ruff.lint.pydocstyle]
convention = "google" # Use Google docstring style
# Custom rules for different file types
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "D104"] # Allow unused imports and missing docstrings in __init__.py
"*.ipynb" = ["E402", "F401", "F811", "I001", "F403", "F405", "E741"]
"src/bolster/cli.py" = ["T20"] # Allow print() in CLI module
"scripts/**/*.py" = ["T20"] # Allow print() in scripts
"scripts/constitutional_check.py.reference" = ["UP006", "UP035", "T201"] # Legacy reference file
"tests/**/*.py" = ["D", "T20"] # Relax docstring and print rules in tests
[tool.coverage.run]
source = ["bolster"]
# Exclude test files from coverage measurement
omit = [
"tests/*",
"*/test_*.py",
"*/__init__.py",
"setup.py",
"*/cli.py", # Exclude CLI from coverage requirements
]
[tool.coverage.report]
# Set 80% coverage threshold for quality gate
fail_under = 80
show_missing = true
skip_covered = false
sort = "Miss"
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"pass",
# Advanced exclusions for common Python patterns
"raise AssertionError",
"raise ValueError.*unreachable",
"@(abc\\.)?abstractmethod",
"if TYPE_CHECKING:",
"except ImportError:",
"if sys.platform.*:",
"if os.name.*:",
]
# Additional exclusion patterns for validation functions
# These are often simple pass/fail checks that don't need coverage
precision = 2
# Import-linter configuration is in .importlinter file
# This enforces HTTP centralization - all HTTP requests must go through
# bolster.utils.web.session instead of raw requests to ensure retry logic
# Configuration for bump-my-version (modern) and legacy bumpversion compatibility
[tool.bumpversion]
current_version = "0.7.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = true
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = true
commit = false
message = "Bump version: {current_version} → {new_version}"
moveable_tags = []
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []
[dependency-groups]
fuzz = [
"atheris>=3.0",
]
dev = [
"pre-commit",
"pytest>=9.0.3",
"ipykernel",
"httpx",
"pytest-cov",
"pytest-mock",
"ruff",
"bandit>=1.7",
"nbmake",
"bump-my-version>=0.15.4",
"pydocstyle",
"twine",
"safety>=3.7.0",
]
docs = [
"sphinx>=7.0",
"sphinx-click>=6.0",
"sphinx-issues>=4.0",
"nbsphinx>=0.9",
"sphinx-rtd-theme>=2.0",
"sphinx-autodoc-typehints>=2.0",
"sphinx-autoapi>=3.0",
"sphinx-github-changelog>=1.4",
"sphinx-copybutton>=0.5",
"myst-parser>=2.0",
]