Skip to content

DE-SH: bring the converter and its fixture up to main's version - #229

Open
haithcoatj wants to merge 1 commit into
fiboa:publish-portolanfrom
haithcoatj:de_sh-fix-for-portolan
Open

DE-SH: bring the converter and its fixture up to main's version#229
haithcoatj wants to merge 1 commit into
fiboa:publish-portolanfrom
haithcoatj:de_sh-fix-for-portolan

Conversation

@haithcoatj

Copy link
Copy Markdown
Contributor

publish-portolan still has the pre-#227 de_sh.py, so anyone rebuilding de_sh from this branch reproduces the three bugs #227 fixed. The commit message has the details. main has had the fix since Sep 8 but hasn't been merged in here, and this is where the converter work is happening.

Brings de_sh.py and its test fixture to main's versions, unchanged. Both are byte-identical across the two branches afterwards, so a later merge of main is a no-op for them.

The fixture is worth calling out on its own: the one on this branch is named Feldbloecke_2026_GPKG.zip but holds layer fb_2024 with 2024's mixed-case columns and the area as a Real. A file named for one edition containing another's data is wrong regardless of what any test does with it.

On coverage, measured rather than assumed. With the fixture in place but #228's expected_columns assertion not yet here, breaking parse_decimal fails and breaking parse_date fails. Breaking COLUMN_RENAMES still passes, because the only substantive check is assert (df["metrics:area"] > 10).all() sitting behind if "metrics:area" in df.columns — so dropping the column skips the assertion instead of failing it. That's the same presence guard that hid the original bug, and it closes when #228 lands.

Clean pick: the imports and the {url: ["*.gpkg"]} variants form already exist here (cz.py, es_cl.py), and it satisfies this branch's newer guards including _require_unique_ids — the id source is unique and non-null in all four editions, measured on the real archives at 198,614 / 197,673 / 195,747 / 194,503 rows. tests/test_convert.py is untouched, so this and #228 change disjoint files and can land in either order.

publish-portolan still carries the pre-fiboa#227 de_sh.py, so anyone rebuilding
de_sh from this branch reproduces all three bugs fiboa#223/fiboa#227 fixed: the 2023
archive matches no GDAL driver, fachguelti reaches the STAC step as
DD.MM.YYYY text, and the 2025/2026 upper-case spellings silently drop
determination:datetime and metrics:area while still validating.

The 2026-shaped test fixture comes with it. fiboa#228 brings the expected_columns
delivery assertion to this branch, and an assertion whose fixture is still
2024-shaped cannot bite -- 2024 already spells the columns the way the
converter maps them, so nothing exercises COLUMN_RENAMES or the decimal-comma
area. That combination is exactly what hid the bug in the first place.

main has had both since 2026-09-08 but has not been merged into
publish-portolan; afterwards both files are identical on the two branches.

Co-Authored-By: Claude Opus 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.

1 participant