Skip to content

Conversation

@orlitzky
Copy link
Contributor

@orlitzky orlitzky commented Aug 5, 2025

Sage can now be built without eclib/mwrank, but the tests will fail (#40543). This adds two features, one for sage.libs.eclib and one for mwrank, and then adds "needs" tags as appropriate.

This works now, but can wait until meson is used in sage-the-distro and the explicit options PR is merged. This will make it easy to run both long and non-long test suites on the CI with eclib disabled.

Dependencies

Fixes

@orlitzky orlitzky marked this pull request as draft August 5, 2025 23:58
@github-actions
Copy link

github-actions bot commented Aug 7, 2025

Documentation preview for this PR (built with commit df6dd0e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@orlitzky orlitzky force-pushed the eclib-feature branch 2 times, most recently from 49a1661 to c3dd50a Compare September 7, 2025 18:14
@orlitzky orlitzky marked this pull request as ready for review September 7, 2025 18:16
@orlitzky
Copy link
Contributor Author

orlitzky commented Sep 7, 2025

This is OK except for the docbuild failure, but that fails because eclib is missing, not because I've added the # needs tags.

@orlitzky
Copy link
Contributor Author

orlitzky commented Sep 7, 2025

(The "DO NOT MERGE" commit is there still so the reviewers can see everything working in the CI.)

The meson build system is now capable of building sagelib without
sage.libs.eclib. Here we add a new feature to represent it. In
particular this allows us to use "needs sage.libs.eclib" in tests.
The meson build system is now capable of building sagelib without
linking to libec, which means that the mwrank program may not be
installed. Here we add a new feature to represent it. In particular
this allows us to use "needs mwrank" in tests.
The meson build system is now capable of building sagelib without
linking to libec, which means that the mwrank program may not be
installed. In that case, we utilize the new sage.features.mwrank to
skip the tests in this file.
Sage can now be built without the sage.libs.eclib.* extension modules,
but when it is, all of the tests under sage.libs.eclib fail. Here we
add "needs sage.libs.eclib" to the header of every (source code) file
under sage.libs.eclib, to indicate that those tests should be skipped
if the corresponding module was not built.
Unsurprisingly, a lot of the tests in sage.schemes.elliptic_curves use
eclib. After a day of running sage -t followed by emacs followed by
sage -t followed by emacs... I think I've found them all. This commit
marks them as "needs sage.libs.eclib" so that they will be skipped
if eclib is unavailable or explicitly disabled.
One example in the tutorial needs "needs sage.libs.eclib"
One example in this file needs "needs sage.libs.eclib"
One example in this file needs "needs sage.libs.eclib"
One example in this file needs "needs sage.libs.eclib"
One example in this file needs "needs sage.libs.eclib"
Three examples in this file require "needs sage.libs.eclib" to pass
in the absence of eclib.
Several examples in this file require "needs sage.libs.eclib" to
pass in the absence of eclib.
…s.eclib"

One example in this file requires "needs sage.libs.eclib" to pass
when eclib is not installed (or is disabled).
One example in this file requires "needs sage.libs.eclib" to pass
when eclib is not installed (or is disabled).
Several examples in the "Explicit methods in number theory" tutorial
require "needs sage.libs.eclib" to pass when eclib is not installed
(or was disabled).
Many examples in these modules require "needs sage.libs.eclib" to
pass when eclib is not installed (or was disabled).
If the feature for sage.libs.foo is enabled, we shouldn't skip over
files that fail to collect with an ImportError for sage.libs.foo.
When sage.libs.eclib doesn't exist, pytest will still try to collect
*.py files that import it, leading to an ImportError. We add eclib to
the list of feature-backed modules with workarounds for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant