feat: transient pubinfo templates not carried over on supersede/override/derive/use - #647
Merged
Merged
Conversation
…ide/derive/use Introduces the nt:TransientTemplate flag (issue #606): a pubinfo template so flagged has its filled content bound to the one nanopub it was published with. When that nanopub is used as a fill source, the template's statements are consumed by throwaway contexts and discarded, so they neither carry over into the new nanopub nor fall through to the unused-statement warning or the hand-coded-statements fallback. The flag is checked on the latest template version, so flagging a template also covers nanopubs created with older versions of it. Along with it: - A change-note field is offered by default (removable) when superseding or overriding a nanopub. - Throwaway contexts clear the preset creator slot so other people's dct:creator triples are consumed too, and the source creators' foaf:name triples are dropped like the session user's. - The hand-coded catch-all context is filled last, after that cleanup, and is dropped when nothing is left for it (its statement is required, so an empty section blocked publishing). The Derived, Change note and Creator pubinfo templates are published as transient; the change-note statement is optional in its latest version. Closes #606 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #606
What
Adds the
nt:TransientTemplateflag: a pubinfo template so flagged has its filled content bound to the one nanopub it was published with. When that nanopub is used as a fill source (supersede, override, derive, use/fill-all), the template's statements are consumed by throwaway contexts and discarded — they neither carry over into the new nanopub nor fall through to the "could not be filled in" warning or the hand-coded-statements fallback. The flag is checked on the latest template version, so flagging a template also covers nanopubs created with its older versions.Also in this PR:
dct:creatortriples are consumed as well; the source creators'foaf:nametriples are dropped like the session user's already was.Published templates (live)
RA3KyKGBWWXKZa-Tgq1XW8djl-9veFZDC2lcXIOeNz1WERA7NZ9N1vb-mbTo6pOyR14fdbQ8PpFtJHTY3UBPb6vMh4RAKc76yHLDbloE6ObluzYQsfX37v6qrZXbYeIKpe8-YUoRA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrAThe term is defined locally in
Template.javauntil it is added to nanopub-java'sNTEMPLATEand the ntemplate ontology.Verification
TransientTemplateTest(flag parsing); PublishForm/fill test suites green (42 tests).🤖 Generated with Claude Code