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

Fix orbit conversion for permutation elements #39843

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

EigenVector22
Copy link

The input_for_gap helper function within the orbit method failed to convert Sage PermutationGroupElement objects when they were present within the structure being acted upon (e.g. tuple or set passed with action="OnSets"). It incorrectly tried to look them up in the base domain map.

This modifies the base case of input_for_gap to check if the element is a PermutationGroupElement and if so, converts it using libgap() before passing it to GAP.

Added doctest.

Fixes #29151

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@EigenVector22
Copy link
Author

@dimpase can you please review this,
Thanks,

@dimpase
Copy link
Member

dimpase commented Mar 31, 2025

@saraedum @roed314 - please at least let the CI run here, as I can't trigger it

@roed314
Copy link
Contributor

roed314 commented Mar 31, 2025

@saraedum @roed314 - please at least let the CI run here, as I can't trigger it

Done. Thanks for reviewing!

Copy link

github-actions bot commented Apr 1, 2025

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

@EigenVector22 EigenVector22 force-pushed the fix-issue-29151-orbit-gap-conversion branch from f0d5c32 to 5174084 Compare April 1, 2025 19:09
@EigenVector22
Copy link
Author

hello, @roed314, can you run the CI again,

had a small doubt, hadn't i force pushed after resolving the merge conflicts, the CI would have to still be ran in that case ?,
Thanks,

@roed314
Copy link
Contributor

roed314 commented Apr 1, 2025

The CI is run whenever there's a new version. I'm still seeing issues with 10.6 vs 10.6.rc1 (take a look at the Files Changed tab).

@EigenVector22
Copy link
Author

ya, i think something went really wrong during the rebase or something, can you confirm this,:

EigenVector22@LAPTOP-NLAVJRP4:~/sage$ cat VERSION.txt
git log -n 1
SageMath version 10.6, Release Date: 2025-03-31
commit b8f98e7c7c3804caffcf203789a03533bd40c41c (HEAD -> develop, tag: 10.6, upstream/master, upstream/develop, 
origin/develop, origin/HEAD)
Author: Release Manager <[email protected]>
Date:   Tue Apr 1 00:36:04 2025 +0200

 Updated SageMath version to 10.6
 EigenVector22@LAPTOP-NLAVJRP4:~/sage$

It is showing version 10.6, instead of 10.6rc1, is it right ?

@user202729
Copy link
Contributor

Do this

git rebase @^ --onto @^^

then git push -f. Afterwards the commit history ought to look like

commit 0000000000000000000000000000000000000000 (fix-issue-29151-orbit-gap-conversion
)
Author: EigenVector22 <[email protected]>
Date:   Mon Mar 31 22:47:27 2025 +0530

    Fix orbit conversion for permutation elements
    
    The `input_for_gap` helper function within the `orbit` method
    failed to convert Sage `PermutationGroupElement` objects when
    they were present within the structure being acted upon (e.g.,
    a tuple or set passed with `action="OnSets"`). It incorrectly
    tried to look them up in the base domain map.
    
    This commit modifies the base case of `input_for_gap` to check
    if the element is a `PermutationGroupElement` and, if so, converts
    it using `libgap()` before passing it to GAP.
    
    Added doctest.

commit b8f98e7c7c3804caffcf203789a03533bd40c41c (upstream/develop, upstream/HEAD)
Author: Release Manager <[email protected]>
Date:   Tue Apr 1 00:36:04 2025 +0200

    Updated SageMath version to 10.6

commit 10741006a4794b7db82942db55b97033d5905431
Author: Release Manager <[email protected]>
Date:   Thu Mar 27 23:39:59 2025 +0100

    Updated SageMath version to 10.6.rc1

The `input_for_gap` helper function within the `orbit` method
failed to convert Sage `PermutationGroupElement` objects when
they were present within the structure being acted upon (e.g.,
a tuple or set passed with `action="OnSets"`). It incorrectly
tried to look them up in the base domain map.

This commit modifies the base case of `input_for_gap` to check
if the element is a `PermutationGroupElement` and, if so, converts
it using `libgap()` before passing it to GAP.

Added doctest.
@EigenVector22 EigenVector22 force-pushed the fix-issue-29151-orbit-gap-conversion branch from 5174084 to 4211503 Compare April 2, 2025 06:53
@EigenVector22
Copy link
Author

