Schema governance and canonical serialization primitives for reproducible proteomics documents and cross-package compatibility
Project description
bijux-proteomics-foundation
bijux-proteomics-foundation is the shared contract kernel for the package
family, including canonical JSON behavior, deterministic hashing, document
fingerprints, and compatibility contracts for persisted scientific records.
Within the suite, foundation owns shared contracts, identifiers, and deterministic serialization.
Use this package when you need versioned document governance, migration-safe serialization, and cross-package consistency for reproducible proteomics data.
At a glance
- Use foundation when the problem is shared document identity, canonical JSON, compatibility checks, or durable hashing across package boundaries.
- Start with the stable root imports for shared contracts, then open the foundation handbook when you need the full owner surface.
- Route scientific meaning to core, execution to runtime, recommendation posture to intelligence, scientific memory to knowledge, and assay follow-up to lab.
Why teams pick this kernel
- one canonical document-contract baseline across every proteomics package
- stable fingerprints for cache keys, lineage, and provenance checks
- compatibility helpers for migration-safe long-lived scientific records
- small shared primitives that keep downstream packages from rebuilding the same durable contract logic
Typical use cases
- define document metadata with explicit version and compatibility policy
- serialize domain models into canonical JSON for reproducible comparisons
- validate migration paths before accepting persisted record upgrades
- centralize shared contract behavior so other packages stay focused on domain logic
0.3.8 Release Highlights
- The shared kernel now covers canonical document metadata, JSON rendering, stable hashing, identifier kinds, refusal and result envelopes, and schema compatibility checks in one bounded package.
- Foundation also ships the shared optional-dependency guards, alias helpers, generated-file markers, and reusable test-policy primitives that the release gates now depend on.
- The public root stays intentionally small while durable owner families make long-term boundaries explicit for contributors and downstream packages.
Installation
pip install bijux-proteomics-foundation
Test install:
pip install -e '.[test]'
Quick start
from bijux_proteomics_foundation import DocumentSchema, hash_payload, to_canonical_json
Public APIs
The stable root API is intentionally small:
DocumentSchemafor durable metadata on persisted artifactsto_canonical_json(...)for deterministic serializationhash_payload(...),hash_text(...), andhash_model(...)for reproducible fingerprintsJsonModelplus typed identifiers such asProgramId,TargetId, andClaimId
Minimal executable example:
from bijux_proteomics_foundation import DocumentSchema, hash_payload, to_canonical_json
schema = DocumentSchema(
created_by="bijux-proteomics-foundation",
document_kind="readme_example",
package_name="bijux-proteomics-foundation",
)
payload = {
"document_kind": schema.document_kind,
"schema_version": schema.schema_version,
}
rendered = to_canonical_json(payload)
fingerprint = hash_payload(payload)
assert '"readme_example"' in rendered
assert len(fingerprint) == 64
Package identity
- Distribution name:
bijux-proteomics-foundation - Import root:
bijux_proteomics_foundation - Stable entrypoints:
bijux_proteomics_foundation,compatibility,identity,outcomes,serialization, andsupport
Package boundaries
This package owns shared document metadata, canonical serialization, and migration compatibility helpers as a shared kernel rather than a user-facing workflow package.
It does not own product decision logic, lab logic, or runtime orchestration.
The exact allowed primitive surface is audited in support/charter.py.
What this package must not do
- it must not define workflow orchestration, provider binding, or operator entrypoints
- it must not own scientific evidence semantics, recommendation policy, or lab planning rules
- it must not become a generic dumping ground for single-package helpers that do not belong in the shared kernel
Contract checkpoints
- equivalent models must serialize to identical canonical JSON and fingerprints
- compatibility evaluation must report explicit status and reason text
- migrations must preserve semantic meaning while advancing declared versions
- downstream packages may depend on these primitives, but should not move domain rules into this layer
Contract examples
These examples stay at the shared-kernel layer. Workflow-owned, CLI-owned, and runtime-owned examples belong in the package that owns that behavior.
Document metadata:
from bijux_proteomics_foundation import DocumentSchema
schema = DocumentSchema(
created_by="bijux-proteomics-foundation",
document_kind="contract_bundle",
package_name="bijux-proteomics-foundation",
package_version="0.3.8",
)
Identifiers:
from bijux_proteomics_foundation.identity.identifiers import (
IdentifierKind,
build_identifier,
)
run_id = build_identifier(IdentifierKind.RUN, "Orbitrap Batch 7")
Canonical serialization and hashing:
from bijux_proteomics_foundation import hash_payload, to_canonical_json
payload = {"a": 1, "b": 2}
fingerprint = hash_payload(payload)
rendered = to_canonical_json(payload)
Refusals:
from bijux_proteomics_foundation.outcomes.refusals import OperationRefusal, RefusalKind
from bijux_proteomics_foundation.support.states import SupportState
refusal = OperationRefusal(
operation="artifact_validation",
kind=RefusalKind.UNSUPPORTED,
code="unsupported_construct",
reason="the payload cannot be normalized without changing shared meaning",
support_state=SupportState.REFUSED,
)
Error envelopes:
from bijux_proteomics_foundation.outcomes.failures import (
ErrorCategory,
ErrorEnvelope,
)
envelope = ErrorEnvelope(
category=ErrorCategory.RUNTIME,
code="contract_rejection",
message="canonical document validation rejected the payload",
)
Operation results:
from bijux_proteomics_foundation.outcomes.results import OperationResult
result = OperationResult.success(
operation="contract_validation",
summary="shared contract validation completed successfully",
output_fingerprint="a" * 64,
)
Choose this package when
- you need reusable schema, serialization, identifier, or migration primitives
- the same document contract must stay consistent across multiple package layers
- the change is low-volatility shared infrastructure rather than package-specific domain behavior
Route elsewhere when
- the change defines lifecycle, ranking, evidence, lab, or runtime semantics
- the helper would only serve one higher-layer package instead of the shared family
- the work mainly reshapes transport or orchestration payloads instead of shared document primitives
Verification route
- check
testsfor schema, serialization, and migration proof before treating a foundation change as safe - review
docs/BOUNDARIES.md,docs/CONTRACTS.md, anddocs/ARCHITECTURE.mdwhen ownership or stability claims are part of the change - review
support/charter.pywhen the question is whether a new primitive belongs in foundation at all - use
README.md,CHANGELOG.md, and packagedocs/*.mdwhen the change affects package publication, metadata, or release-readiness expectations
Review questions
- does the change preserve reusable schema, serialization, identifier, or migration behavior rather than higher-layer policy or execution logic
- would two or more downstream packages otherwise duplicate or drift on the same document primitive if this stayed outside foundation
- can the change be justified without claiming lifecycle, evidence, ranking, lab, or runtime orchestration ownership
Escalation route
- route the change upward when the primitive only serves one domain package instead of the shared family
- stop and review
docs/BOUNDARIES.mdanddocs/ARCHITECTURE.mdwhen the proposal starts carrying lifecycle, evidence, ranking, lab, or runtime terms - escalate to the owning higher-layer package before release when downstream consumers would need package-specific exceptions to adopt the change
Consumer impact signals
- expect broad downstream review when schema, serialization, identifier, or migration primitives change because every package may consume them
- treat changes that alter canonical JSON, fingerprints, or compatibility status as high-impact even when APIs stay stable
- expect a lower release burden when the change only tightens internal implementation without changing shared document behavior
Explicit non-goals
- this package does not define lifecycle, evidence, ranking, lab, or runtime semantics
- this package does not coordinate workflow-local adapters or operator-facing orchestration
- this package does not carry compatibility-only shims that belong in a higher canonical layer or in the compat package
Source guide
src/bijux_proteomics_foundation/serialization/document_schema.pyfor document metadata and audit lineagesrc/bijux_proteomics_foundation/serialization/scientific_values.pyfor nullability, duration, timestamp, and coordinate wrapperssrc/bijux_proteomics_foundation/compatibility/schema_assessments.pyfor compatibility and schema-evolution assessmentssrc/bijux_proteomics_foundation/serialization/canonical_json.pyfor canonical serializationsrc/bijux_proteomics_foundation/serialization/stable_hashes.pyfor deterministic hashing policiessrc/bijux_proteomics_foundation/serialization/json_contracts.pyfor reusable JSON-backed contract helperssrc/bijux_proteomics_foundation/identity/identifiers.pyfor shared identifier contractssrc/bijux_proteomics_foundation/support/provenance.pyfor provenance pointers and adjacent support-state contractssrc/bijux_proteomics_foundation/outcomes/failures.pyfor structured machine-readable failure contractssrc/bijux_proteomics_foundation/outcomes/results.pyfor shared refusal and operation-result contractssrc/bijux_proteomics_foundation/compatibility/schema_migrations.pyfor migration behaviortestsfor executable behavior expectations
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bijux_proteomics_foundation-0.3.8.tar.gz.
File metadata
- Download URL: bijux_proteomics_foundation-0.3.8.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82cbed6cd3c174cef067e4e759f10bef3b7a1858ff7b9bab6e4cac4810f5a3d9
|
|
| MD5 |
a7c96a12b141da95791a1c3609fb01e7
|
|
| BLAKE2b-256 |
41bee2b10db4fd59c946e20bc44d7ca11f96fb80ab3ed05e53bcf59d9029b6fa
|
Provenance
The following attestation bundles were made for bijux_proteomics_foundation-0.3.8.tar.gz:
Publisher:
release-pypi.yml on bijux/bijux-proteomics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bijux_proteomics_foundation-0.3.8.tar.gz -
Subject digest:
82cbed6cd3c174cef067e4e759f10bef3b7a1858ff7b9bab6e4cac4810f5a3d9 - Sigstore transparency entry: 2034469842
- Sigstore integration time:
-
Permalink:
bijux/bijux-proteomics@1c7da1b39cf1085afea9d94cbbe2ddf55fb1ed6c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bijux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@1c7da1b39cf1085afea9d94cbbe2ddf55fb1ed6c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bijux_proteomics_foundation-0.3.8-py3-none-any.whl.
File metadata
- Download URL: bijux_proteomics_foundation-0.3.8-py3-none-any.whl
- Upload date:
- Size: 63.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fe356a5997f4aedb8d35b23f7e6ee76c419e2824bdf4c7935ddd8b292b39cb7
|
|
| MD5 |
be8c0143c7756ad97ee821b9fe5bb419
|
|
| BLAKE2b-256 |
c6f9d37537d1468521b6b190c21e54e1f53d6e47478811699a18ad385a7ceebd
|
Provenance
The following attestation bundles were made for bijux_proteomics_foundation-0.3.8-py3-none-any.whl:
Publisher:
release-pypi.yml on bijux/bijux-proteomics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bijux_proteomics_foundation-0.3.8-py3-none-any.whl -
Subject digest:
3fe356a5997f4aedb8d35b23f7e6ee76c419e2824bdf4c7935ddd8b292b39cb7 - Sigstore transparency entry: 2034470459
- Sigstore integration time:
-
Permalink:
bijux/bijux-proteomics@1c7da1b39cf1085afea9d94cbbe2ddf55fb1ed6c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bijux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@1c7da1b39cf1085afea9d94cbbe2ddf55fb1ed6c -
Trigger Event:
workflow_dispatch
-
Statement type: