Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions scripts/verify_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,12 @@ def _base_checks(
),
Check(
"examples",
"README/API examples and example-app checks",
"example-app checks",
(
py,
"-m",
"pytest",
"-q",
"tests/test_docs_examples.py",
"tests/test_example_apps.py",
),
requires_modules=("pytest",),
Expand All @@ -146,8 +145,6 @@ def _base_checks(
"tests/test_scatter.py::test_to_html_escapes_user_strings",
"tests/test_components.py::test_component_to_html_escapes_user_strings_across_public_surface",
"tests/test_components.py::test_component_to_html_path_keeps_existing_file_on_atomic_replace_failure",
"tests/test_docs_examples.py::test_readme_documents_standalone_html_security_contract",
"tests/test_docs_examples.py::test_production_docs_capture_html_export_dom_text_contract",
),
requires_modules=("pytest",),
),
Expand Down
1 change: 0 additions & 1 deletion scripts/verify_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
"tests/test_benchmark_environment.py",
"tests/test_bench_pyplot_vs_matplotlib.py",
"tests/test_check_regressions.py",
"tests/test_docs_examples.py",
"tests/test_example_apps.py",
"tests/test_type_surface.py",
"tests/test_verify_benchmark_report.py",
Expand Down
7 changes: 1 addition & 6 deletions tests/test_benchmark_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,13 @@ def test_codspeed_animation_module_guards_backend_and_split_transport() -> None:
assert "build_payload_split" in source


def test_codspeed_dependency_is_declared_and_shared_by_ci_and_runbook() -> None:
def test_codspeed_dependency_is_declared_and_used_by_ci() -> None:
pyproject = (ROOT / "pyproject.toml").read_text(encoding="utf-8")
workflow = (ROOT / ".github" / "workflows" / "codspeed.yml").read_text(encoding="utf-8")
runbook = (ROOT / "benchmarks" / "README.md").read_text(encoding="utf-8")

assert "codspeed = [" in pyproject
assert '"pytest-codspeed>=5,<6"' in pyproject
assert '-e ".[dev,codspeed]"' in workflow
assert '-e ".[dev,codspeed]"' in runbook
assert "--codspeed" in runbook


def test_native_benchmark_reports_can_resolve_source_backend_metadata() -> None:
Expand All @@ -182,12 +179,10 @@ def test_native_benchmark_reports_can_resolve_source_backend_metadata() -> None:

def test_scatter_native_exposes_reproducible_categorical_ceiling() -> None:
source = (ROOT / "benchmarks" / "bench_scatter_native.py").read_text(encoding="utf-8")
runbook = (ROOT / "benchmarks" / "README.md").read_text(encoding="utf-8")
assert "def gen_numpy_categories" in source
assert "def _warm_production_path" in source
assert '"--categorical-groups"' in source
assert '"categorical_groups"' in source
assert "--categorical-groups 24" in runbook


def test_interaction_browser_gates_cover_scatter_and_core_chart_families() -> None:
Expand Down
15 changes: 0 additions & 15 deletions tests/test_check_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ def _load_regression_module():
check_regressions = _load_regression_module()


def test_committed_metrics_document_matches_baseline_contract() -> None:
expected = set(json.loads((ROOT / "benchmarks/baseline.json").read_text())["metrics"])
lines = (ROOT / "spec/benchmarks/metrics.md").read_text(encoding="utf-8").splitlines()
documented = {
cells[0]
for line in lines
if line.startswith("| ")
if len(cells := [cell.strip() for cell in line.strip("|").split("|")]) == 2
if cells[0] not in {"metric", "---"}
}

assert documented == expected
assert any(line.startswith("Source CI reports: commit ") for line in lines)


def test_report_provenance_uses_latest_timestamp() -> None:
first = {
"environment": {
Expand Down
21 changes: 0 additions & 21 deletions tests/test_claim_guardrails.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ def _write(tmp_path: Path, text: str) -> Path:
return path


def test_claim_guardrail_accepts_current_public_docs() -> None:
findings = check_claim_guardrails.check_claims(check_claim_guardrails._default_paths())

assert findings == []
assert check_claim_guardrails.ROOT / "pyproject.toml" in check_claim_guardrails._default_paths()
assert (
check_claim_guardrails.ROOT / "examples" / "reflex" / "README.md"
in check_claim_guardrails._default_paths()
)
assert (
check_claim_guardrails.ROOT / "docs" / "index.md" in check_claim_guardrails._default_paths()
)


def test_claim_guardrail_rejects_broad_fastest_claim(tmp_path: Path) -> None:
path = _write(tmp_path, "xy is the fastest charting library.\n")

Expand Down Expand Up @@ -166,10 +152,3 @@ def test_claim_guardrail_rejects_stale_repo_identity(tmp_path: Path) -> None:
findings = check_claim_guardrails.check_claims([path])

assert any("stale repository identity" in finding.message for finding in findings)


def test_claim_guardrail_covers_security_and_contributing_docs() -> None:
defaults = check_claim_guardrails._default_paths()

assert check_claim_guardrails.ROOT / "SECURITY.md" in defaults
assert check_claim_guardrails.ROOT / "CONTRIBUTING.md" in defaults
Loading
Loading