From 763c9e191fc6b63b4ab8883d2c411ac82cbb5b32 Mon Sep 17 00:00:00 2001 From: arcangelo7 Date: Wed, 5 Jun 2024 16:32:03 +0200 Subject: [PATCH] if self.modified_entities is not None and URIRef(entity.res.split('/prov/se/')[0]) not in self.modified_entities: --- oc_ocdm/storer.py | 6 ++---- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/oc_ocdm/storer.py b/oc_ocdm/storer.py index 45d691a..e32dd46 100644 --- a/oc_ocdm/storer.py +++ b/oc_ocdm/storer.py @@ -22,7 +22,7 @@ from typing import TYPE_CHECKING from zipfile import ZIP_DEFLATED, ZipFile -from rdflib import ConjunctiveGraph +from rdflib import ConjunctiveGraph, URIRef from SPARQLWrapper import SPARQLWrapper from oc_ocdm.graph.graph_entity import GraphEntity @@ -37,8 +37,6 @@ if TYPE_CHECKING: from typing import Any, Dict, List, Optional, Set, Tuple - from rdflib import URIRef - from oc_ocdm.abstract_entity import AbstractEntity from oc_ocdm.abstract_set import AbstractSet @@ -158,7 +156,7 @@ def store_all(self, base_dir: str, base_iri: str, context_path: str = None, proc relevant_paths: Dict[str, list] = dict() for entity in self.a_set.res_to_entity.values(): is_relevant = True - if self.modified_entities is not None and entity.res not in self.modified_entities: + if self.modified_entities is not None and URIRef(entity.res.split('/prov/se/')[0]) not in self.modified_entities: is_relevant = False if is_relevant: cur_dir_path, cur_file_path = self._dir_and_file_paths(entity.res, base_dir, base_iri, process_id) diff --git a/pyproject.toml b/pyproject.toml index c4641dd..51eb629 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oc_ocdm" -version = "8.1.1" +version = "8.1.2" description = "Object mapping library for manipulating RDF graphs that are compliant with the OpenCitations datamodel." authors = [ "Silvio Peroni ",