FiboaBaseConverter: drop what cannot validate, bounded, and fetch schemas first - #264
Open
ivorbosloper wants to merge 1 commit into
Open
FiboaBaseConverter: drop what cannot validate, bounded, and fetch schemas first#264ivorbosloper wants to merge 1 commit into
ivorbosloper wants to merge 1 commit into
Conversation
This was referenced Sep 11, 2026
…emas first Two rules that every converter needs and none had. **Rows that cannot validate are dropped, up to 1% of the file.** A row with no `id` or no `crop:code` fails validation at the very end of a conversion, after everything has been read and written; the same goes for a row with an empty or missing geometry, which geopandas also refuses to Hilbert-sort. Dropping them silently would hide a broken mapping, so the share is bounded: above 1% the conversion fails and says which column and how many rows, because that is a converter bug rather than a few bad rows in the source. The lookup happens before columns are renamed, so the message names the source column a reader will find in the data. **Schemas are fetched before any real work.** The schema hosts (vecorel.org, fiboa.org) fail intermittently, and a blip after a long download used to kill the conversion at the write step, discarding hours of work. Eight attempts with exponential backoff, before the first byte of source data is read; `load_file` caches per process, so a successful pre-warm makes the write network-free. The Europe-LAND base converter comes along because the new rule exposes it: LT 2024 ships an entirely empty `crop_code` column beside a populated `crop_name`, so every row would be dropped. The name is the best available code there, and is used as one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
ivorbosloper
force-pushed
the
split/base-drops
branch
from
September 12, 2026 12:49
aa580de to
8da77df
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.
First of the structural PRs in the
publish-portolansplit (datasets: #231-#263). Two rules that every converter needs and none had.Rows that cannot validate are dropped, up to 1% of the file
A row with no
idor nocrop:codefails validation at the very end of a conversion, after everything has been read and written — as does a row with an empty or missing geometry, which geopandas refuses to Hilbert-sort. Hours of work discarded for a handful of rows.Dropping them silently would hide a broken mapping, so the share is bounded: above 1% the conversion fails and says which column and how many rows, because that is a converter bug rather than a few bad rows in the source. The lookup happens before columns are renamed, so the message names the source column a reader will actually find in the data.
This is not hypothetical. It is how si 2019 was caught publishing 820,151 fields with no id at all (#231), and how the empty-geometry rows in several Spanish regions stopped killing conversions at the last step.
Schemas are fetched before any real work
vecorel.org and fiboa.org fail intermittently, and a blip after a long download killed the conversion at the write step. Eight attempts with exponential backoff, before the first byte of source data is read;
load_filecaches per process, so a successful pre-warm makes the write network-free.One converter comes along
The new rule exposes it: Europe-LAND's LT 2024 ships an entirely empty
crop_codecolumn beside a populatedcrop_name, so every row would be dropped. The name is the best available code there, and is used as one. Without this thelttest fails on 100 of 100 rows.Original commits: 992f15b, b322fa3, d22b603, b92251a, d5287db, b154cf4.
#265 builds on this (the identity checks share the file).
🤖 Generated with Claude Code
https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG