Initial commit
This commit is contained in:
commit
5f2db08b43
100 files changed
+16985
No files matched your search
@@ -0,0 +1,48 @@
|
||||
# QA test-suite configuration for the California Legislature Daily File scraper.
|
||||
#
|
||||
# The standard command `python3 -m pytest` both runs the full suite AND enforces
|
||||
# the acceptance-criteria coverage gate (>= 85 % on the parser core) via the
|
||||
# `--cov` addopt below. A green `python3 -m pytest` is therefore a green *gate*:
|
||||
# a coverage regression below 85 % fails the run.
|
||||
#
|
||||
# Optional live smoke test (guarded by an env flag so CI does not depend on the
|
||||
# external servers being up):
|
||||
# CALI_SCRAPER_SMOKE=1 python3 -m pytest -m smoke
|
||||
#
|
||||
# The parser core (`scraper.parsers` + its `scraper.bill_id` codec) is the
|
||||
# subject of the coverage gate, per the task. Import guards for soft deps
|
||||
# (http_client/config) are `pragma: no cover`-excluded so the floor measures
|
||||
# the real business logic, not try/except shims.
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "7.0"
|
||||
testpaths = ["tests"]
|
||||
# --cov enables measurement + report + fail_under on every run.
|
||||
# --cov-report=term produces the visible report the acceptance criteria ask for.
|
||||
# --cov-fail-under=85 is the hard gate.
|
||||
addopts = "-ra --strict-markers --cov --cov-report=term-missing"
|
||||
markers = [
|
||||
"smoke: optional live-URL smoke test, skipped unless CALI_SCRAPER_SMOKE is set",
|
||||
]
|
||||
|
||||
[tool.coverage.run]
|
||||
# The parser module and its bill-id codec are the coverage subject.
|
||||
source = ["scraper.parsers", "scraper.bill_id"]
|
||||
omit = [
|
||||
"*/tests/*",
|
||||
"*/__pycache__/*",
|
||||
]
|
||||
branch = true
|
||||
|
||||
[tool.coverage.report]
|
||||
# Enforce the acceptance-criteria threshold. A sub-85% run fails pytest.
|
||||
fail_under = 85
|
||||
show_missing = true
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"pragma: no cover - import guard",
|
||||
"if __name__ == .__main__.:",
|
||||
"raise NotImplementedError",
|
||||
"\\.\\.\\.",
|
||||
]
|
||||
precision = 1
|
||||
Reference in new issue
Block a user