Ship 2026 data release (fb v26.07, slb v26.04) and script the import workflow - #324
Merged
Conversation
Data updated to FishBase v26.07 and SeaLifeBase v26.04, now published on Source Cooperative and picked up by `version = "latest"`. The new snapshots add 6 tables to FishBase (222 total) and 3 to SeaLifeBase (202 total); no previously published table was dropped, and every table's row count matches the source database. The workflow for turning a new dump into a release was only documented by scripts from the pins-board and HuggingFace eras, which no longer describe what actually happens. Replace that with a runnable pipeline in data-raw/: import_dumps.sh loads the dumps into a scratch MariaDB, export_parquet.py writes zstd parquet per table via DuckDB's mysql extension, verify_export.py checks the result against both the source database and the previous release, and upload.sh publishes to Source Cooperative. The old R scripts are kept as historical reference, labeled as such in data-raw/README.md.
cboettig
force-pushed
the
data-release-2026
branch
from
August 18, 2026 17:35
7992ff5 to
6228164
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.
Data
The 2026 dumps are imported, verified, and already published to Source Cooperative:
cboettig/fishbase/fb/v26.07/parquet/— 222 tables, 140 MBcboettig/fishbase/slb/v26.04/parquet/— 202 tables, 108 MBavailable_releases()reads the bucket directly, soversion = "latest"now resolves to these with no code change. Verified end to end:fb_tbl("species")returns 36,763 rows (fb) and 102,727 (slb), matching the source database exactly, and the full test suite passes (40 passed, 0 failed, 0 skipped).Version tags follow the convention stated in the dataset README —
vYY.MMis the snapshot date of the dump. The two dumps arrived separately (fb dated 2026-07-07, slb 2026-04-22), so they carry different tags; releases are listed per server, so this works cleanly. Row modification dates corroborate the dates. Happy to republish slb under a sharedv26.07tag instead if you'd prefer to match the v24.07/v25.04 precedent.Switched the parquet from snappy to zstd, which cut the exports from 195 MB → 140 MB (fb) and 153 MB → 108 MB (slb).
Workflow
data-raw/only described the pins-board and HuggingFace eras, and the dataset README pointed at acreation.pythat doesn't exist in any repo. This adds a runnable pipeline reproducing exactly what was run:# dumps go in imports/ (git-ignored, excluded from the build) bash data-raw/import_dumps.sh /tmp/fishbase-import bash data-raw/upload.sh /tmp/fishbase-import 26.07 26.04import_dumps.sh— unpack, load into a scratch MariaDB, export, verifyexport_parquet.py— one zstd parquet per table via DuckDB'smysqlextensionverify_export.py— row counts vs the source db, table diff vs the previous release, crossed-schema guard; exits non-zero on any problemupload.sh— publish to Source Cooperative and checksum-verifyTwo traps worth knowing, both now documented and guarded:
mysqlATTACH exposes every schema on the server, not just the one in the connection string. An unqualifiedsrc."species"resolves across databases and silently mixes FishBase and SeaLifeBase rows — this bit the first export attempt.export_parquet.pyfilters onschema_nameand fully qualifies;verify_export.pychecks for a regression.utf8mb4_0900_ai_ci, so the import rewrites the collation.The old R scripts are kept as historical reference rather than deleted, labeled as such in
data-raw/README.md— say the word if you'd rather drop them.Worth a look before merging
The new dumps include what appear to be FishBase working tables:
morphmettlratios_copy,picturesmain_copy,mp_withphotos,mp_withoutphotos,mp_bothphotos,picturesmain_withoutphotos(fb) andcountry.orig,species_famcode,species_hierarchy(slb). They're published as-is, consistent with these being raw backend snapshots, but the_copy/.origones may be accidental on the FishBase side.Also updated the source.coop dataset README to drop the dead
creation.pyreference and point atdata-raw/.