(previous post:
I. The goals)
The monorepo. Sage development will continue to use the same one repository
sagemath/sage for development of the Sage distribution, the Sage library, and the documentation. And the structure of the source tree (src/sage) will remain unchanged.
Integration testing. The entire Sage library will continue to be tested as a whole, both on Sage developers' machines (make ptest, ./sage -t --all) and on GitHub Actions.
The modularization linter. One of the modularization principles: "Don't import more than you need." For example, the package sage.misc is split over 5 pip-installable distributions, so importing from sage.misc.all is not a good practice in the Sage libary. The linter
./sage --tox -e relint helps by flagging imports from sage.*.all.
The import fixer. You can still type "from sage.all import this, that, something_else" when you add code to the Sage library. Just run
./sage --fix-imports on the source file afterwards; it rewrites it using more specific import statements that make the modularization linter happy.
Doctesting against a baseline. When preparing a modularized distribution, at the beginning, when testing it separately, there will be lots and lots of doctest failures. Using .
/sage -t --baseline-stats-path known-test-failures.json, we can monitor modularization regressions.
Modularized testing in venvs. We test the modularized distributions using automatically created virtual environments. The technical tool for this is tox, but to run the tests in the Sage distribution, we can just run "make SAGE_CHECK=yes pypi-wheels".
Automatic modularized testing on GitHub Actions. The test of the modularized distributions that are already defined in Sage is already running on every PR as part of the Build&Test workflow (
example). Build failures are flagged as errors, but test failures are currently ignored. (
#35095 changes this to using known-test-failures.json.)
The doctest dataflow consistency checker. It checks that "# long time" and "# optional" annotations are used consistently. This is added in
#35620.
Wishlist item: A "# optional" re-alignment tool. Currently I am using a
crude set of Emacs macros to mass-add "# optional" annotations to doctests and to align them according to the style guide added in
#35749. But it would be nice to have a command-line tool that can do this type of reformatting. Also, if we decide to introduce codeblock-scoped "# optional" annotations (
#35750), this tool could also rewrite line-level annotations repeated throughout a codeblock to codeblock-scoped annotations.
Information system for the features provided by modularized distributions. Our reference manual already contains sections for each of the SPKGs that are part of Sage-the-distribution. Each modularized distribution (defined in
pkgs/) has a corresponding SPKG (defined in
build/pkgs/) and thus a section in the reference manual.
#35734 improves this by putting these section in relation to Features; and
#35749 adds cross-references.
Automatic deployment to PyPI. The modularized distributions are automatically built and
deployed to PyPI on every release.