metasalmonpy
  • Get started
  • Guides
    • Configuration
    • Package lifecycle
    • Semantic review
    • Public catalogue discovery
    • Term requests
    • EDH and validation
    • GitHub data access
    • R and Python parity
  • API reference
  1. Overview
  • Overview
  • Get started
  • Guides
    • Configuration
    • Package lifecycle
    • Semantic review
    • Capture public catalogue evidence
    • 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
    • Review and edit (in Python)
      • review_semantics
      • accept_suggestion
      • reject_suggestion
      • apply_sdp_semantics
      • review_metadata
      • set_sdp_dataset
      • set_sdp_table
      • set_sdp_column
      • set_sdp_code
      • semantic_suggestions
      • semantic_llm_assessments
    • Harness review (packet and ingest)
      • write_semantic_review_packet
      • ingest_semantic_assessments
      • SemanticReviewError
      • LLMDeprecationWarning
    • Semantic helpers
      • suggest_semantics
      • chat_decomposition
      • find_terms
      • sources_for_role
      • benchmark_term_ranking_fixtures
      • deduplicate_proposed_terms
    • Ontology and validation
      • fetch_salmon_ontology
      • OntologyReleaseError
      • validate_semantics
      • verify_sdp_semantic_iris
      • 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: 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)
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()
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.

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.