metasalmonpy
  • Get started
  • Guides
    • Package lifecycle
    • Semantic review
    • Term requests
    • EDH and validation
    • GitHub data access
    • R and Python parity
  • API reference
  1. Overview
  • Overview
  • Get started
  • Guides
    • Package lifecycle
    • Semantic review
    • Ontology term requests
    • EDH and validation
    • GitHub data access
    • R and Python parity
  • Help
    • Glossary
    • Frequently asked questions
  • API reference
    • API reference
    • Start here
      • create_sdp
      • infer_salmon_datapackage_artifacts
      • read_salmon_datapackage
      • validate_salmon_datapackage
    • Advanced package assembly
      • write_salmon_datapackage
    • Dictionary functions
      • infer_dictionary
      • validate_dictionary
      • apply_salmon_dictionary
      • apply_semantic_suggestions
      • infer_column_role
      • infer_value_type
    • Semantic helpers
      • suggest_semantics
      • chat_decomposition
      • find_terms
      • sources_for_role
      • benchmark_term_ranking_fixtures
      • deduplicate_proposed_terms
    • Ontology and validation
      • fetch_salmon_ontology
      • validate_semantics
      • suggest_facet_schemes
    • Term request workflow
      • detect_semantic_term_gaps
      • render_ontology_term_request
      • submit_term_request_issues
    • NuSEDS helpers
      • nuseds_enumeration_method_crosswalk
      • nuseds_estimate_method_crosswalk
    • Darwin Core
      • suggest_dwc_mappings
      • dwc_dp_build_descriptor
    • Enterprise Data Hub
      • edh_build_hnap_xml
      • edh_build_iso19139_xml
      • write_edh_xml_from_sdp
    • GitHub access
      • ms_setup_github
      • github_raw_url
      • read_github_csv
      • read_github_csv_dir
    • ICES vocabulary
      • ices_code_types
      • ices_codes
      • ices_find_code_types
      • ices_find_codes
    • Compatibility
      • create_salmon_datapackage
      • create_salmon_datapackage_from_data
    • Maintenance
      • check_for_updates

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

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"]

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.

Back to top
Get started

metasalmonpy is maintained by the Salmon Data Mobilization community.

 
  • Edit this page
  • View source
  • Report an issue

Built with Quarto and quartodoc.