Various improvements to code snippets for groups#6942
Open
rvisser7 wants to merge 21 commits intoLMFDB:mainfrom
Open
Various improvements to code snippets for groups#6942rvisser7 wants to merge 21 commits intoLMFDB:mainfrom
rvisser7 wants to merge 21 commits intoLMFDB:mainfrom
Conversation
…e_gap code snippets for groups
…ey code snippet for abstract groups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds some various improvements to the code snippets for Galois groups and abstract groups. In summary: Gap has been added to Galois groups, Oscar and transitive group snippets now added to abstract groups, and sidebar download links and snippet tests now added for all languages in both sections.
As always, any comments/feedback much appreciated! 🙂
Added support for GAP in the code snippet testing CI (many thanks @havarddj for the help!).
Added GAP code snippets to Galois groups, along with a sidebar download link for downloading the Gap commands, and added Gap snippet tests.
http://localhost:37777/GaloisGroup/4T2
https://beta.lmfdb.org/GaloisGroup/4T2
http://localhost:37777/GaloisGroup/4T2/download/gap
https://beta.lmfdb.org/GaloisGroup/4T2/download/gap
Added new Oscar code snippets to abstract groups (thus partially resolving #6908), as well as also a few new Sage and Sage (using Gap) code snippets.
http://localhost:37777/Groups/Abstract/6.1
https://beta.lmfdb.org/Groups/Abstract/6.1
Added code snippet downlink links for abstract groups in the right sidebar, and added code snippets tests (note that the "{lang} commands" download links are currently given at
<label>/codedownload/<lang>, as the separate "Group to {lang}" constructions are already hosted at<label>/download/<lang>).http://localhost:37777/Groups/Abstract/6.1/codedownload/gap
http://localhost:37777/Groups/Abstract/6.1/codedownload/magma
http://localhost:37777/Groups/Abstract/6.1/codedownload/sage
http://localhost:37777/Groups/Abstract/6.1/codedownload/sage_gap
http://localhost:37777/Groups/Abstract/6.1/codedownload/oscar
I've had a go at adjusting and refactoring the code in
groups/abstract/web_groups.pywhich generates the top code snippet for abstract groups (adjusting the original code I wrote during the LMFDB workshop last year). Since there's many cases to consider, this is now handled in a separate function calledcreate_top_code_snippet. We also now use thecode.yamlfile to fetch code to construct particular families of groups (e.g. Symmetric, Alternating, Cyclic, Dihedral, etc.), instead of having the snippets hardcoded in the python files, therefore hopefully making it easier for others to add new languages in the future. (currently, the only slight exception to this is still the Lie-type code snippets. Since there's a lot of Lie families, and the Magma commands are already in thegps_familiestable, there's no Lie-type code in thecode.yamlfile).Links to examples of groups which test the many different top code snippets are given in this comment in PR #6579.
Added code snippets for the transitive group constructions to abstract groups. This is implemented in the
create_transitive_code_snippetsfunction.I've also moved the code to generate the Lie type representation code snippets into the
create_lie_code_snippetsfunction. Since there can be multiple different Lie type representations and transitive group representations, and separate code snippets have to be generated for each one, I think it's easier to have the logic for these code snippets handled separately from the rest of the code snippets.