Skip to main content

PolyglotSSSOM

PolyglotSSSOM is a cross-runtime YAML-metadata-plus-TSV implementation of the Simple Standard for Sharing Ontological Mappings (SSSOM). It is written once in F# and built for .NET, JavaScript, and Python.

Version 1.0.0 is the first stable release, providing a portable domain model, a strict, version-aware TSV/YAML codec, and mapping-authoring APIs across all three target runtimes. The exact stable-v1.0 and pinned-v1.1 specification sources are documented in spec/UPSTREAM.md.

Requirements

  • .NET SDK 10.0.300 feature band
  • .NET 8 runtime for tests and package-consumer checks
  • Node.js 22 or newer
  • Python 3.12 or newer
  • uv

The shipped NuGet library targets netstandard2.0; .NET 10 is required only by the Fable build toolchain.

Build and test

On Windows use build.cmd; on macOS/Linux use bash build.sh.

build.cmd                  run the shared suite on .NET, Node, and Python
build.cmd BuildAll         build/transpile all three libraries
build.cmd Pack             create NuGet, npm, and wheel artifacts
build.cmd TestPackages     pack and run isolated package-consumer smokes

Generated output is written below artifacts/ and is never committed.

Package identities

  • NuGet: PolyglotSSSOM
  • npm: @nfdi4plants/polyglot-sssom
  • PyPI: polyglot-sssom (import polyglot_sssom)

All three packages expose the portable mapping-set, mapping, lexical-value, extension, descriptor, CURIE, diagnostic, and SssomCodec APIs. Optional scalars remain absent and multivalued slots use empty arrays for zero values. The codec reads embedded or external metadata, validates v1.0 and the pinned v1.1 draft, and writes deterministic canonical embedded SSSOM/TSV.

Authoring mappings

The lexical factories cover the common entity-to-entity path without exposing the complete positional constructors. AddMapping preserves an optional record ID for general v1.0/v1.1 authoring. AddMappingWithRecordId assigns a caller-owned native v1.1 ID atomically; PolyglotSSSOM never invents one.

F#:

let document =
    SssomDocument.Create(
        "https://example.org/mappings",
        "https://example.org/license"
    )

document.Metadata.EnsurePrefix("ex", "https://example.org/")
document.Metadata.EnsurePrefix("uuid", "urn:uuid:")

let mapping =
    Mapping.CreateEntityMapping(
        "ex:source",
        "skos:exactMatch",
        "ex:target",
        "semapv:ManualMappingCuration"
    )

document.AddMappingWithRecordId("urn:uuid:example", mapping)
let content = SssomCodec.EncodeCanonical document

JavaScript:

const document = SssomDocument.Create(
  "https://example.org/mappings",
  "https://example.org/license"
);
document.Metadata.EnsurePrefix("ex", "https://example.org/");
document.Metadata.EnsurePrefix("uuid", "urn:uuid:");

const mapping = Mapping.CreateEntityMapping(
  "ex:source",
  "skos:exactMatch",
  "ex:target",
  "semapv:ManualMappingCuration"
);
document.AddMappingWithRecordId("urn:uuid:example", mapping);
const content = SssomCodec.EncodeCanonical(document);

Python:

document = sssom.SssomDocument.Create(
    "https://example.org/mappings",
    "https://example.org/license",
)
document.Metadata.EnsurePrefix("ex", "https://example.org/")
document.Metadata.EnsurePrefix("uuid", "urn:uuid:")

mapping = sssom.Mapping.CreateEntityMapping(
    "ex:source",
    "skos:exactMatch",
    "ex:target",
    "semapv:ManualMappingCuration",
)
document.AddMappingWithRecordId("urn:uuid:example", mapping)
content = sssom.SssomCodec.EncodeCanonical(document)

Call Clone() before editing when the imported document must remain available unchanged for its original round trip. Find, replace, and remove operations use the stable record_id; full document correctness remains explicit through SssomCodec.Validate or canonical encoding.

CI and trusted publishing

CI tests .NET, JavaScript and Python, builds all three packages, and checks isolated consumers of those packages. Pull requests and manual runs only validate. A push to main publishes when the first RELEASE_NOTES.md heading has a release date rather than (Unreleased).

