Skip to content

publication

publication

Immutable publication-reproduction metadata for scientific problem provenance.

This module supplies one path-free vocabulary for saying exactly what a publication benchmark does and does not reproduce. It is deliberately a domain model rather than a catalog of repository systems: benchmark modules own the concrete records, while :class:PublicationMetadata can accompany an arbitrary :class:~q2mm.models.problem.OptimizationProblem.

ReproductionStatus

Bases: str, Enum

Canonical claim boundary for one publication profile.

ObjectiveTargetDisposition

Bases: str, Enum

How one governing-source target is represented by a selected profile.

PublicationTargetCategory

Bases: str, Enum

Closed publication-objective category vocabulary.

ObjectiveProfileIdentity dataclass

ObjectiveProfileIdentity(name: str, version: int)

Stable name and integer version of an objective profile.

identifier property

identifier: str

Return the canonical <name>-v<version> identifier.

PublicationCitation dataclass

PublicationCitation(citation: str, authoritative_url: str, doi: str | None = None, zotero_key: str | None = None, chapter: str | None = None)

One governing article or dissertation citation.

SourceArtifactIdentity dataclass

SourceArtifactIdentity(identity: str, role: str, fingerprint: str | None = None)

Path-free identity and optional content fingerprint for source evidence.

ObjectiveTarget dataclass

ObjectiveTarget(category: PublicationTargetCategory, disposition: ObjectiveTargetDisposition, profile_weight: float | None = None, source_weight: float | None = None, unit: str | None = None, details: str = '')

Completeness record for one governing-source objective category.

PublicationMetadata dataclass

PublicationMetadata(system: str, status: ReproductionStatus, objective_profile: ObjectiveProfileIdentity, governing_sources: tuple[PublicationCitation, ...], authoritative_case_ids: tuple[str, ...], stationary_point: str, targets: tuple[ObjectiveTarget, ...], source_artifacts: tuple[SourceArtifactIdentity, ...] = (), force_field_blocks: tuple[str, ...] = (), blockers: tuple[str, ...] = (), notes: tuple[str, ...] = (), starting_point: str | None = None, provisionable: bool = True, schema_version: int = 1)

Complete, immutable claim and objective-completeness record.

fingerprint property

fingerprint: str

Return a deterministic SHA-256 fingerprint of this path-free record.

to_dict

to_dict() -> dict[str, object]

Return a deterministic JSON-safe representation.

Source code in q2mm/models/publication.py
def to_dict(self) -> dict[str, object]:
    """Return a deterministic JSON-safe representation."""
    return {
        "schema_version": self.schema_version,
        "system": self.system,
        "status": self.status.value,
        "objective_profile": {
            "name": self.objective_profile.name,
            "version": self.objective_profile.version,
            "identifier": self.objective_profile.identifier,
        },
        "governing_sources": [
            {
                "citation": source.citation,
                "authoritative_url": source.authoritative_url,
                "doi": source.doi,
                "zotero_key": source.zotero_key,
                "chapter": source.chapter,
            }
            for source in self.governing_sources
        ],
        "authoritative_case_ids": list(self.authoritative_case_ids),
        "stationary_point": self.stationary_point,
        "targets": [
            {
                "category": target.category.value,
                "disposition": target.disposition.value,
                "profile_weight": target.profile_weight,
                "source_weight": target.source_weight,
                "unit": target.unit,
                "details": target.details,
            }
            for target in self.targets
        ],
        "source_artifacts": [
            {
                "identity": artifact.identity,
                "role": artifact.role,
                "fingerprint": artifact.fingerprint,
            }
            for artifact in self.source_artifacts
        ],
        "force_field_blocks": list(self.force_field_blocks),
        "blockers": list(self.blockers),
        "notes": list(self.notes),
        "starting_point": self.starting_point,
        "provisionable": self.provisionable,
    }