Document grouped (ColGroup) columns in search downloads#30
Open
roed-math wants to merge 1 commit into
Open
Conversation
Search-result downloads describe each column in a header comment and a definitions section at the bottom of the file. For sections whose columns are grouped with a ColGroup and downloaded as a nested list of subcolumn values (the abstract subgroup search: Subgroup/Ambient/Quotient), the header listed only the group titles (e.g. [Label, Subgroup, Ambient, Quotient]) and the definitions loop skipped the groups entirely (their knowl is None), so the individual subcolumns were never described. Add SearchCol.download_subcols(info) (overridden in ColGroup) that returns a group's subcolumns exactly when it downloads as a nested list (download_col is None and subcols is a concrete list); ColGroups that set download_col (cmf traces/atkin_lehner, cc power_cols) download as a single value and are unchanged. In downloader.py, use it to (a) spell out each grouped column's subcolumn titles under the "Each entry ... has the form" comment and (b) expand each grouped column in the definitions section, documenting every subcolumn by its short title, name and knowl. Verified by generating sage/magma/gp/text downloads for the subgroup search (now documents all 18/2/11 subcolumns matching the data), plus regressions for cmf newforms, conjugacy classes and number fields (byte-identical headers); the downloaded sage/gp/magma files parse and run. cmf + abstract-group + number field download tests pass; pyflakes/ruff clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Search-result downloads describe each column in a header comment and in a definitions section at the
bottom of the file. For sections whose columns are grouped with a
ColGroupthat downloads as a nestedlist of its subcolumns' values — the abstract subgroup search (
Subgroup/Ambient/Quotient) — theheader listed only the group titles (
[Label, Subgroup, Ambient, Quotient]) and the definitions loopskipped the groups entirely (their knowl is
None), so the individual subcolumns were never described.This adds
SearchCol.download_subcols(overridden inColGroup) identifying exactly the groups thatdownload as a nested list, and uses it in
downloader.pyto spell out each group's subcolumns under the"Each entry has the form" comment and to document every subcolumn (short title, name, knowl) in the
definitions section.
ColGroups that setdownload_col(cmf traces/atkin-lehner, conjugacy-classpowers) download as a single value and are unchanged, as are all non-grouped columns. Verified by
generating sage/magma/gp/text subgroup downloads (subcolumns now fully documented and the counts match
the data) and confirming the sage/gp/magma files still parse and run, with cmf/conjugacy-class/number-field
downloads byte-identical; cmf, abstract-group and number-field download tests pass.
Addresses LMFDB#6477.
🤖 Generated with Claude Code