-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Fix spkg-install of p_group_cohomology #28711
Comments
comment:1
The spkg-install script does use sdh_configure, sdh_make and sdh_pip_install, but is also uses "$MAKE install" and "$MAKE html" and "cp -r". I guess "$MAKE install" should become "sdh_make_install", but I don't know what to do with "$MAKE html" and "cp -r" which is used to build and install the package documentation. |
This comment has been minimized.
This comment has been minimized.
comment:3
Can you use |
comment:4
Ticket retargeted after milestone closed |
comment:6
Also it looks like dependencies are not right. |
comment:8
There have for a long time been issues with installation of |
comment:9
I have been reluctant to work on |
comment:10
Thanks for the info. Then let's postpone work on this until after modularization of sagelib, which will eliminate this complicated dependency. |
Dependencies: #30151 |
comment:13
There is an issue that came up at #30349: Apparently there is a problem with the installation folder of gap code that is part of the package. It isn't clear to me how this should be fixed. |
comment:14
On the other ticket, Dima stated: /// You can call GAP and examine GAPInfo.RootPaths. When looking for a package, GAP appends pkg/ to each directory in this list, cf. 9.2 GAP Root Directories in its manual. IMHO, Python wheels are build to be relocateable, so it's futile to try to install GAP data via setup.py. I'd say, install a GAP package separately, not from setup.py from spkg-install. By the way, GAP now has its own package manager. Maybe you can use it (https://github.com/gap-packages/PackageManager) - it's in gap_packages, I think. /// So, I'll have a look at it. Question: When using GAP's package manager, it would probably be possible to do it in the setup.py, using libgap. Should I keep it there, or is it cleaner to move installation of GAP code to spkg-install? |
comment:15
one can do this in setup.py regardless, getting a proper path to install a GAP package to is just
|
comment:16
not sure how "pythonic" this is though. |
comment:17
Replying to @simon-king-jena:
Do I understand correctly that GAP's PackageManager is for installing packages from the GAP ecosystem? What I want to do is to use some GAP code that is NOT an upstream GAP package (not even an unofficial "submitted" package). Anyway, using some GAP infrastructure to install my files, rather than hacking paths, seems the right approach to me. |
comment:18
I see one and a half clear disadvantages of the PackageManager: The PackageManager is provided by the gap_packages spkg. Thus, p_group_cohomology would need yet another dependency. I'd rather avoid to add it. It should be enough to have the Small Groups library in GAP (which I think meanwhile is available without installing optional spkgs). The "half" disadvantage is the GAP-typical lack of a clear documentation. The documentation of InstallPackage says that one way to install a package is to provide the URL of a valid PackageInfo.g file. But nowhere is defined (at least I couldn't find it at https://gap-packages.github.io/PackageManager/doc/chap0.html) what constitutes a "valid" PackageInfo.g file. In other words, it is explained how to install a package, but it is not explained how to create a package that can be installed. Do you have pointers how to create a GAP package? |
comment:19
PS: I just installed the gap_package spkg, but apparently it does not provide the PackageManager. So, I guess it is no option. |
comment:20
I am unhappy, because I don't see a good solution for the installation problems of the GAP parts of the spkg. WHAT NEEDS TO BE AVAILABLE:
CURRENT APPROACH:
CURRENT PROBLEM:
ALTERNATIVE APPROACH:
PROBLEM WITH THE ALTERNATIVE APPROACH:
So, I believe the current approach is just fine: We need a place for some GAP readable files, that logically belong to a Sage package (p_group_cohomology) but can hardly be seen a stand-alone GAP package. Thus, some place in $SAGE_LOCAL/share/sage/ext/gap seems just right to me. Only we need to understand why, according to #30349, Sage puts stuff into $SAGE_LOCAL/lib/python3.7/site-packages/$SAGE_LOCAL/share/sage/ext/gap/modular_cohomology/, although setup.py clearly states, |
comment:21
AHA! Can it be that $SAGE_LOCAL/share/sage has been removed?
Then of course a different location is needed. In that case, os.listdir(os.path.join(SAGE_LOCAL,"share","gap","pkg","p_group_cohomology")) seems good to me. EDIT: Since it isn't really a GAP package, os.listdir(os.path.join(SAGE_LOCAL,"share","p_group_cohomology")) seems better! |
comment:22
Replying to @simon-king-jena:
I think such data files should just be installed next to the python files of the package. |
comment:23
It should definitely not depend on the environment variable |
comment:116
Hm......
|
New commits:
|
comment:119
Replying to @jhpalmieri:
Sure, that makes sense! Thank you for spotting it! I'll try, and if it works, I will also remove the comment from the doc that states that docbuilding during package installation is broken. |
comment:121
Thank you very much, when using spkg-postinst, building the documentation works! New commits:
|
comment:122
PS: The new tarball (removing the remark on broken docbuild) is on github. |
comment:123
OK, but one doctest is failing
note that also at Sage prompt computing H and H0 gives
not sure how serious it is - if it's not, and you don't have time to fix it now, just mark it as a known error, and open another ticket. |
comment:124
Replying to @dimpase:
Thank you for spotting this! Indeed I forgot that there are some doctests in the Sage src tree, and only tested the package's own test suite.
Hm. I'll have a closer look. Two cohomology rings should evaluate equal if the two ring representations are identical. This should be the case here, as there is an isomorphism mapping the generators one to one. ... unless there is a tail reduction of the relations in one case but not in the other case.
At least I'll have a look now. |
comment:125
Interesting:
So, Singular says that the two ideals are identical, but the string representation stored in the cohomology ring is different. |
comment:126
The relations of H and H0 are equal as sets, but not as lists:
EDIT - oops, sorry, there are just a bit different - as you noticed already, I suppose. |
comment:127
Indeed, the problem is the missing interreduction:
Hm. What to do about it? |
comment:128
Replying to @dimpase:
No, they aren't. They are equal after doing interreduction.
|
comment:129
Back to the question what to do about it. The point of the equality check is to provide a VERY QUICK test. So, I wouldn't like to do interreduction before comparing. But one could fix the doctest by checking that the two rings are indeed isomorphic by mapping the list of generators one-to-one. |
comment:130
I would not call what we see here a "pythonic" equality. What we see here is more like On the other hand what we have here is a stronger kind of equvalence than just a (graded) ring isomorphism, no? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:132
Replying to @dimpase:
I chose "equality of cohomology rings" to mean "equality of ring representations". So, with this choice, one would have Note that to check whether two ideals represent the same set of polynomials, one would need to compute Gröbner bases. But that's very expensive. Therefore, it was decided by Sage (at least in the past, I don't know if that has changed) to not do the expensive test, but to compare generators instead. And that's what I do here, too.
Sure. I wrote a research paper (with Bettina Eick) on classifying the cohomology rings of groups of order <=81 up to graded isomorphism. And that's a totally different problem. Here, equality is not "isomorphism of graded rings", but "identity of ring representations". |
comment:133
OK, good. |
Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/313251166 to Dima Pasechnik |
comment:134
Looking good. On to #30787...? |
Changed reviewer from Dima Pasechnik to Dima Pasechnik, Matthias Koeppe |
Changed branch from u/SimonKing/fix_spkg_install_of_p_group_cohomology to |
This is a reformulation of the ticket summary, after some discussion went on.
p_group_cohomology is divided into four parts:
Problem: Some of the modules refer to SAGE_LOCAL at installation or at run time, respectively. Moreover, the GAP helper module is currently installed into SAGE_LOCAL/share/sage, which has been removed.
Issues of each part:
Proposed solution:
Side remark: It would be possible to move the Python / Cython modules into Sage's src tree, but that would created issues with testing and documentation.
LoadPackage("pGroupCohomologyHelpers");
. Problem: How to determine GAP's pkg folder at installation time without referring to SAGE_LOCAL?$MAKE html
and then copied. It was suggested to replacecp -r
bysdh_install
.Upstream of the package: https://github.com/sagemath/p_group_cohomology/releases/tag/v3.3.2
CC: @embray @jhpalmieri @orlitzky @kiwifb @dimpase
Component: packages: optional
Author: Simon King
Branch/Commit:
f4e5f6a
Reviewer: Dima Pasechnik, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/28711
The text was updated successfully, but these errors were encountered: