diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f33c0d7..65303f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt pip install -e ".[dev]" + # The Arb certificate step (verify_ia_1_to_3_arb.py) needs python-flint, + # which lives in the optional "fast" extra; install it so the step runs. + pip install "python-flint>=0.5" - name: Lint run: ruff check src/ tests/ --select E,F,W --ignore E501 @@ -138,4 +141,4 @@ jobs: - name: Verify license files exist run: | test -f LICENSE && test -f LICENSE-CODE && test -f LICENSE-PAPER - echo "All license files present" + echo "All license files present" \ No newline at end of file diff --git a/verify.py b/verify.py index 144f73c..19f2da8 100644 --- a/verify.py +++ b/verify.py @@ -22,6 +22,9 @@ PROOF_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "proof") RESULTS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "results") +# Steps skipped because an optional dependency was missing (filled by run_step) +SKIPPED_STEPS = [] + STEPS = [ ("verify_logconcavity_rigorous.py", "Rigorous IA: 52,898 subintervals on [0, 1.0]"), ("verify_algebraic_core.py", "Algebraic core + perturbation bound (C=204)"), @@ -68,6 +71,7 @@ def run_step(script, desc, quiet=False): # Check for SKIP (optional dependency not available) if result.stdout and result.stdout.strip().startswith("SKIP:"): print(" " + result.stdout.strip().split("\n")[0]) + SKIPPED_STEPS.append(script) return True # Treat skip as pass (optional step) if not quiet: @@ -119,9 +123,18 @@ def main(): ia = json.load(f) print(" IA certified: %d/%d subintervals" % (ia["certified"], ia["n_subintervals"])) + if SKIPPED_STEPS: + print(" SKIPPED (optional dependency missing): %s" % ", ".join(SKIPPED_STEPS)) + print("=" * 72) - sys.exit(0 if passed == len(steps) else 1) + ok = passed == len(steps) + if SKIPPED_STEPS and os.getenv("CI"): + # In CI every dependency is installed on purpose; a skip there means + # the environment regressed and a step silently verified nothing. + print(" ERROR: steps were skipped in CI (see above)") + ok = False + sys.exit(0 if ok else 1) if __name__ == "__main__": - main() + main() \ No newline at end of file