From e2692665b4705e1bf5b8d0c7f840bc900449e71c Mon Sep 17 00:00:00 2001 From: Robin Richardson Date: Fri, 5 Mar 2021 11:44:37 +0100 Subject: [PATCH] Fix overwriting of pubinfo and prov rdf --- CHANGELOG.md | 5 +++++ CITATION.cff | 4 ++-- nanopub/_version.py | 2 +- nanopub/publication.py | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0887036..629277a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [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 diff --git a/CITATION.cff b/CITATION.cff index 7d129a23..c9765793 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -25,5 +25,5 @@ keywords: license: "Apache-2.0" message: "If you use this software, please cite it using these metadata." title: "nanopub: A python library for searching, publishing and modifying nanopublications" -version: "1.2.4" -date-released: "2021-03-04" +version: "1.2.5" +date-released: "2021-03-05" diff --git a/nanopub/_version.py b/nanopub/_version.py index b3f9ac7f..b7e19904 100644 --- a/nanopub/_version.py +++ b/nanopub/_version.py @@ -1 +1 @@ -__version__ = "1.2.4" +__version__ = "1.2.5" diff --git a/nanopub/publication.py b/nanopub/publication.py index 88e7b801..6818e564 100644 --- a/nanopub/publication.py +++ b/nanopub/publication.py @@ -200,8 +200,8 @@ def from_assertion(cls, assertion_rdf: rdflib.Graph, # Avoid mutating the user's RDF assertion_rdf = deepcopy(assertion_rdf) - provenance_rdf = deepcopy(assertion_rdf) - pubinfo_rdf = deepcopy(assertion_rdf) + provenance_rdf = deepcopy(provenance_rdf) + pubinfo_rdf = deepcopy(pubinfo_rdf) for user_rdf in [assertion_rdf, provenance_rdf, pubinfo_rdf]: if user_rdf is not None: