Check every mapping table against the HCAT taxonomy - #305
Open
ivorbosloper wants to merge 1 commit into
Open
ivorbosloper wants to merge 1 commit into
ivorbosloper wants to merge 1 commit into
Conversation
A wrong code is invisible: the file validates and a crop query quietly returns another crop. The 23 rows that are wrong today are recorded, so a new mistake fails. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
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.
Every
HCAT3_namein a mapping table has to carry that name's code. A wrong code is invisible today: the file validates, and a crop query quietly returns another crop — see #304, where 2,098 published fields do exactly that.tests/test_hcat_codes.pywalks every CSV undertests/data-files/that has HCAT3 columns and checks both halves of the pair againsttests/data-files/hcat3.csv(a copy of https://fiboa.org/code/hcat3.csv). Offline and instant.The 23 rows that are wrong today are listed in
KNOWN_BADwith the reason, so the test passes now and a new mistake fails. Injecting one of each kind intodk_2019.csvgives:Two things found while writing it:
sk/sk.csvin the fixtures is stale — 244 rows against 320 live, and it still hasparsleyandzucchini_courgette3301140200 where the published list has been corrected toparslyand 3301140600. So the conversion tests exercise a table that is no longer what the converter reads. Not fixed here: refreshing it changes what the sk conversion test expects.ch,ptandathave no fixture, so their errors are invisible to it.🤖 Generated with Claude Code
https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG