Update BNF data importer to handle ISP CSV headers - #3210
Draft
KatieB5 wants to merge 2 commits into
Draft
Conversation
We previously updated the importer to handle the new CSV column header format used by the ODP (2f6905e). However, the BNF releases from 2024-10-01 to 2025-02-01 are only available as CSVs using the old ISP column header format. This update transforms the CSV field names before importing so that we support both the old ISP and new ODP column header formats.
Add mock ISP-format BNF data and test that it can be imported successfully. Keep the existing import and error-handling tests using the ODP-format fixture, as these test general importer behaviour rather than differences between the CSV header formats. Update the ODP fixture to use the correct YEAR_MONTH column name and clarify the fixture documentation.
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.
We previously (2f6905e, and in #3167) updated the BNF data importer to handle the new CSV column header format used by the ODP (e.g.
BNF_CHAPTER) . However, the BNF releases from 2024-10-01 to 2025-02-01 are only available as CSVs using the old ISP column header format (e.g.BNF Chapter).This update transforms the CSV field names before importing so that we support both the old ISP and new ODP column header formats.