Skip to main content

just-dna-format

The declarative schema + integrity contract for just-dna annotation modules: both the authored input DSL and the compiled manifest.json. Dependency-light (Pydantic + cryptography, for Ed25519 signature verification) so it can be shared as the single source of truth by:

  • just-dna-compiler — the reference transform (spec → parquet artifact + manifest);
  • just-dna-pipelinesemits manifest.json when it compiles a module;
  • just-dna-marketplaceindexes, serves, and verifies those manifests;
  • just-dna-agents — authoring support (renders reference.authoring_reference()).

Keeping the contract in one small package prevents the sides from drifting.

What's here

Module Contents
just_dna_format.spec The authored DSL: ModuleSpecConfig, VariantRow, StudyRow, ModuleInfo, Defaults (+ extract_pmids).
just_dna_format.binning The measure→phenotype primitive: MeasureBinRow + Activity/CopyNumber/RepeatAllele/Heteroplasmy rows and validate_bins (0.4).
just_dna_format.pgx PGx star-allele model: HaplotypeRow, AlleleFunctionRow, DiplotypeRow, PharmVariantRow (0.4).
just_dna_format.pgs PgsRow — a curated PGS-Catalog interface with ancestry-validity fields (0.4).
just_dna_format.vocab Shared constrained vocabularies, identifier grammars, and validator helpers.
just_dna_format.derive Legacy state/ClinVar-boolean → 0.3-axis derivations (total, idempotent).
just_dna_format.manifest ModuleManifest + sub-models (Identity, Display, Stats, Compilation, FileEntry, Artifact, Provenance, Signature, GenePanelSpec); read_manifest / write_manifest. SPEC §4.
just_dna_format.integrity sha256_file, artifact_digest (canonical Merkle root), build_artifact, verify_manifest, verify_signature, IntegrityError. SPEC §5.
just_dna_format.signing Ed25519 signing over artifact.digest (key management side).
just_dna_format.aggregate Cross-version log / provenance union helpers.
just_dna_format.reference authoring_reference() / json_schemas() — drift-proof DSL description generated from the live models.
just_dna_format.identity Name/namespace rules, canonical_id, SemVer Version + parse_version, version_from_legacy (vN → N.0.0), latest. SPEC §6.

Usage

from just_dna_format.manifest import ModuleManifest, read_manifest
from just_dna_format.integrity import build_artifact, verify_manifest

# Compiler side: hash outputs and record the digest.
artifact = build_artifact(output_dir, ["weights.parquet", "annotations.parquet", "studies.parquet"])

# Downloader side: verify before installing (raises IntegrityError on any mismatch).
manifest = read_manifest(module_dir / "manifest.json")
verify_manifest(module_dir, manifest)                            # a registry install
verify_manifest(module_dir, manifest, require_marketplace=False)  # a locally-compiled module

Those two calls are different policies, not a strict and a lax mode — pick per install route rather than picking one. The default additionally requires compiled_by == "marketplace-server", so it rejects any module compiled anywhere else, this project's own compiler included (it leaves compiled_by null on purpose). Both check every file hash and the digest in full.

All hashes are SHA-256, lowercase hex, prefixed sha256:. The artifact.digest is a Merkle-style root over the canonical file listing — verifying it verifies the whole set and is the version's byte identity: these bytes, from this compiler. The content identity is content_signature, over the authored rows and independent of the reference that resolved them, so a rebuild that moves the digest while leaving the signature still means the data did not change.

Develop

uv sync
uv run pytest -vvv

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

just_dna_format-0.6.0.tar.gz (198.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

just_dna_format-0.6.0-py3-none-any.whl (221.8 kB view details)

Uploaded Python 3

File details

Details for the file just_dna_format-0.6.0.tar.gz.

File metadata

  • Download URL: just_dna_format-0.6.0.tar.gz
  • Upload date:
  • Size: 198.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for just_dna_format-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b20ee84f9982d9a15503845e43ccba6f271c7b8230738425142574e4fbfa16b1
MD5 df670eb27106bb805771822df54611a6
BLAKE2b-256 f80f4b3b5d20f8179a9f9ce60e65c9968077d42c4c90ceaf687dcb15291f114a

See more details on using hashes here.

File details

Details for the file just_dna_format-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: just_dna_format-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 221.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for just_dna_format-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e3bbd0bf17e8536fb994c394fe6a2a713f55328d4de555ab68f0bbf1f9be1de
MD5 f9047f0843ccea1d90fca3932b7a187d
BLAKE2b-256 f7293cbef7c49e3d0f5f90348d99fa7c98ac422c7d23fc0d52b163837982094d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.6

2 files

0.6.1

2 files

This release

0.6.0 This release

2 files

0.5.4

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page