Skip to content

Document grouped (ColGroup) columns in search downloads#30

Open
roed-math wants to merge 1 commit into
mainfrom
ai/t40-colgroup-download-docs
Open

Document grouped (ColGroup) columns in search downloads#30
roed-math wants to merge 1 commit into
mainfrom
ai/t40-colgroup-download-docs

Conversation

@roed-math

Copy link
Copy Markdown
Owner

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 ColGroup that downloads as a nested
list of its subcolumns' values — the abstract subgroup search (Subgroup/Ambient/Quotient) — the
header listed only the group titles ([Label, Subgroup, Ambient, Quotient]) and the definitions loop
skipped the groups entirely (their knowl is None), so the individual subcolumns were never described.
This adds SearchCol.download_subcols (overridden in ColGroup) identifying exactly the groups that
download as a nested list, and uses it in downloader.py to 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 set download_col (cmf traces/atkin-lehner, conjugacy-class
powers) 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants