Skip to content

Latest commit

 

History

History
306 lines (238 loc) · 24 KB

File metadata and controls

306 lines (238 loc) · 24 KB

2.2.2 (2026-06-23)

Bug Fixes

  • sign: define old_o before logging replaced object blank node (1f29dfd)

Documentation

  • document the Conventional Commits convention (0392976)

Tests

  • move artifactcode signing test to TestSign, source TRIG from testsuite (8512712)

Build and continuous integration

  • sync main via PR instead of direct push (main is protected) (8c3161b)

2.2.1 (2026-06-22)

Bug Fixes

  • support ~~~ARTIFACTCODE~~~ placeholder in custom namespaces (#232) (aae2bff), closes #233

Build and continuous integration

  • add workflow_dispatch to autorelease for manual triggering (9196dfd)

General maintenance

  • add bug report issue template (8163e59)
  • logging: replace log with logger for consistent logging practices (f81724e)
  • nanopub: unify checks when creating trusty nanopub (d911cdf)

2.2.0 (2026-04-21)

Features

  • adding retracting CLI option (f9caecd)
  • fdo: import handle-record URL/handle values as IRIs (ef7140e)
  • nanopub: add signature verification to is_valid method for signed nanopubs (a90c54d)
  • nanopub: add trusty check to assert that a trusty nanopub is a valid one (7bb477f)

Dependency updates

  • core-deps: update rdflib to >=6.3.2 and pyshacl to >=0.28.1 (37ef706)
  • deps: add setuptools to dependencies used by pyshacl (a114626)
  • deps: update dependencies for docs group (edc55a9)

Bug Fixes

  • adding genrated pubinfo time by default (4c4ac9d)
  • nanopub: add local time zone to creation time (5950bba)
  • nanopub: add validation for named graphs to ensure distinct URIs and correct namespace (d225ce2)
  • Nanopub: avoid mutable default arguments in constructor (76a9932)
  • Nanopub: ensure valid source URI handling for trusty nanopubs and set it correctly after fetching (3ce983b)
  • Nanopub: improve bnode handling and ensure deep copy of RDF graphs on initialization with Dataset (60e8bf4)
  • nanopub: read source_uri from head graph when a trusty nanopub is loaded (9d9dda3)
  • nanopub: the NanopubConf is only considered during init when the nanopub was not provided as trig/nquads (6e302dc)
  • nanopub: use UTC timezone for creation time in constructor (219226b)
  • RdfUtils, utils: improve separator handling for nanopub URIs (bcfb024)
  • RdfUtils: update get_trustyuri to handle correctly trustyuri passed as baseuri parameter (c13f42b)
  • RdfUtils: when URIs are trusty but externals were not rewritten and when trusty base is passed trusty code wasn't extract (5e13b35)
  • sign_utils: update to ensure that a signed nanopub has the triple in the publication info graph (22abc56)
  • sign_utils: update signature verification to use local nanopub metadata and ensure the signature targets the correct nanopub (907ca3a)
  • TestVerifyTrusty: update tests to use has_valid_trusty and ensure named graph context is preserved in quads (bfe21a6)
  • utils: extract_np_metadata takes into account if nanopub is using both # and / (8135018)

Documentation

  • nanopubs: update link to nanopub.net (9bee7ee)
  • update development and README to use uv (0cd4679)

Tests

  • deps: add nanopub-testsuite-connector dependency to v1.0.0 (0bd98d8)
  • deps: move setuptools to test dependencies group (dcaaaee)
  • deps: update nanopub-testsuite-connector test dependency (a2a458d)
  • deps: update nanopub-testsuite-connector test library dependency to v1.0.3 (b98f0d6)
  • deps: update nanopub-testsuite-connector test library to v1.0.4 (9a2f3a1)
  • nanopub: add extensive unit tests for nanopub creation (77677f7)
  • nanopub: add validity checks for trusty nanopub instances (891cc2f)
  • nanopub: enable test_metadata_matches_graph and use NanopubTestSuite (0d34bdf)
  • nanopub: refactor and enhance signing tests (44c1722)
  • nanopub: refactor tests to add granularity (c2d4225)
  • nanopub: remove java_wrap checks (5ab2047)
  • nanopub: update test_invalid_fetching with Exception raise check (8b0d97a)
  • RdfUtils: add test for trustyuri with hash char as separator (2ab4e44)
  • RdfUtils: add TestGetTrustyUri unit tests (a028c23)
  • RdfUtils: add tests for get_trustyuri to verify trustyuri as baseuri handling (377c332)
  • RdfUtils: add tests for temporary base URI handling in get_trustyuri (066dca0)
  • RdfUtils: add unit tests (c6981fc)
  • replace test files with testsuite project (6681b8c)
  • sign_utils: add unit test for verify_trusty function with real URI (8918bca)
  • sign_utils: add unit test to test the add_signature method (92ad213)
  • sign_utils: update test for verify_trusty with a new real URI and remove unused tests (4a975b2)
  • update nanopub-java to v1.86.1 (1b954d5)

Build and continuous integration

  • add submodule fetch to git checkout command (948d16c)
  • autorelease: update workflow for publishing to PyPI using semantic-release (2b718bd)
  • disable fail-fast in test strategy for testing with both rdflib versions (97a5204)
  • migrate from Poetry to UV for dependency management and CI setup (16bed0b)
  • test: update rdflib version to v6.3.2 (a402496)
  • update actions/checkout action to v6.0.2 (e1cd994)
  • update actions/setup-python action to v6.2.0 (13e8f8b)
  • update poetry install command to install main, test and dev dependencies for testing in CI (dce623c)
  • update Poetry to v2.3.2 (cc50ddd)
  • update Poetry to v2.3.2 (b941417)

General maintenance

  • gitignore: add examples/*.trig files (ea5559b)
  • RdfUtils, utils: improve separator handling for nanopub URIs (3c5bc85)
  • README: add semantic-release badge and improve formatting (d77d34a)
  • README: update broken DOI badge link (550113a)
  • readme: update test badge workflow link (7347463)
  • remove JavaWrapper and nanopub-java references (98326e1)
  • remove redundant parhenteses (140cf29)
  • remove testsuite submodule (c02fbeb)
  • remove unnecessary parameter from test_nanopub_fetch function (8bbe81a)
  • remove unused imports (8468f26)
  • replace poetry with uv (a56ef65)
  • sem-release: add configuration (91e2c1f)
  • sem-release: add dependencies (a2ae24b)
  • sem-release: update tag format in configuration (5ec1223)
  • update docs annotations (90c0553)
  • update documentation to remove references to nanopub-java (4e706b7)
  • update homepage URL (b414e09)
  • update poetry.lock (e0c5df0)
  • update testsuite submodule reference (263ffff)

Refactoring

  • clean up imports and formatting in test files (06833fb)
  • namespaces: remove PROV namespace definition and use the one provided by rdflib (b960e2d)
  • RdfUtils: move trusty uri checker to TrustyUriUtils class (6367cc8)
  • test_cli: use NanopubTestSuite fixture instead of local testsuite files (7e02527)
  • test_nanopub: improve readability of test_metadata_matches_graph and remove redundant test_source_uri_resolved_from_trusty_fetch (292918f)
  • test_nanopub: integrate TestSuiteSubfolder for fixture management (c787cda)
  • test_profile: replace local keys with signing keys from NanopubTestSuite (498e781)
  • test_testsuite: update tests to use parameterized fixtures (0e80ee6)

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.0.0] - 2022-12-15

Massive overhaul of the nanopub library with backwards incompatible changes.

Changed

  • The documentation website has been updated to use mkdocs
  • The doc website is now published to GitHub Pages via the build.yml workflow if the tests pass.
  • Profile private key can be now be loaded from a string instead of only a Path. This can be convenient if someone wants to load keys from anywhere else than a local file (e.g. network). There are still helpers functions to easily load from the profile.yml file.
  • The private and public key are now optional, a new keypair will be generated if the private key is missing. And the public key can be generated from the private key automatically if it is missing (orcid_id, name are still mandatory)
  • There is now a NanopubConfig object to hold the various arguments used to define the nanopub server where it will be published and which infos to attach to a nanopub.
  • Signing is now done in python, removing the dependency on java
  • java_wrapper is moved to the tests so it can still be used to compare signed nanopubs when testing
  • The Publication class has been renamed to Nanopub. That makes a lot of "Nanopub" in the code, but it is more consistent and easier to remember
  • Signing is now done directly on the Nanopub object (we don't use the client anymore for this): np.sign() and the np object is updated with the signed RDF (cf. the new doc below to see complete examples). This is convenient because it allows to define Templates for common nanopublications by inhereting the main Nanopub object, cf. existing template: Nanopub intro, Nanopub Index, Claim, Retract, Update
  • The NanopubClient object is now mainly used for search functions (through the grlc API), no changes there
  • The setup_nanopub_profile CLI was changed to a new CLI with multiple actions:
    • np setup prompt the existing CLI workflow to setup your nanopub profile
    • np profile check the current user profile used by the nanopub library (~/.nanopub/profile.yml)
    • np sign nanopub.trig to sign a nanopub file
    • np publish signed.nanopub.trig to publish a nanopub file (signed or not)
    • np check signed.nanopub.trig to check if a signed nanopub file is valid
  • Changed the uses of print() to use python logging (which enable users of the library to configure the level of logs they want, setting to INFO will show all existing prints)
  • A battery of tests was added using the same testsuite as nanopub-java to make sure the nanopubs signed with python are valid and follows the same standards: https://github.com/vemonet/nanopub/blob/sign-in-python/tests/test_testsuite.py#L10
  • Most of the existing tests for the client search have been kept
  • Updated the build.yml workflow to tests with all python versions from 3.7 to 3.10
  • Linting now also check types with mypy (not strict)
  • The setup.py + all files for python dev config such as .flake8 have been merged in 1 pyproject.tml file using the hatch build backend
  • Updated the setup for development, it does not require any tool that is not built in python: only venv ands pip are required (or you can use hatch to handle install and virtual envs for you). Checkout the development docs page for the complete instructions.

[1.2.11] - 2022-09-27

Added

  • Support for rdflib v6
  • Added options to let users choose if they want prov:generatedAtTime and prov:attributedTo automatically added to prov/pubinfo graphs

[1.2.10] - 2021-09-01

Changed

  • Use latest yatiml version instead of pinned version

[1.2.9] - 2021-09-01

Added

  • Include LICENSE file in python setup

[1.2.8] - 2021-09-01

Added

  • Also publish sdist when publishing to pypi

[1.2.7] - 2021-06-25

Changed

  • Prevent setup_nanopub_profile from ever overwriting key pair

Fixed

  • Pin click at version 7.1.2, as versions >8 break setup_nanopub_profile

[1.2.6] - 2021-04-30

Added

  • Search result dicts now contain nanopublication label too, if provided by the grlc endpoint.

[1.2.5] - 2021-03-05

Fixed

  • Fix bug that overwrites optional pubinfo and prov in from_assertion() calls.

[1.2.4] - 2021-03-04

Fixed

  • Fix bug where user rdf was being mutated during publishing.

[1.2.3] - 2021-02-05

Added

  • Added new publication_attributed_to argument to Publication.from_assertion(). Allows the pubinfo attribution to be manually set if desired.

[1.2.2] - 2021-01-29

Fixed

  • Fix FileAlreadyExists bug in setup_nanopub_profile

[1.2.1] - 2021-01-22

Changed

  • Rename setup_profile to setup_nanopub_profile to avoid ambiguity/clashes with other tools

Fixed

  • Make nanopub package compatible Windows operating system
  • Added UTF-8 related flags to nanopub-java (in java call) to fix issues with certain characters on certain java builds
  • Make regex in orcid validation accept ids ending with 'X'

[1.2.0] - 2020-12-23

Added

  • Added Zenodo badge to README
  • Pagination of results for search methods of NanopubClient

Changed

  • nanopub-java dependency is installed upon installation instead of upon runtime.
  • search methods of NanopubClient return iterator instead of list

[1.1.0] - 2020-12-17

Added

  • .zenodo.json for linking to zenodo
  • pubkey option to methods of NanopubClient that allows searching for publications signed with the given pubkey. For these methods:
    • find_nanopubs_with_text
    • find_nanopubs_with_pattern
    • find_things
  • filter_retracted option to methods of NanopubClient that allows searching for publications that are note retracted. For these methods:
    • find_nanopubs_with_text
    • find_nanopubs_with_pattern
    • find_things
  • NanopubClient.find_retractions_of method to search retractions of a given nanopublication.
  • Publication.signed_with_public_key property: the public key that the publication was signed with.
  • Publication.is_test_publication property: denoting whether this is a publicaion on the test server.

Changed

  • Improved error message by pointing to documentation instead of Readme upon ProfileErrors

Fixed

  • Catch FileNotFoundError when profile.yml does not exist, raise ProfileError with useful messageinstead.
  • Fixed broken link to documentation in README.md

[1.0.0] - 2020-12-08

NB: All changes before [1.0.0] are collapsed in here (even though there were multiple pre-releases)

Added

  • nanopub.client module with the NanopubClient class that implements:

    • Searching (being a client with a direct (but incomplete) mapping to the nanopub server grlc endpoint):

      • find_nanopubs_with_text method
      • find_nanopubs_with_pattern method
      • find_things method
    • Fetching:

      • fetch method to fetch a nanopublication
    • Publishing:

      • Publish a statement using claim method
      • Publish a Publication object with publish method
    • Retracting:

      • Publish a retraction of an existing nanopublication created by this user (i.e. signed with same RSA key)
    • Test server functionality

      • Client can optionally be set to publish to (and fetch from) the nanopub test servers only.
  • nanopub.publication module

    • Publication class to represent a nanopublication. Includes from_assertion class method to construct a Publication object from an assertion graph
    • replace_in_rdf helper method to replace values in RDF
  • nanopub.java_wrapper module, provides an interface to the nanopub-java tool for signing and publishing nanopublications.

  • nanopub.profile module, getters and setters for the nanopub user profile

  • nanopub.setup_profile, interactive command-line client to setup user profile

  • nanopub.namespaces, often-used RDF namespaces

  • examples/, holds a few notebooks that serve as examples of using the library

  • User documentation