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
Python implementation of the metasalmon workflows for portable, ontology-aware salmon data.
metasalmonpy provides the Python implementation of the metasalmon workflows. Version 0.1.6 aligns the core package lifecycle, semantic review, ontology term governance, validation, and Enterprise Data Hub (EDH) metadata behavior with metasalmon 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)
Important
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() |
| Review ontology candidates | Semantic review | suggest_semantics(), apply_semantic_suggestions() |
| 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.