Fix hypergeometric famhodge search, add Hodge polygon plot, and 404 malformed labels (#3406) - #25
Open
roed-math wants to merge 1 commit into
Open
Fix hypergeometric famhodge search, add Hodge polygon plot, and 404 malformed labels (#3406)#25roed-math wants to merge 1 commit into
roed-math wants to merge 1 commit into
Conversation
…DB#3406) Three good-first-issue fixes for hypergeometric motives: - (a) A bare famhodge query now defaults to a family search (the family Hodge vector is a family-level invariant), so it returns matching families instead of zero motives; an explicit motive search on famhodge with no matches flashes a link to the family search. - (b) New plot.hodge_polygon_plot renders the Hodge polygon (abelian-variety / local-field Newton-polygon style, scaled to a 2:1 box) on family and motive pages of positive weight. - (c) Malformed labels (family, motive, /plot/*, bad t) return 404 instead of 500 or a redirect-with-flash; a full motive label pasted as one path segment 301-redirects to the motive page. Escaped the unescaped '.' in HGM_LABEL_RE. Verified with the flask test client on devmirror and pytest lmfdb/hypergm (35 passed); pyflakes clean. Added tests for (a), (b) and (c). Note: the hgm.hodge_polygon knowl does not yet exist (content proposed in PR). 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.
This addresses the three open items of the HGM good-first-issue checklist. (a) A bare
family-Hodge-vector query such as
?famhodge=[1,5,1]now runs a family search (thefamily Hodge vector is a family-level invariant) and returns the matching families
instead of zero motives; an explicit motive search on a family Hodge vector with no
matching motives flashes a link to the corresponding family search. (b) A Hodge polygon
is now displayed on family and motive pages of positive weight, rendered in the style of
the abelian-variety and local-field Newton polygons (grid, shaded region, convex polygon
line, vertex markers) and scaled to a consistent 2:1 box. (c) Malformed labels now return
a clean 404 instead of a 500 or a redirect-with-flash (this includes the family, motive,
/plot/*and/dataroutes and the specialization valuet), while a full motive labelpasted as a single path segment 301-redirects to the motive page; the unescaped
.inHGM_LABEL_REwas also fixed. New tests cover all three items and the fullhypergmsuite passes (35). Note: the
hgm.hodge_polygonknowl still needs to be created (proposedtext is in the ticket). Addresses LMFDB#3406.
🤖 Generated with Claude Code