Reducing comments

This commit is contained in:
Julian Piribauer
2026-07-29 19:16:48 +02:00
parent 3cc7bc0dda
commit d17bdc8949
4 changed files with 10 additions and 60 deletions
+3 -14
View File
@@ -1,18 +1,7 @@
#!/usr/bin/env bash
# Reproduces the CI "Preparse .sage files" step locally, so `ruff check` sees
# the same generated *.sage.py files that the pipeline lints. Run this before
# `ruff check --no-respect-gitignore .` to catch issues that only show up in
# the generated output.
#
# Uses the sage.repl.preparse.preparse_file() Python API directly rather than
# the `sage --preparse` CLI flag: the conda-forge `sage` binary used in CI is
# a cut-down entry point that doesn't support `--preparse` (or `--python`) at
# all, unlike the official sagemath CLI. Whichever `python` on PATH can
# actually `import sage.repl` is used to run it -- in CI that's the conda
# env's own `python`; locally (official sage install) it's `sage --python`.
#
# The generated files are gitignored; clean them up afterwards with:
# git clean -x sage/ playground/
# This script is run in the CI container to preparse all .sage files into .sage.py files
# and can also be run locally for local linting/testing.
set -e