Skip to content

Commit

Permalink
Merge pull request #133 from fair-workflows/fix_deepcopy_issue
Browse files Browse the repository at this point in the history
Fix overwriting of pubinfo and prov rdf
  • Loading branch information
raar1 authored Mar 5, 2021
2 parents 8cf7427 + e269266 commit 8e2c5d8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion nanopub/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.4"
__version__ = "1.2.5"
4 changes: 2 additions & 2 deletions nanopub/publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8e2c5d8

Please sign in to comment.