flowchart LR
A["pandas DataFrame(s)"] --> B["create_sdp()"]
B --> C["Review metadata and semantics"]
C --> D["validate_salmon_datapackage()"]
D --> E["Rebuild EDH XML"]
E --> F["Publish complete package"]
metasalmonpy
Create, review, validate, and publish Salmon Data Packages from Python
metasalmonpy provides the Python implementation of the metasalmon workflows: the core package lifecycle, semantic review, ontology term governance, validation, and Enterprise Data Hub (EDH) metadata behaviour. The version number is a parity claim naming the metasalmon release whose functionality this package actually delivers, and R and Python parity is where that number lives — this page deliberately does not carry a second copy of it, having read 0.1.6 for the three releases after 0.1.6.
import pandas as pd
from metasalmonpy import create_sdp, validate_salmon_datapackage
observations = pd.DataFrame(
{
"species": ["Coho", "Chinook"],
"catch_count": [100, 200],
}
)
package_path = create_sdp(
observations,
path="catch-sdp",
dataset_id="catch-monitoring",
table_id="observations",
seed_semantics=False,
)
validate_salmon_datapackage(package_path)Generated metadata is review-ready, not publication-ready. Replace all MISSING values and every REVIEW: IRI, then run strict validation with require_iris=True.
Workflow
Where to start
| Goal | Documentation | Main functions |
|---|---|---|
| Create a package from raw tables | Get started | create_sdp() |
| Control inference and package assembly | Package lifecycle | infer_salmon_datapackage_artifacts(), write_salmon_datapackage() |
| Decide ontology IRIs and fill in metadata | Semantic review | review_semantics(), accept_suggestion(), apply_sdp_semantics(), review_metadata(), set_sdp_*() |
| Record missing ontology concepts | Term requests | detect_semantic_term_gaps(), render_ontology_term_request() |
| Validate and export EDH metadata | EDH and validation | validate_salmon_datapackage(), write_edh_xml_from_sdp() |
| Look up function signatures | API reference | All exported functions |
LLM review is strictly opt-in. Supplying context files or context text does not enable a provider call; llm_assess=True is always required.