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: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
17 changes: 15 additions & 2 deletions verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)"),
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Loading