Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "needs" tags for giac and libgiac #38770

Merged
merged 19 commits into from
Oct 26, 2024
Merged

Conversation

orlitzky
Copy link
Contributor

@orlitzky orlitzky commented Oct 5, 2024

Part of #38668. If it's going to be possible to disable giac, we need to guard all of the tests that use it with either # needs giac or # needs sage.libs.giac.

I think I've gotten them all. A crude way to test:

  1. git rm -r src/sage/libs/giac and rebuild to disable sage.libs.giac
  2. build sage, and then delete the giac executable to disable the pexpect interface

If you do these one at a time, it should ensure that the correct tags are used. (Typically, if giac is missing, neither sage.libs.giac nor the giac executable will be present, making it very easy to mix up the tags.)

For bonus points you can undelete src/sage/libs/giac after building but before testing to make sure the "needs" tags in those files are accurate.

Dependencies:

Copy link

github-actions bot commented Oct 5, 2024

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

@mantepse
Copy link
Contributor

mantepse commented Oct 5, 2024

shouldn't the tag be # optional - giac?

@orlitzky
Copy link
Contributor Author

orlitzky commented Oct 5, 2024

I think either will work, but IIRC "needs" is preferred for standard features, and build/pkgs/giac/type is still standard. I tried to find some documentation for this but the description of #35790 was the best I could do.

@orlitzky
Copy link
Contributor Author

The CI fail is,

sage -t --long --random-seed=286735480429121101562228604801325644303 src/sage/rings/tests.py # Timed out

and doesn't have anything to do with this PR (which just adds some presently-unused tags).

This module uses the pexpect interface in sage.interfaces.giac
to access giac, so we test for the program and not the library.
One doctest in this module uses simplify(...,algorithm='giac'), which
passes the object to the giac pexpect interface and then simplifies
it. This requires the giac program (as opposed to the library).
This entire module needs the giac program.
…iac()

There are a few doctests in this module that use giac(), but already
have "needs sage.libs.giac" tags. It is more correct for these to
depend on the giac program and not the library.
The _giac_solver for symbolic relations uses libgiac.
A few doctests in this module call giac(), which is the pexpect interface.
…libs.giac"

Several Groebner basis tests that use libgiac now need "needs" for
sage.libs.giac
There's an example in this file that can only be integrated by
giac. We add the corresponding "needs" tag, but also, since this is
end-user documentation, explain why it is there.
Some tests in this file use the giac pexpect interface but are tagged
with "needs sage.libs.giac". Now that we have a feature for the giac
executable, "needs giac" is more appropriate.
Some tests in this file use the giac pexpect interface but are tagged
with "needs sage.libs.giac". Now that we have a feature for the giac
executable, "needs giac" is more appropriate.
One test in this file use the giac pexpect interface but is tagged
with "needs sage.libs.giac". Now that we have a feature for the giac
executable, "needs giac" is more appropriate.
Some tests in this file use the giac pexpect interface but are tagged
with "needs sage.libs.giac". Now that we have a feature for the giac
executable, "needs giac" is more appropriate.
Some tests in this file use the giac pexpect interface but are tagged
with "needs sage.libs.giac". Now that we have a feature for the giac
executable, "needs giac" is more appropriate.
When this file has not been crudely deleted to prevent the build
system from building sage.libs.giac, it will be tested, and when it is
tested, it needs sage.libs.giac to exist.
This file contains several doctests that won't work without
sage.libs.giac installed.
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 23, 2024
sagemathgh-38770: Add "needs" tags for giac and libgiac
    
Part of sagemath#38668. If it's going to
be possible to disable giac, we need to guard all of the tests that use
it with either `# needs giac` or `# needs sage.libs.giac`.

I think I've gotten them all. A crude way to test:

1. `git rm -r src/sage/libs/giac` and rebuild to disable sage.libs.giac
2. build sage, and then delete the giac executable to disable the
pexpect interface

If you do these one at a time, it should ensure that the correct tags
are used. (Typically, if giac is missing, neither sage.libs.giac nor the
giac executable will be present, making it very easy to mix up the
tags.)

For bonus points you can undelete `src/sage/libs/giac` after building
but before testing to make sure the "needs" tags in those files are
accurate.

### Dependencies:

* sagemath#38756
* sagemath#38686 (not strictly required,
but it adds a few "needs sage.libs.giac" tags of its own)
    
URL: sagemath#38770
Reported by: Michael Orlitzky
Reviewer(s): Tobias Diez
@vbraun vbraun merged commit e70d9fe into sagemath:develop Oct 26, 2024
18 checks passed
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.

4 participants