API reference
Start here
Create, inspect, read, and validate Salmon Data Packages.
| create_sdp | Create a review-ready Salmon Data Package in one call. |
| infer_salmon_datapackage_artifacts | Infer the in-memory artifacts needed to write a Salmon Data Package. |
| read_salmon_datapackage | Read a Salmon Data Package from canonical CSV metadata when available. |
| validate_salmon_datapackage | Validate package structure, ID alignment, and semantic review state. |
Advanced package assembly
Write a package from metadata tables that have already been assembled.
| write_salmon_datapackage | Write the canonical Salmon Data Package layout. |
Dictionary functions
Infer, validate, apply, and inspect SDP data dictionaries.
| infer_dictionary | Build a starter dictionary DataFrame aligned with the SDP schema. |
| validate_dictionary | Validate dictionary structure and value constraints. |
| apply_salmon_dictionary | Rename columns, coerce types, and apply codes using a validated dictionary. |
| apply_semantic_suggestions | Apply selected column-level semantic suggestions to a dictionary. |
| infer_column_role | Infer column_role from a column’s name and contents. |
| infer_value_type | Infer a value_type for a column. |
Semantic helpers
Search vocabularies, rank candidates, and review semantic decompositions.
| suggest_semantics | Suggest semantic annotations for SDP metadata targets. |
| chat_decomposition | Start or resume an explicit measurement-variable decomposition review. |
| find_terms | Find ontology terms across OLS, NVS, and other vocab sources. |
| sources_for_role | Return the ordered default retrieval sources for a semantic role. |
| benchmark_term_ranking_fixtures | Evaluate deterministic term ranking against versioned fixtures. |
| deduplicate_proposed_terms | Apply I-ADOPT compositional deduplication to a gpt_proposed_terms dataframe. |
Ontology and validation
Fetch ontology sources and report semantic coverage.
| fetch_salmon_ontology | Fetch the DFO Salmon Ontology with HTTP caching. |
| validate_semantics | Validate semantics with graceful gap reporting. |
| suggest_facet_schemes | Analyze proposed terms and suggest facet schemes instead of proliferating individual terms. |
Term request workflow
Detect ontology gaps and draft curator-reviewed requests.
| detect_semantic_term_gaps | Detect structured ontology gaps from candidate and final LLM evidence. |
| render_ontology_term_request | Render curator-reviewed ontology term request drafts. |
| submit_term_request_issues | Preview or explicitly submit rendered ontology request issues. |
NuSEDS helpers
Crosswalk legacy NuSEDS method labels to canonical method families.
| nuseds_enumeration_method_crosswalk | Return the curated NuSEDS enumeration-method crosswalk. |
| nuseds_estimate_method_crosswalk | Return the curated NuSEDS estimate-method crosswalk. |
Darwin Core
Suggest and assemble Darwin Core Data Package exports.
| suggest_dwc_mappings | Suggest DwC-DP table/field mappings for dictionary columns. |
| dwc_dp_build_descriptor | Build, optionally write, and optionally validate a DwC-DP descriptor. |
Enterprise Data Hub
Build HNAP-aware EDH metadata exports.
| edh_build_hnap_xml | Build the supported DFO EDH HNAP metadata export. |
| edh_build_iso19139_xml | Build DFO HNAP or generic ISO 19139 XML from dataset metadata. |
| write_edh_xml_from_sdp | Rebuild HNAP XML from reviewed package metadata. |
GitHub access
Read CSV resources from public and private GitHub repositories.
| ms_setup_github | Verify GitHub token discovery for private-repository CSV access. |
| github_raw_url | Build a stable raw.githubusercontent.com URL for a GitHub repository. |
| read_github_csv | Read a CSV from a GitHub repository. |
| read_github_csv_dir | Read all CSV files from a GitHub directory. |
ICES vocabulary
Browse and search ICES reference codes.
| ices_code_types | List ICES controlled vocabulary code types. |
| ices_codes | List ICES codes for a given code type. |
| ices_find_code_types | Find ICES code types by simple substring match on key/description. |
| ices_find_codes | Find ICES codes within a code type by simple substring match on key/description. |
Compatibility
Legacy aliases retained for existing callers.
| create_salmon_datapackage | Compatibility alias for :func:write_salmon_datapackage. |
| create_salmon_datapackage_from_data | Deprecated one-shot wrapper with its legacy call contract preserved. |
Maintenance
Check explicitly for a newer release.
| check_for_updates | Check the latest GitHub release only when explicitly called. |