The verification job uploads one packages artifact. A single publishing job downloads those tested packages and reads the release notes from the checked-out commit, following the DataHubClient workflow structure.

The release flow is:

  1. If v<version> does not exist, gh release create creates that tag at the tested commit and a GitHub release using the latest release-notes section.
  2. If the tag already exists, skip GitHub release creation.
  3. In either case, run trusted publishing to NuGet, npm and PyPI using the tested packages. Existing package versions cause publishing to fail.

The publishing job runs NuGet, npm and PyPI in that order and stops on the first failure. A GitHub release can exist before all packages are available, or remain after a publishing failure. An existing tag without a GitHub release also skips GitHub release creation. There is no custom tag/release reconciliation or automatic duplicate recovery.

One-time publisher configuration

Create the GitHub environment release and allow deployments from the main branch. Required reviewers are optional. Tag rules must allow GitHub Actions to create the v* tags. The publishing job uses contents: write for the GitHub release and id-token: write for registry OIDC authentication. No registry API token is stored in the workflow.

Configure each registry's trusted publisher with this identity:

Setting Value
GitHub owner nfdi4plants
Repository PolyglotSSSOM
Workflow filename ci.yml
Environment release
  • NuGet — PolyglotSSSOM: create a trusted publishing policy with this package scope. Set repository or environment secret NUGET_USER to the nuget.org profile username that owns the policy, not an email or API key. NuGet/login@v1 obtains a temporary API key through OIDC.
  • npm — @nfdi4plants/polyglot-sssom: configure a trusted publisher and enable direct npm publish. The package must already exist. For a new package, stage a separate bootstrap version such as 0.0.0-bootstrap.1 with --tag bootstrap, and leave it pending while configuring trusted publishing. CI can publish 1.0.0 while that different version is staged. Reject the bootstrap entry only after the first real version is published; do not rely on the placeholder surviving rejection. Use a new publisher within npm's activation window (currently two days). CI uses Node 24 and npm 11; provenance is generated automatically.
  • PyPI — polyglot-sssom: configure a trusted publisher or a pending publisher for a new project. A pending publisher creates the project on its first CI upload; no initial manual release is required.

Releasing

  1. Set the first heading to a new version and date, for example ### 1.0.0 (2026-10-29), followed by its release notes. Use #### for subsections; the next ### heading starts the previous release.
  2. Run dotnet fsi --exec tests/ReleaseMetadata.Tests.fsx and build.cmd TestPackages (Windows) or bash build.sh TestPackages (Linux/macOS).
  3. Commit and merge to main. CI creates the GitHub release/tag if needed, then publishes to NuGet, npm and PyPI in sequence.
  4. Start the next development version with a new (Unreleased) heading. Otherwise, later main pushes attempt to publish the same version again.

Versions support X.Y.Z and X.Y.Z-alpha.N, -beta.N, or -rc.N, without leading zeros. Python uses the equivalent X.Y.ZaN, X.Y.ZbN, or X.Y.ZrcN. Prereleases are marked on GitHub and published to npm's next tag; stable releases use latest. The root npm/Python manifests describe the build environment; published versions come from RELEASE_NOTES.md.

Re-running the publishing job repeats its publication steps using the tested package artifact. Registries reject versions that were already published, and a failure stops later steps. Existing tags are left untouched; use the original release commit when retrying.

Metadata

Release files for polyglot-sssom 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for polyglot-sssom 1.0.0
File Interpreter ABI Platform Actions
polyglot_sssom-1.0.0-py3-none-any.whl Python 3 none any Details for polyglot_sssom-1.0.0-py3-none-any.whl

Release files / polyglot_sssom-1.0.0-py3-none-any.whl

Download URL polyglot_sssom-1.0.0-py3-none-any.whl
Size 114.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68d63c2d3df310f8f6a305fd675dfa601b163d47445013791133dd3936219f6d
BLAKE2b-256 checksum
How to use checksums
0c34798336486859a0741c67b2a22de8697ead5cf9fef3ee54a331834feb6c20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for polyglot-sssom 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for polyglot_sssom-1.0.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page