It worked thanks a lot,

@EigenVector22
Copy link
Author

@roed314 why is the build doc failing?,
any feedback for me to change/fix something if its broken
Thanks,

@dimpase
Copy link
Member

dimpase commented Apr 2, 2025

there is a problem in a thematic tutorial in French (you can get the raw log of the CI run and look there)

2025-04-02T12:57:04.6050661Z [sagemath_doc_pdf-none] [spkg-install] Run number 2 of rule 'pdflatex'
2025-04-02T12:57:04.6050758Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-04-02T12:57:04.6050855Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-04-02T12:57:04.6051169Z [sagemath_doc_pdf-none] [spkg-install] Running 'lualatex --file-line-error --interaction=batchmode  -recorder  "tutorial-fr.tex"'
2025-04-02T12:57:04.6051268Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-04-02T12:57:04.6051473Z [sagemath_doc_pdf-none] [spkg-install] This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Debian) 
2025-04-02T12:57:04.6051686Z [sagemath_doc_pdf-none] [spkg-install]  restricted system commands enabled.
2025-04-02T12:57:04.6051925Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: ====Undefined refs and citations with line #s in .tex file:
2025-04-02T12:57:04.6052190Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no T (U+0054) in font nullfont!
2025-04-02T12:57:04.6052402Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no a (U+0061) in font nullfont!
2025-04-02T12:57:04.6052608Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no b (U+0062) in font nullfont!
2025-04-02T12:57:04.6052819Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no l (U+006C) in font nullfont!
2025-04-02T12:57:04.6053026Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no e (U+0065) in font nullfont!
2025-04-02T12:57:04.6053234Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no d (U+0064) in font nullfont!
2025-04-02T12:57:04.6053442Z [sagemath_doc_pdf-none] [spkg-install]   Missing character: There is no e (U+0065) in font nullfont!
2025-04-02T12:57:04.6053630Z [sagemath_doc_pdf-none] [spkg-install]  And 301 more --- see log file 'tutorial-fr.log'
2025-04-02T12:57:04.6053847Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Sometimes, the -f option can be used to get latexmk
2025-04-02T12:57:04.6054011Z [sagemath_doc_pdf-none] [spkg-install]   to try to force complete processing.
2025-04-02T12:57:04.6054240Z [sagemath_doc_pdf-none] [spkg-install]   But normally, you will need to correct the file(s) that caused the
2025-04-02T12:57:04.6054386Z [sagemath_doc_pdf-none] [spkg-install]   error, and then rerun latexmk.
2025-04-02T12:57:04.6054625Z [sagemath_doc_pdf-none] [spkg-install]   In some cases, it is best to clean out generated files before rerunning
2025-04-02T12:57:04.6054793Z [sagemath_doc_pdf-none] [spkg-install]   latexmk after you've corrected the files.
2025-04-02T12:57:04.6055005Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Getting log file 'tutorial-fr.log'
2025-04-02T12:57:04.6055162Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Examining 'tutorial-fr.fls'
2025-04-02T12:57:04.6055319Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Examining 'tutorial-fr.log'
2025-04-02T12:57:04.6055511Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Index file 'tutorial-fr.idx' was written
2025-04-02T12:57:04.6055648Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: References changed.
2025-04-02T12:57:04.6055783Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: References changed.
2025-04-02T12:57:04.6055913Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: References changed.
2025-04-02T12:57:04.6056148Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Log file says output to 'tutorial-fr.pdf'
2025-04-02T12:57:04.6056346Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Summary of warnings from last run of *latex:
2025-04-02T12:57:04.6056551Z [sagemath_doc_pdf-none] [spkg-install]   =====Latex reported missing or unavailable character(s).
2025-04-02T12:57:04.6056694Z [sagemath_doc_pdf-none] [spkg-install] =====See log file for details.
2025-04-02T12:57:04.6056894Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Errors, so I did not complete making targets
2025-04-02T12:57:04.6057102Z [sagemath_doc_pdf-none] [spkg-install] Collected error summary (may duplicate other messages):
2025-04-02T12:57:04.6057295Z [sagemath_doc_pdf-none] [spkg-install]   pdflatex: Command for 'pdflatex' gave return code 1
2025-04-02T12:57:04.6057597Z [sagemath_doc_pdf-none] [spkg-install]       Refer to 'tutorial-fr.log' and/or above output for details
2025-04-02T12:57:04.6057682Z [sagemath_doc_pdf-none] [spkg-install] 
2025-04-02T12:57:04.6057882Z [sagemath_doc_pdf-none] [spkg-install] make[4]: *** [Makefile:30: tutorial-fr.pdf] Error 12
2025-04-02T12:57:04.6058132Z [sagemath_doc_pdf-none] [spkg-install] make[4]: Leaving directory '/sage/local/share/doc/sage/latex/fr/tutorial'
2025-04-02T12:57:04.6058289Z [sagemath_doc_pdf-none] [spkg-install] Error building the documentation.
2025-04-02T12:57:04.6058497Z [sagemath_doc_pdf-none] [spkg-install] Traceback (most recent call last):
2025-04-02T12:57:04.6058703Z [sagemath_doc_pdf-none] [spkg-install]   File "<frozen runpy>", line 198, in _run_module_as_main
2025-04-02T12:57:04.6058927Z [sagemath_doc_pdf-none] [spkg-install]   File "<frozen runpy>", line 88, in _run_code
2025-04-02T12:57:04.6059158Z [sagemath_doc_pdf-none] [spkg-install]   File "/sage/src/sage_docbuild/__main__.py", line 532, in <module>
2025-04-02T12:57:04.6059283Z [sagemath_doc_pdf-none] [spkg-install]     sys.exit(main())
2025-04-02T12:57:04.6059397Z [sagemath_doc_pdf-none] [spkg-install]              ^^^^^^
2025-04-02T12:57:04.6059645Z [sagemath_doc_pdf-none] [spkg-install]   File "/sage/src/sage_docbuild/__main__.py", line 528, in main
2025-04-02T12:57:04.6059745Z [sagemath_doc_pdf-none] [spkg-install]     build()
2025-04-02T12:57:04.6059961Z [sagemath_doc_pdf-none] [spkg-install]   File "/sage/src/sage_docbuild/builders.py", line 298, in pdf
2025-04-02T12:57:04.6060175Z [sagemath_doc_pdf-none] [spkg-install]     raise RuntimeError(error_message % (command, tex_dir))
2025-04-02T12:57:04.6060469Z [sagemath_doc_pdf-none] [spkg-install] RuntimeError: failed to run $MAKE all-pdf in /sage/local/share/doc/sage/latex/fr/tutorial
2025-04-02T12:57:04.6060552Z [sagemath_doc_pdf-none] [spkg-install] 
2025-04-02T12:57:04.6060785Z [sagemath_doc_pdf-none] [spkg-install]     Note: incremental documentation builds sometimes cause spurious
2025-04-02T12:57:04.6061008Z [sagemath_doc_pdf-none] [spkg-install]     error messages. To be certain that these are real errors, run
2025-04-02T12:57:04.6061205Z [sagemath_doc_pdf-none] [spkg-install]     "make doc-clean doc-uninstall" first and try again.
2025-04-02T12:57:04.6061414Z [sagemath_doc_pdf-none] [spkg-install] make[3]: *** [Makefile:74: doc-pdf--fr-tutorial] Error 1
2025-04-02T12:57:04.6061802Z [sagemath_doc_pdf-none] [spkg-install] LATEXOPTS="--file-line-error --interaction=batchmode" sage --docbuild thematic_tutorials pdf --no-prune-empty-dirs

@EigenVector22
Copy link
Author

how to fix that?

@dimpase
Copy link
Member

dimpase commented Apr 2, 2025

you don't have to fix it, it's irrelevant to this PR

@EigenVector22
Copy link
Author

EigenVector22 commented Apr 3, 2025

i had small doubt, can we get this merged or we'll have to wait till the next release?
Thanks,

@user202729
Copy link
Contributor

Has anyone reviewed the code?

@EigenVector22
Copy link
Author

i am not sure, i haven't received any feedback on it, just the CIs have been run,
Thanks

@saraedum @roed314 - please at least let the CI run here, as I can't trigger it

Done. Thanks for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

group orbits don't have full GAP functionality
4 participants