Amendment urls - #1482
Draft
tillprochaska wants to merge 4 commits into
Draft
Conversation
tillprochaska
force-pushed
the
amendment-urls
branch
from
June 29, 2026 14:02
4a10137 to
4b07a5c
Compare
tillprochaska
force-pushed
the
odp-document-scraper
branch
from
July 6, 2026 10:45
16647c9 to
d808446
Compare
tillprochaska
force-pushed
the
amendment-urls
branch
from
July 7, 2026 12:54
4b07a5c to
1911e11
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for storing, exporting, serving, and displaying an “amendment PDF URL” for amendment-related votes (sourced from the EP ODP plenary-documents endpoint), including a new UI affordance to let users open the amendment text.
Changes:
- Backend: add
amendment_urlto the vote model + migration, export output, and related-votes API serialization. - Scraper: extend
ODPDocumentScraperto derive an amendment PDF URL from ODP “amendment list” ranges. - Frontend: add an action slot to
Cardand render an external-link action inAmendmentVoteCard(including a new SVG symbol).
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/images/icons.svg | Adds an external-link SVG symbol used by the UI action link. |
| frontend/src/components/Card.tsx | Adds an action slot to cards (note: currently missing className passthrough). |
| frontend/src/components/Card.css | Switches card layout to CSS grid and introduces .card__action area. |
| frontend/src/components/AmendmentVoteCard.tsx | Displays a “View text” external link when amendment_url is present. |
| frontend/src/api/generated/types.gen.ts | Extends RelatedVote with amendment_url. |
| backend/howtheyvote/scrapers/votes.py | Derives amendment_url in ODPDocumentScraper and includes it in fragments. |
| backend/howtheyvote/models/vote.py | Adds amendment_url column mapping to the Vote model. |
| backend/howtheyvote/export/init.py | Includes amendment_url in the votes export row + CSV output. |
| backend/howtheyvote/api/votes_api.py | Includes amendment_url in the related-votes API payload. |
| backend/howtheyvote/api/serializers.py | Adds amendment_url to RelatedVoteDict schema typing. |
| backend/howtheyvote/alembic/versions/81451d6f5456_add_amendment_url_column_to_votes_table.py | Migration to add/drop the amendment_url column. |
| backend/tests/scrapers/test_votes.py | Updates scraper tests and adds coverage for amendment URL derivation. |
| backend/tests/export/test_init.py | Updates export tests for the new CSV column. |
| backend/tests/api/test_votes_api.py | Updates API tests to expect amendment_url. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The amendment full-text is part of an amendment list that contains multiple amendments by the same authors. This retrieves all amendment lists for a document, then finds the list that contains the vote’s amendment number. This requires the `amendment_number` to be present, i.e. it will work only after the VOT lists have been scraped.
tillprochaska
force-pushed
the
amendment-urls
branch
from
July 8, 2026 22:27
1911e11 to
bc54f79
Compare
tillprochaska
force-pushed
the
amendment-urls
branch
from
July 8, 2026 22:28
bc54f79 to
e1531ff
Compare
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.
Merge #1472 first.