refactor(snomed): adapt shim — biodb retired the bulk downloader - #7
Merged
Conversation
bioDB merged refactor/snomed-bulk-parser-only on 2026-05-18. The GitHub-release-backed SNOMED downloader (synthlab's original implementation, relocated to biodb earlier today) was removed for SNOMED CT licensing reasons. CONCEPT.csv is now obtained by the user from https://athena.ohdsi.org after accepting the SNOMED CT license. synthlab/download_snomed.py: * Drops imports of GITHUB_*, SNOMED_RELEASE_URL, download_concept_csv — those names no longer exist in biodb.snomed. * Re-exports the OLS-backed query helpers (query_concept, search_concepts, get_descendants, ...) and the parsers (load_concept_csv, load_concept_csv_from_zip) from biodb.snomed. * Keeps download_snomed_vocabulary / is_snomed_available / get_concept_csv_path as deprecated stubs that raise RuntimeError with migration guidance — they can't be transparently emulated since the asset is gone. * Module docstring rewritten to explain the licensing posture and point at the Athena flow. The four names imported by synthlab/__init__.py (download_snomed_vocabulary, get_concept_csv_path, is_snomed_available, get_snomed_data_dir) all remain importable; the first three raise on call, the last is the live biodb.snomed function. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Follow-up to bioDB#18. The SNOMED bulk downloader (and the GitHub Release asset it pulled) was retired in bioDB for SNOMED CT licensing reasons — onward redistribution from a public mirror isn't permitted under the IHTSDO / UMLS license.
synthlab/download_snomed.pywas a shim that re-exported the bioDB names. With those names removed upstream, the shim needs an update.Changes
GITHUB_*,SNOMED_RELEASE_URL,download_concept_csv— those names no longer exist inbiodb.snomed.query_concept,search_concepts,get_descendants,get_ancestors,get_children,get_parents) and the parsers (load_concept_csv,load_concept_csv_from_zip) frombiodb.snomed. The OLS path is unaffected by the licensing change — EBI handles SNOMED CT licensing server-side.download_snomed_vocabulary/is_snomed_available/get_concept_csv_pathas deprecated stubs that raiseRuntimeErrorwith migration guidance pointing at https://athena.ohdsi.org. They can't be transparently emulated since the GitHub asset is gone.The four names imported by
synthlab/__init__.py(download_snomed_vocabulary,get_concept_csv_path,is_snomed_available,get_snomed_data_dir) all remain importable — the first three raise on call, the last is the live biodb function.Migration for downstream callers
Test plan
from synthlab.download_snomed import ...resolves cleanly with biodb installedRuntimeErrorwith the Athena migration note🤖 Generated with Claude Code