From e718935209f264b67cc1dcfb935b51d004f4b44e Mon Sep 17 00:00:00 2001 From: Edwin Henneken Date: Tue, 29 Oct 2024 09:30:14 -0400 Subject: [PATCH] fix for reporting bug --- config.py | 3 ++- xreport/reports.py | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index 4664657..a25cb59 100644 --- a/config.py +++ b/config.py @@ -16,13 +16,14 @@ # ============================= APPLICATION ==================================== # # # Collections we are reporting on -COLLECTIONS = ['AST', 'HP', 'PS', 'HP_AST', 'PS_AST', 'CORE', 'ES', 'OA'] +COLLECTIONS = ['CORE_AST', 'AST', 'HP', 'PS', 'HP_AST', 'PS_AST', 'CORE', 'ES', 'OA'] # Report formats supported FORMATS = ['NASA', 'CURATORS', 'MISSING'] # Report types supported SUBJECTS = ['FULLTEXT', 'REFERENCES', 'SUMMARY', 'METADATA'] # Which journals are we reporting on per collection JOURNALS = { + 'CORE_AST':['A&A','A&ARv','A&AS','AJ','AN','APh','ApJ','ApJL','ApJS','ARA&A','NatAs','PASP'], 'AST': ['A&A','A&ARv','A&AS','AJ','AN','APh','ApJ','ApJL','ApJS','ARA&A','ARep','AsBio','AstL','CeMDA','FrASS','Galax','GeCoA','IAUS','IJAsB','JCAP','MNRAS','NatAs','PASA','PASJ','PASP','RAA','RNAAS','SCPMA','Univ','ASPC'], 'PS': ["AREPS","ASTRA","AdSpR","AnGeo","Ap&SS","AsBio","CeMDA","E&PSL","EM&P","GeCoA","IJAsB","Icar","JAtS", "JGRA","JGRD","JGRE","M&PS","M&PSA","Metic","NatGe","P&SS","PEPI","RvGeo","SSRv","SoSyR","SoPh", diff --git a/xreport/reports.py b/xreport/reports.py index 0411b4e..2fe8c7f 100644 --- a/xreport/reports.py +++ b/xreport/reports.py @@ -498,17 +498,14 @@ def _get_reference_data(self, rtype): """ for journal in self.journals: cov_dict = {} - matched = unmatched = 0 # For each volume of the journals in the collection we retrieve that reference matching level for volume in sorted(self.statsdata[journal]['pubdata'].keys()): try: ok, fail = self._process_one_volume(journal, volume, rtype) except: ok = fail = 0 - matched += ok - unmatched += fail try: - frac = 100*float(matched)/float(unmatched+matched) + frac = 100*float(ok)/float(ok+fail) except: frac = 0.0 if journal in self.config.get("YEAR_IS_VOL"):