pubmate helps you go from vocabulary/source data to publishable nanopublications.
This README focuses on real publishing workflows:
- prepare and normalize vocabulary data
- create per-term assertion graphs
- dry-run sign/publish checks
- publish to nanopub servers
From this repository:
uv syncCLI entrypoints provided by this project:
pubmate-yamlconcatpubmate-mintpubmate-cleanrdfpubmate-publish
Use this when your terms are spread across files and you want one container.
pubmate-yamlconcat combined.yaml terms1.yaml terms2.yaml --target vocabulary_termsGenerate IDs into the id field (or another field via --id-key).
Preview only:
pubmate-mint \
--data combined.yaml \
--target vocabulary_terms \
--namespace https://w3id.org/yourspace/term/ \
--dry-runWrite changes:
pubmate-mint \
--data combined.yaml \
--target vocabulary_terms \
--namespace https://w3id.org/yourspace/term/Notes:
- default method is
hash(recommended for deterministic IDs) - use
--forceto regenerate existing IDs
pubmate-cleanrdf loads your ontology RDF, normalizes translation blocks into language-tagged literals, and writes one assertion file per subclass of the parent class(es).
pubmate-cleanrdf \
--input-ontology-path ontology.ttl \
--base-namespace https://w3id.org/yourspace/ \
--term-output-path assertions \
--term-parent-class your:VocabularyTerm \
--parent-subclasses your:AdditionalParentOutput: assertions/<term_id>.ttl files.
This signs and builds nanopubs but does not publish (--dry-run).
pubmate-publish \
--assertion-folder assertions \
--orcid-id https://orcid.org/0000-0000-0000-0000 \
--name "Your Name" \
--private-key /path/to/id_rsa \
--public-key /path/to/id_rsa.pub \
--intro-nanopub-uri https://w3id.org/np/RA... \
--dry-runSame command, without --dry-run:
pubmate-publish \
--assertion-folder assertions \
--orcid-id https://orcid.org/0000-0000-0000-0000 \
--name "Your Name" \
--private-key /path/to/id_rsa \
--public-key /path/to/id_rsa.pub \
--intro-nanopub-uri https://w3id.org/np/RA...For local/CI dry-run checks, you can use nanopub testsuite keys:
pubmate-publish \
--assertion-folder assertions \
--dry-run \
--use-testsuite-keysThis avoids passing personal key files.
Advanced overrides exist for testsuite key/ref (hidden from normal help):
--testsuite-key(defaultrsa-key1)--testsuite-ref(defaultmain)
Before real publish:
- Run
pubmate-mint --dry-runand inspect ID changes. - Generate assertion files and manually inspect a few
.ttloutputs. - Run
pubmate-publish --dry-runfirst. - Publish a small subset first (e.g., a temporary small assertion folder).
- Then publish the full batch.
Missing required options in manual-key mode:- pass the full manual key/profile options, or use
--dry-run --use-testsuite-keys.
- pass the full manual key/profile options, or use
- No files published:
- verify assertion folder contains
.ttlfiles.
- verify assertion folder contains
- URI prefix differences:
- published nanopub URIs may use
purl.orgorw3id.orgprefixes depending on server behavior.
- published nanopub URIs may use