Skip to content

serializers: added dcat serializer #2328

serializers: added dcat serializer

serializers: added dcat serializer #2328

Triggered via pull request December 3, 2024 12:13
Status Failure
Total duration 8m 15s
Artifacts

tests.yml

on: pull_request
Matrix: Python
Fit to window
Zoom out
Zoom in

Annotations

2 errors
Python (site, 3.9, postgresql14, opensearch2): site/zenodo_rdm/serializers/dcat.py#L1
Black format check --- /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/serializers/dcat.py 2024-12-03 12:13:49.097474+00:00 +++ /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/serializers/dcat.py 2024-12-03 12:21:40.902019+00:00 @@ -21,28 +21,33 @@ super().__init__(**options) def add_missing_creator_link(self, rdf_tree): """Add `rdf:about` attributes to <rdf:Description> within <dct:creator> if missing.""" namespaces = rdf_tree.nsmap - creators = rdf_tree.xpath("//dct:creator/rdf:Description[not(@Rdf:about)]", namespaces=namespaces) + creators = rdf_tree.xpath( + "//dct:creator/rdf:Description[not(@Rdf:about)]", namespaces=namespaces + ) for description in creators: identifier_elem = description.find("dct:identifier", namespaces) if identifier_elem is not None: identifier = identifier_elem.text.strip() schemes = idutils.detect_identifier_schemes(identifier) rdf_about_url = next( - (idutils.to_url(identifier, scheme=scheme) for scheme in schemes if idutils.to_url(identifier, scheme)), - None + ( + idutils.to_url(identifier, scheme=scheme) + for scheme in schemes + if idutils.to_url(identifier, scheme) + ), + None, ) if rdf_about_url: description.set( "{http://www.w3.org/1999/02/22-rdf-syntax-ns#}about", rdf_about_url, ) return rdf_tree - def transform_with_xslt(self, dc_record, **kwargs): """Transform record with XSLT and add rdf:about.""" # Transform with base class functionality dc_etree = schema43.dump_etree(dc_record)
Python (site, 3.9, postgresql14, opensearch2)
Process completed with exit code 1.