Skip to content

Commit

Permalink
maturity setter
Browse files Browse the repository at this point in the history
  • Loading branch information
huberrob committed Oct 16, 2023
1 parent f167b51 commit e67e571
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions fuji_server/evaluators/fair_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def __init__(self, fuji_instance):
self.logger = self.fuji.logger
self.metric_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)?"

def set_maturity(self, maturity):
if self.maturity < maturity:
self.maturity = maturity

def set_metric(self, metric_identifier):
"""Set the metric for evaluation process.
Expand Down
6 changes: 3 additions & 3 deletions fuji_server/evaluators/fair_evaluator_searchable.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def testMetadataExchangeStandardsAvailable(self):
standards_supported.append("SPARQL")
if standards_supported:
self.setEvaluationCriteriumScore(self.metric_identifier + "-3", test_score, "pass")
self.maturity = self.getTestConfigMaturity(self.metric_identifier + "-3")
self.set_maturity(self.getTestConfigMaturity(self.metric_identifier + "-3"))
self.score.earned += test_score
# standards_supported.append(self.fuji.self.metadata_service_type)
self.search_mechanisms.append(
Expand Down Expand Up @@ -179,7 +179,7 @@ def testSearchEngineCompatibleMetadataAvailable(self):
set(dict(self.fuji.metadata_sources).keys()).intersection(self.search_engines_support))"""
if search_engine_support_match:
self.setEvaluationCriteriumScore(self.metric_identifier + "-1", test_score, "pass")
self.maturity = self.getTestConfigMaturity(self.metric_identifier + "-1")
self.set_maturity(self.getTestConfigMaturity(self.metric_identifier + "-1"))
self.score.earned += test_score
test_status = True
self.search_mechanisms.append(
Expand Down Expand Up @@ -245,7 +245,7 @@ def testListedinSearchEngines(self):
)
if registries_supported:
self.setEvaluationCriteriumScore(self.metric_identifier + "-2", test_score, "pass")
self.maturity = self.getTestConfigMaturity(self.metric_identifier + "-2")
self.set_maturity(self.getTestConfigMaturity(self.metric_identifier + "-2"))
self.score.earned += test_score
self.search_mechanisms.append(
OutputSearchMechanisms(mechanism="metadata registry", mechanism_info=registries_supported)
Expand Down

0 comments on commit e67e571

Please sign in to comment.