Skip to content

Commit

Permalink
bugfix for identifiers webservice
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskoenig committed Jul 25, 2023
1 parent b750c74 commit f9fa236
Show file tree
Hide file tree
Showing 6 changed files with 8,170 additions and 3,658 deletions.
10 changes: 10 additions & 0 deletions release-notes/0.3.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Release notes for pymetadata 0.3.9
![pymetadata](https://github.com/matthiaskoenig/pymetadata/raw/develop/docs/images/favicon/pymetadata-100x100-300dpi.png)

We are pleased to release the next version of pymetadata including the
following changes:

## Features
- bugfixes for changing identifiers web service

Your pymetadata team
3 changes: 0 additions & 3 deletions src/pymetadata/core/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def __init__(self, qualifier: Union[BQB, BQM], resource: str):
elif resource.startswith("urn:miriam:"):
match3 = MIRIAM_URN_PATTERN.match(resource)
if match3:

tokens = match3.group(1).split(":")
self.collection = tokens[0]
self.term = ":".join(tokens[1:]).replace("%3A", ":")
Expand Down Expand Up @@ -240,7 +239,6 @@ def __init__(self, annotation: RDFAnnotation):
self.errors: List = []

if self.collection:

# register MIRIAM xrefs
namespace = REGISTRY.ns_dict.get(self.collection, None)
if not namespace:
Expand All @@ -254,7 +252,6 @@ def __init__(self, annotation: RDFAnnotation):
namespace.resources = []

for ns_resource in namespace.resources:

# create url
url = ns_resource.urlPattern

Expand Down
4 changes: 4 additions & 0 deletions src/pymetadata/identifiers/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class Resource:
location: dict = field(repr=False)
deprecated: bool = field(repr=False)
deprecationDate: str = field(repr=False)
protectedUrls: bool = field(repr=False, default=False)
renderProtectedLanding: bool = field(repr=False, default=False)
authHelpUrl: Optional[str] = field(repr=False, default=None)
authHelpDescription: Optional[str] = field(repr=False, default=None)


@dataclass
Expand Down
1 change: 0 additions & 1 deletion src/pymetadata/ontologies/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def update_ontology_file(ofile: OntologyFile) -> None:
r.raise_for_status()
with open(owl_path, "wb") as f:
for chunk in r.iter_content(chunk_size=8192):

f.write(chunk)

# only store gzip version
Expand Down
Loading

0 comments on commit f9fa236

Please sign in to comment.