-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Use the system GAP #36792
Use the system GAP #36792
Commits on Dec 15, 2023
-
src/sage/env.py: replace GAP_{LIB,SHARE}_DIR
These two variables are best combined into one, GAP_ROOT_PATHS. This is how they're used anyway: to reference the locations where GAP packages might be found. Moreover, GAP is willing to report its own root paths, but doesn't make the further distinction between the lib and share dirs. Using the combined GAP_ROOT_PATHS will make it easier to integrate with the system GAP.
Configuration menu - View commit details
-
Copy full SHA for c17f3dd - Browse repository at this point
Copy the full SHA c17f3ddView commit details -
src/sage/libs/gap/util.pyx: replace GAP_{LIB,SHARE}_DIR
When initializing libgap, we use "-l" to specify a list of root paths. In the past we constructed this list manually from the two variables GAP_LIB_DIR and GAP_SHARE_DIR. Now we pass in GAP_ROOT_PATHS directly.
Configuration menu - View commit details
-
Copy full SHA for a69735d - Browse repository at this point
Copy the full SHA a69735dView commit details -
src/sage/libs/gap/saved_workspace.py: replace GAP_LIB_DIR
Instead of searching only GAP_LIB_DIR for GAP packages, we now search all entries in GAP_ROOT_PATHS.
Configuration menu - View commit details
-
Copy full SHA for 2977c7c - Browse repository at this point
Copy the full SHA 2977c7cView commit details -
src/sage/interfaces/gap_workspace.py: replace GAP_{LIB,SHARE}_DIR
These two variables were concatenated into a string that is eventually hashed. Now, the GAP_ROOT_PATHS variable serves a similar purpose; in a normal sage install it will already contain the concatenation of those two variables. So let's hash that instead.
Configuration menu - View commit details
-
Copy full SHA for 63275c2 - Browse repository at this point
Copy the full SHA 63275c2View commit details -
pkgs/sage-conf: add GAP_ROOT_PATHS variable
This variable whose counterpart exists in sage.env already will be set by Sage's ./configure script to an appropriate value.
Configuration menu - View commit details
-
Copy full SHA for e9ba01e - Browse repository at this point
Copy the full SHA e9ba01eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 667fe19 - Browse repository at this point
Copy the full SHA 667fe19View commit details -
src/sage/env.py: don't pass -r to gap
This hides the "user" path for GAP packages. We don't do it for libgap, and I don't think it makes much sense to hide the user's own packages if we're going to use his system GAP, so let's stop.
Configuration menu - View commit details
-
Copy full SHA for 0e33abe - Browse repository at this point
Copy the full SHA 0e33abeView commit details -
src/sage/env.py: combine GAP_{LIB,SHARE}_DIR into GAP_ROOT_PATHS
To support a system GAP installation, we now prepend Sage's old GAP_LIB_DIR and GAP_SHARE_DIR directories to the configured list of GAP_ROOT_PATHS. This will allow GAP packages to be found and used from any of the system or Sage locations.
Configuration menu - View commit details
-
Copy full SHA for 4854de7 - Browse repository at this point
Copy the full SHA 4854de7View commit details -
src/sage/env.py: pass GAP_ROOT_PATHS via -l to GAP
If we're using the system GAP, we still want sage's CLI gap command to be able to find any GAP packages that were installed via SPKG. The appropriate SAGE_LOCAL search paths are prepended to GAP_ROOT_PATHS already, but we need to tell GAP about them by passing the list to -l.
Configuration menu - View commit details
-
Copy full SHA for d41553b - Browse repository at this point
Copy the full SHA d41553bView commit details -
src/sage/env.py: pass -A to the gap command
From the GAP documentation: By default, some needed and suggested GAP packages are loaded, if present, into the GAP session when it starts. This option disables (actually toggles) the loading of suggested packages, which can be useful for debugging or testing. The needed packages (and their needed packages, and so on) are loaded in any case. With the possible exception of PolyCyclic, Sage doesn't need any of those suggested packages, but GAP complains loudly if they're missing. Passing "-A" to the GAP command eliminates those warnings and allows us to pare down our GAP installation, or to use a more minimal GAP from the system.
Configuration menu - View commit details
-
Copy full SHA for 6b45fec - Browse repository at this point
Copy the full SHA 6b45fecView commit details -
src/sage/libs/gap/util.pyx: initialize libgap with -A
From the GAP documentation: By default, some needed and suggested GAP packages are loaded, if present, into the GAP session when it starts. This option disables (actually toggles) the loading of suggested packages, which can be useful for debugging or testing. The needed packages (and their needed packages, and so on) are loaded in any case. With the possible exception of PolyCyclic, Sage doesn't need any of those suggested packages, but GAP complains loudly if they're missing. Initializing libgap with "-A" eliminates those warnings and allows us to pare down our GAP installation, or to use a more minimal GAP from the system.
Configuration menu - View commit details
-
Copy full SHA for 47bd80e - Browse repository at this point
Copy the full SHA 47bd80eView commit details -
src/sage/ext_data/gap/sage.g: load PolyCyclic if possible
Now that we're passing "-A" to the GAP command, the PolyCyclic package won't be loaded even if it is installed. We do want to use it if it's available, though, so we call LoadPackage explicitly in sage.g.
Configuration menu - View commit details
-
Copy full SHA for 1ee0a17 - Browse repository at this point
Copy the full SHA 1ee0a17View commit details -
src/sage/libs/gap/sage.gaprc: load PolyCyclic if possible
Now that we're initalizing libgap with "-A", the PolyCyclic package won't be loaded even if it is installed. We do want to use it if it's available, though, so we call LoadPackage explicitly in sage.gaprc to load it. This spews some informational messages if PolyCyclic is NOT installed, but we can hide them by temporarily changing the InfoWarning level.
Configuration menu - View commit details
-
Copy full SHA for 2a64023 - Browse repository at this point
Copy the full SHA 2a64023View commit details -
build/pkgs/gap{,_packages}: make most GAP packages optional
There's a long list of "recommended" packages that we install for GAP because, otherwise, GAP complains about them being missing when you start it. This can be avoided with the -A flag, however, that we are now passing to both the CLI gap and libgap. These additional packages are therefore no longer needed to silence the warnings. Here we move all of these recommended packages from the gap SPKG to the gap_packages SPKG.
Configuration menu - View commit details
-
Copy full SHA for 2b33f4e - Browse repository at this point
Copy the full SHA 2b33f4eView commit details -
src/sage/features/{__init__,gap}.py: unloaded packages aren't present
The presence of a GAP package is (at least) trinary: it can be installed and loaded, installed and unloaded, or uninstalled. Here we change the feature test to return "not present" for a package that is installed but not yet loaded.
Configuration menu - View commit details
-
Copy full SHA for e59cb7f - Browse repository at this point
Copy the full SHA e59cb7fView commit details -
src/sage/features/gap.py: don't cache GAP package tests
These can be loaded at runtime with, for example, sage: libgap.LoadPackage("PolyCyclic") And if that ever happens, a cached "not present" will be wrong.
Configuration menu - View commit details
-
Copy full SHA for c6da035 - Browse repository at this point
Copy the full SHA c6da035View commit details -
src/sage/groups/abelian_gps/abelian_group_morphism.py: add optional tags
Several doctests in this module require the GAP package PolyCyclic. We add "# optional - gap_package_polycyclic" to them.
Configuration menu - View commit details
-
Copy full SHA for de9e840 - Browse repository at this point
Copy the full SHA de9e840View commit details -
src/sage/modular/arithgroup/congroup_gamma{0,H}.py: add optional tags
Several doctests in these two modules require the GAP package PolyCyclic. We add "# optional - gap_package_polycyclic" to them.
Configuration menu - View commit details
-
Copy full SHA for ce73f41 - Browse repository at this point
Copy the full SHA ce73f41View commit details -
src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py: add opti…
…onal tags Several doctests in this module require the GAP package PolyCyclic. We add "# optional - gap_package_polycyclic" to them.
Configuration menu - View commit details
-
Copy full SHA for a8b7273 - Browse repository at this point
Copy the full SHA a8b7273View commit details -
src/sage/tests/gap_packages.py: change two example package names
Instead of atlasrep and tomlib, let's use primgrp and smallgrp in this doctest for test_packages(). The latter are guaranteed to be installed and loaded, making the output predictable.
Configuration menu - View commit details
-
Copy full SHA for 2e88e0b - Browse repository at this point
Copy the full SHA 2e88e0bView commit details -
src/sage/rings/finite_rings/integer_mod_ring.py: add optional tags
Several doctests in this module require the GAP package PolyCyclic. We add "# optional - gap_package_polycyclic" to them.
Configuration menu - View commit details
-
Copy full SHA for e3d5c4d - Browse repository at this point
Copy the full SHA e3d5c4dView commit details -
src/sage/rings/number_field/number_field.py: add optional tags
Several doctests in this module require the GAP package PolyCyclic. We add "# optional - gap_package_polycyclic" to them.
Configuration menu - View commit details
-
Copy full SHA for 19a3e86 - Browse repository at this point
Copy the full SHA 19a3e86View commit details -
src/sage/features/__init__.py: update PolyCyclic unhide() example
There's a test for unhide() in this module that assumes the PolyCyclic GAP package will always be installed. That may not be the case when now that we support using the system GAP. We update the text of the example and add two "# optional" tags, one of which is needed to hide the feature in the first place.
Configuration menu - View commit details
-
Copy full SHA for 673b8bc - Browse repository at this point
Copy the full SHA 673b8bcView commit details -
src/sage/groups/abelian_gps/abelian_group.py: add optional tags
Several doctests in this module require the GAP package PolyCyclic. We add "# optional - gap_package_polycyclic" to them.
Configuration menu - View commit details
-
Copy full SHA for 79fe294 - Browse repository at this point
Copy the full SHA 79fe294View commit details -
src/sage/groups/perm_gps/permgroup.py: fix failing socle() test
For some reason, GAP can decide to return a different set generators for one of the subgroups in our socle() example. The group is the same, however, so to fix the failing test, we modify it use an equality check rather than the usual string comparison.
Configuration menu - View commit details
-
Copy full SHA for 36de32a - Browse repository at this point
Copy the full SHA 36de32aView commit details -
src/bin/sage: pass -A to gap in "sage --gap"
This tells GAP not to try to load a bunch of packages that aren't part of the default install, thereby avoiding a bunch of warnings. The gap interface and libgap within sage both already do this.
Configuration menu - View commit details
-
Copy full SHA for 5cfff86 - Browse repository at this point
Copy the full SHA 5cfff86View commit details -
src/doc/en/prep/Quickstarts/Abstract-Algebra.rst: sort doctest output
The order in which DihedralGroup(8).normal_subgroups() is listed is apparently not fixed. To guard against order-based doctest failures, we sort the normal subgroups before printing them.
Configuration menu - View commit details
-
Copy full SHA for 449922c - Browse repository at this point
Copy the full SHA 449922cView commit details -
src/doc/en/constructions/groups.rst: sort doctest output
We have a GAP test in this document that prints (directly via GAP) the normal subgroups of DihedralGroup(10). But apparently, the order in which they are printed is not fixed. We add SortedList() to the NormalSubgroups() call to ensure that the list is always printed in the same order.
Configuration menu - View commit details
-
Copy full SHA for e85e17c - Browse repository at this point
Copy the full SHA e85e17cView commit details -
src/sage/tests/gap_packages.py: deduplicate the list of gap root paths
Otherwise, when there are duplicates, we list every package twice (or more) in all_installed_packages().
Configuration menu - View commit details
-
Copy full SHA for 9cfb1d7 - Browse repository at this point
Copy the full SHA 9cfb1d7View commit details -
src/sage/graphs/generators/families.py: remove unpredictable doctest
One of our examples for MathonPseudocyclicStronglyRegularGraph() constructs a matrix from a normal subgroup of the graph's automorphism group. The normal_subgroups() method goes through GAP, and GAP's NormalSubgroups() function has some freedom to choose representatives. This leads to the entries of the matrix being unpredictable -- it still satisfies the desired properties, however. To avoid doctest failues due to this unpredictability, we no longer print the entries of the matrix. The rest of the example is fine.
Configuration menu - View commit details
-
Copy full SHA for 46a091b - Browse repository at this point
Copy the full SHA 46a091bView commit details -
build/pkgs/gap_packages/SPKG.rst: document the autoloading behavior
Be nice and mention to users that only the PolyCyclic package (because Sage needs it) will be autoloaded.
Configuration menu - View commit details
-
Copy full SHA for d93cfda - Browse repository at this point
Copy the full SHA d93cfdaView commit details -
src/sage/features: fix two gap_packages tests
Installing gap_packages now means that they are loadable, not necessarily that they are loaded. We add two libgap.LoadPackage calls to ensure that these optional gap_packages tests pass.
Configuration menu - View commit details
-
Copy full SHA for b53e1d7 - Browse repository at this point
Copy the full SHA b53e1d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c98252 - Browse repository at this point
Copy the full SHA 6c98252View commit details -
pkgs/sage-conf: prefer SAGE_LOCAL/share to SAGE_SHARE
This more closely resembles what sdh_configure() is doing.
Configuration menu - View commit details
-
Copy full SHA for b86fd78 - Browse repository at this point
Copy the full SHA b86fd78View commit details -
src/sage/env.py: prefer SAGE_LOCAL/share to SAGE_SHARE
This more closely resembles what sdh_configure() is doing.
Configuration menu - View commit details
-
Copy full SHA for 6405814 - Browse repository at this point
Copy the full SHA 6405814View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29c06cb - Browse repository at this point
Copy the full SHA 29c06cbView commit details -
build/pkgs/gap_packages/SPKG.rst: add optional tags and output
The example commands in this file are doctested, so they need "optional" tags and the expected output to pass.
Configuration menu - View commit details
-
Copy full SHA for 62bfa19 - Browse repository at this point
Copy the full SHA 62bfa19View commit details -
build/pkgs/gap/spkg-configure.m4: rework GAP_ROOT_PATHS handling
Instead of leaving GAP_ROOT_PATHS blank for the gap SPKG, we now use '${prefix}' placeholders to essentially add the old GAP_LIB_DIR and GAP_SHARE_DIR to the list.
Configuration menu - View commit details
-
Copy full SHA for 3fcc480 - Browse repository at this point
Copy the full SHA 3fcc480View commit details -
pkgs/sage-conf: add '${prefix}' magic for GAP_ROOT_PATHS
Replace the string '${prefix}' with SAGE_LOCAL in GAP_ROOT_PATHS. The spkg-configure.m4 for GAP now uses this as a placeholder.
Configuration menu - View commit details
-
Copy full SHA for d976d95 - Browse repository at this point
Copy the full SHA d976d95View commit details -
src/sage/env.py: don't mangle GAP_ROOT_PATHS
We used to prepend two sage-specific paths to GAP_ROOT_PATHS here, but we now handle that in gap's spkg-configure so that the value we get from sage-conf is what we use.
Configuration menu - View commit details
-
Copy full SHA for 9385493 - Browse repository at this point
Copy the full SHA 9385493View commit details -
build/pkgs/gap/spkg-configure.m4: rename GAPC to GAPRUN
It's just a better name for the command that runs a GAP command.
Configuration menu - View commit details
-
Copy full SHA for 8bd6f28 - Browse repository at this point
Copy the full SHA 8bd6f28View commit details -
src/sage/tests/gap_packages.py: update GAP_ROOT_PATHS comment
The motivation for deduplicating GAP_ROOT_PATHS still stands, but the old comment about the sage-conf semantics is out-of-date. Rewrite it.
Configuration menu - View commit details
-
Copy full SHA for ec1c782 - Browse repository at this point
Copy the full SHA ec1c782View commit details -
build/pkgs/gap{,_packages}: bring autoloaded packages back into gap
Upon review it was agreed that the gap SPKG should not aim for a minimal installation. We bring the current list of autoloaded packages back into the gap SPKG from gap_packages. (The list is a little shorter now than when it was written.)
Configuration menu - View commit details
-
Copy full SHA for 2e29883 - Browse repository at this point
Copy the full SHA 2e29883View commit details -
src/sage/ext_data/gap/sage.g: autoload more packages
Bring the sage list of (attempted) autoloads to parity with the default GAP list.
Configuration menu - View commit details
-
Copy full SHA for 1e3f4fc - Browse repository at this point
Copy the full SHA 1e3f4fcView commit details -
src/sage/libs/gap/sage.gaprc: autoload more packages
Bring the sage list of (attempted) autoloads to parity with the default GAP list.
Configuration menu - View commit details
-
Copy full SHA for 773ec33 - Browse repository at this point
Copy the full SHA 773ec33View commit details -
build/pkgs/gap/spkg-configure.m4: add a comment about GAP packages
Mention that we're checking for only the bare minimum set of packages needed for the sage test suite to pass.
Configuration menu - View commit details
-
Copy full SHA for 76b56cd - Browse repository at this point
Copy the full SHA 76b56cdView commit details -
src/sage/env.py: move gap_cmd handling to src/sage/interfaces/gap.py
Reorganize the GAP variables in sage.env, and then move the _gap_cmd processing out of sage.env and into sage.interfaces.gap where some other gap command processing already takes place.
Configuration menu - View commit details
-
Copy full SHA for 19d44ff - Browse repository at this point
Copy the full SHA 19d44ffView commit details -
src/doc/en/prep/Quickstarts/Abstract-Algebra.rst: don't list subgroups
The doctest for the normal_subgroups() of DihedralGroup(8) cannot simply list them all, because it turns out that in GAP the NormalSubgroups() function has some freedom to choose representatives. As a result, verbatim output is not guaranteed. We are already sorting the subgroups as part of an earlier attempt to solve this problem, so the two trivial subgroups should live at the beginning and end of the list. As such, we use "..." to match whatever is output for the intermediate groups. We also add a new test for the number of normal subgroups. This fixes a test failure on Conda.
Configuration menu - View commit details
-
Copy full SHA for 76dd352 - Browse repository at this point
Copy the full SHA 76dd352View commit details -
src/sage/groups/matrix_gps/finitely_generated_gap.py: fix a GAP doctest
Our doctest for as_permutation_group() checks that algorithm="smaller" produces a group that is different from the one obtained with algorithm=None. But this need not be the case (and sometimes it is not): the SmallerDegreePermutationRepresentation() function in GAP is doing its best, but it "might involve the use of random elements and the permutation representation (or even the degree of the representation) is not guaranteed to be the same for different calls." Bottom line, we can't count on the "smaller" group actually being smaller than, or even different from, what we would get without algorithm="smaller". So we drop that test, and compare the degrees of the two groups instead, allowing for equality. This fixes a failing test on Gentoo and Conda.
Configuration menu - View commit details
-
Copy full SHA for 27643f8 - Browse repository at this point
Copy the full SHA 27643f8View commit details -
build/pkgs/gap/spkg-configure.m4: try to link against libgap
It's possible for the gap CLI to be installed but libgap to be unusable, for example on systems where libgap-devel is a separate package. We need libgap, so now we test for it.
Configuration menu - View commit details
-
Copy full SHA for c824a8b - Browse repository at this point
Copy the full SHA c824a8bView commit details -
build/pkgs/gap/spkg-configure.m4: change the->for in a message
Change the one "checking the" message to match all of the "checking for" messages.
Configuration menu - View commit details
-
Copy full SHA for 732e12d - Browse repository at this point
Copy the full SHA 732e12dView commit details -
src/sage/features: attempt to load gap packages during feature tests
While testing for a GAP package, we now try to load the package first. Without this, testing of optional GAP packages would not be possible: most "extra" GAP packages are not loaded automatically, so if the feature test didn't load them, they would remain unloaded (and hence unavailable) during test runs. This new behavior also allows us to cache these feature tests again.
Configuration menu - View commit details
-
Copy full SHA for 70747ac - Browse repository at this point
Copy the full SHA 70747acView commit details -
Configuration menu - View commit details
-
Copy full SHA for deaf7a9 - Browse repository at this point
Copy the full SHA deaf7a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for d37c279 - Browse repository at this point
Copy the full SHA d37c279View commit details -
build/pkgs/gap_packages/SPKG.rst: fix confusing SPKG description
Now that polycyclic and a few other packages have been moved back into the core gap SPKG, the description of gap_packages is nonsensical. No gap_packages are loaded automatically in Sage. Let's just say that.
Configuration menu - View commit details
-
Copy full SHA for 694bee9 - Browse repository at this point
Copy the full SHA 694bee9View commit details -
src/sage/graphs/generators/families.py: add tilde to a :meth:
Otherwise it displays the big, ugly, fully-qualified name.
Configuration menu - View commit details
-
Copy full SHA for 387bf96 - Browse repository at this point
Copy the full SHA 387bf96View commit details -
build/pkgs/gap_packages/spkg-install.in: fix install with system gap
When the system GAP is installed and the SPKG gap is not, the extra gap_packages need to know where to find sysinfo.gap. We can execute a "gap -c ..." command for this.
Configuration menu - View commit details
-
Copy full SHA for a73d0ec - Browse repository at this point
Copy the full SHA a73d0ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2984f1 - Browse repository at this point
Copy the full SHA c2984f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0102206 - Browse repository at this point
Copy the full SHA 0102206View commit details -
build/pkgs/gap: require "gap" in addition to libgap-dev on debian
With only libgap-dev, we are missing the "gap" executable.
Configuration menu - View commit details
-
Copy full SHA for bf72457 - Browse repository at this point
Copy the full SHA bf72457View commit details -
build/pkgs/gap: remove opensuse distro package information
We added this for the CI to try, and it didn't work.
Configuration menu - View commit details
-
Copy full SHA for e6858a0 - Browse repository at this point
Copy the full SHA e6858a0View commit details -
build/pkgs/gap: redirect stderr in spkg-configure.m4 tests
Without this, when certain tests fail, we print a bunch of junk to the screen (and to config.log).
Configuration menu - View commit details
-
Copy full SHA for b0ec017 - Browse repository at this point
Copy the full SHA b0ec017View commit details -
build/pkgs/gap: add more fedora package information
The GAP subpackages listed at, https://packages.fedoraproject.org/pkgs/gap/ are not included with the superpackage install, so we have to list the ones that we use explicitly.
Configuration menu - View commit details
-
Copy full SHA for 5d10bee - Browse repository at this point
Copy the full SHA 5d10beeView commit details -
build/pkgs/gap{,_packages}: install packagemanager with the gap core …
…SPKG If the user doesn't want to use either the sage package manager or his system's package manager, then this should be available immediately.
Configuration menu - View commit details
-
Copy full SHA for 404f23a - Browse repository at this point
Copy the full SHA 404f23aView commit details