Skip to content

Commit

Permalink
ati: ATI tests split by activity/organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Dec 13, 2024
1 parent cf1d4f0 commit 7239ad7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions stats/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,16 @@ def _ruleset_passes(self):
return out


@returns_numberdict
@returns_numberdictdict
@memoize
def ati_tests(self):
out = {}
out = defaultdict(dict)
tag = self.element.tag
for test in ati_tests:
result = test(self.element, codelists=CODELISTS[self._major_version()])
result = int(bool(result))
out[f"{test.feature.name}: {test.name}"] = result
if tag in test.feature.tags:
result = test(self.element, codelists=CODELISTS[self._major_version()])
result = int(bool(result))
out[tag][f"{test.feature.name}: {test.name}"] = result
return out

@returns_number
Expand Down

0 comments on commit 7239ad7

Please sign in to comment.