Skip to main content

just-dna-compiler

The reference compiler for just-dna annotation modules: it turns an authored spec directory into a deployable parquet artifact plus a manifest.json with integrity digests.

A module composes from optional table kinds: the only always-present file is module_spec.yaml. A SNP module adds variants.csv (+ studies.csv, required whenever variants are present) → the weights / annotations / studies parquets; a PGx / PharmGKB / PRS module instead carries only its own table(s) (diplotypes.csv, pharm_variants.csv, pgs.csv, …) and needs no variants.csv. Each present CSV materializes to its own parquet, so the artifact is the set of parquets the module actually uses (up to twelve), not a fixed three.

It consumes the schema/contract from just-dna-format and is the shared transform called by both just-dna-pipelines (local compile) and just-dna-marketplace (server-side recompile on publish).

from just_dna_compiler.compiler import validate_spec, compile_module, reverse_module

validate_spec(spec_dir)                       # -> ValidationResult (genes/categories lists)
compile_module(spec_dir, out_dir,             # -> CompilationResult (+ manifest.json written)
               strict=False,                  # True: refuse a partial artifact
               compiled_by="marketplace-server")
reverse_module(out_dir, spec_again)           # -> Path (the spec DSL, rebuilt from the artifact)

Resolution is injected, never fetched (CONSTITUTION Principle 2). Drop a resolution.csv beside module_spec.yaml — a table of already-resolved facts keyed by variant_key — and the compiler fills in coordinates and rsIDs from it with no network, no DuckDB and no source convention of its own. Produce that file with just-dna-enricher (just-dna-enricher enrich spec/). With nothing injected the compiler skips resolution with a warning rather than downloading anything. The pre-0.5 compile_module(ensembl_cache=…) DuckDB path still works, is deprecated, and is removed at 1.0.

Dependencies: just-dna-format, polars, pyyaml, typer — pure-Python and duckdb-free since 0.5, and deliberately no Dagster / LLM SDKs.

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_compiler-0.5.4.tar.gz (100.0 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_compiler-0.5.4-py3-none-any.whl (106.1 kB view details)

Uploaded Python 3

File details

Details for the file just_dna_compiler-0.5.4.tar.gz.

File metadata

  • Download URL: just_dna_compiler-0.5.4.tar.gz
  • Upload date:
  • Size: 100.0 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_compiler-0.5.4.tar.gz
Algorithm Hash digest
SHA256 eb70c2de9e6bfc0ec3cb3748b7211f4fc0bb8d70b5b1732cfefc86882a230e1a
MD5 18d90bdf9b00bd9efc7033b2ab739406
BLAKE2b-256 f0cbbd65618b188b6836299b5d4a81f2693dc98c4568be6bafe9dd22f90f0b43

See more details on using hashes here.

File details

Details for the file just_dna_compiler-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: just_dna_compiler-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 106.1 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_compiler-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b9af99fd783ef285db6c58263992cc8e078f9b28ff8ceb9a179bdb0bccced0c9
MD5 8917648add0d6f4a9756bbfa8f42c5c1
BLAKE2b-256 9c7abf70163c7a26f58ef886fa5166b6d5d8683180d2bb89e555a59cec8fcf08

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.6

2 files

0.6.1

2 files

0.6.0

2 files

This release

0.5.4 This release

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

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