Repository navigation
ES-AR: list the per-municipality files from IDEAragon - #263
Merged
Merged
Conversation
This was referenced Sep 11, 2026
ivorbosloper
force-pushed
the
split/es_ar
branch
2 times, most recently
from
September 12, 2026 15:12
c2bdb6a to
3e82771
Compare
Aragon publishes SIGPAC per municipality rather than as one download, so the converter lists them from IDEAragon and reads them all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
ivorbosloper
force-pushed
the
split/es_ar
branch
from
September 12, 2026 16:13
3e82771 to
f26179f
Compare
m-mohr
approved these changes
Sep 17, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The municipality filter prevents runtime discovery, and the new discovery path lacks dedicated test coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates the ES-AR converter to discover and process IDEAragon’s per-municipality SIGPAC archives.
Changes:
- Adds IDEAragon product discovery and filtering.
- Updates field mappings and campaign metadata.
- Adds fixture coverage and changelog documentation.
File summaries
| File | Summary |
|---|---|
tests/test_convert.py |
Registers ES-AR fixture; discovery-path behavior remains untested. |
fiboa_cli/datasets/es_ar.py |
Adds product discovery and mappings; the municipality filter uses the wrong archive-name position, blocking runtime downloads. |
CHANGELOG.md |
Documents the per-municipality source update. |
Review details
Suppressed comments (1)
tests/test_convert.py:87
- This test supplies
input_files, so it exercises only the fixture conversion and bypasses the newget_urls()path. Add a mocked test for the IDEAragon response and assert municipality filtering, generated download URLs, andedition_year; otherwise the central runtime behavior is untested.
"es_ar": {"variant": "2026", **_input_files("es_ar", "es_ar_44216.shp.zip")},
- Files reviewed: 3/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+81
to
+95
| def get_urls(self): | ||
| urls = {} | ||
| years = set() | ||
| for province in PROVINCES: | ||
| for product in self.list_products(province): | ||
| name = product["name"] | ||
| # the intersection also returns neighbouring municipalities | ||
| if product["esquema"] != "Municipio" or not name.startswith(province): | ||
| continue | ||
| urls[DOWNLOAD_URL.format(name=name)] = f"es_ar_{name}.shp.zip" | ||
| years.add(str(product["fecha"])[:4]) | ||
| if not urls: | ||
| raise ValueError("No SIGPAC municipality files listed by IDEAragon") | ||
| self.edition_year = max(years) | ||
| self.info(f"{len(urls)} municipality files, campaign {self.edition_year}") |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…#302) Reverts the autofix on #263: `recfeg44216_etrs89_h30` is the shapefile inside the archive, and `44216.shp.zip` is the archive. Filtering on `recfeg` matches no product, so every run raised "No SIGPAC municipality files". Adds the test for get_urls that the review asked for; it fails on the autofixed filter. Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts: # tests/test_convert.py
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.
Aragon publishes SIGPAC per municipality rather than as one download, so the converter lists the files from IDEAragon and reads them all.