Skip to content

Commit

Permalink
fixed sequence of re3data lookup, changed/added debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
huberrob committed Nov 28, 2023
1 parent 59c4926 commit 296b5a7
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions fuji_server/evaluators/fair_evaluator_community_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,23 +202,29 @@ def retrieve_metadata_standards_from_re3data(self):
repoHelper = self.fuji.repo_helper
if not self.fuji.metadata_service_url:
self.logger.info(
"{} : Inferring metadata service endpoint (OAI, SPARQL) information through re3data/datacite services".format(
"{} : Inferring metadata service endpoint (OAI, SPARQL) information and listed metadata formats through re3data/datacite services".format(
"FsF-R1.3-01M"
)
)
self.fuji.oaipmh_endpoint = repoHelper.getRe3MetadataAPIs().get("OAI-PMH")
self.fuji.sparql_endpoint = repoHelper.getRe3MetadataAPIs().get("SPARQL")
stds = []
for sturi in repoHelper.getRe3MetadataStandards():
sinfo = self.get_metadata_standards_info(sturi, "re3data")
# print('OAI URI ', sturi, sinfo)
if sinfo:
self.found_metadata_standards.append(sinfo)
if sinfo.get("name") not in stds:
stds.append(sinfo.get("name"))
self.logger.info(
"{} : Metadata standards listed in re3data record -: {}".format("FsF-R1.3-01M", str(stds))
)
if self.fuji.oaipmh_endpoint or self.fuji.sparql_endpoint:
self.logger.info(
"{} : Found metadata service endpoint (OAI, SPARQL) listed in re3data record -: {}".format(
"FsF-R1.3-01M", (self.fuji.oaipmh_endpoint, self.fuji.sparql_endpoint)
)
)
stds = []
for sturi in repoHelper.getRe3MetadataStandards():
sinfo = self.get_metadata_standards_info(sturi, "re3data")
# print('OAI URI ', sturi, sinfo)
if sinfo:
self.found_metadata_standards.append(sinfo)
if sinfo.get("name") not in stds:
stds.append(sinfo.get("name"))
self.logger.info(
"{} : Metadata standards listed in re3data record -: {}".format("FsF-R1.3-01M", str(stds))
)
else:
self.logger.info(
"FsF-R1.3-01M : No Datacite client id found, therefore skipping re3data metadata retrieval"
Expand Down

0 comments on commit 296b5a7

Please sign in to comment.