diff --git a/ihm_validation/report.py b/ihm_validation/report.py index fb2e6b60..30cab21a 100644 --- a/ihm_validation/report.py +++ b/ihm_validation/report.py @@ -23,6 +23,8 @@ from collections import Counter import numpy as np +REPORT_VERSION = '1.1' + class WriteReport(object): def __init__(self, mmcif_file, db, driver, cache, nocache=False): self.mmcif_file = mmcif_file @@ -32,6 +34,7 @@ def __init__(self, mmcif_file, db, driver, cache, nocache=False): self.driver = driver self.cache = cache self.nocache = nocache + self.report_version = REPORT_VERSION def run_entry_composition(self, Template_Dict: dict) -> dict: @@ -50,6 +53,8 @@ def run_entry_composition(self, Template_Dict: dict) -> dict: # to print out tables. Why Sai?--because JS is annoying and it is just easier # to construct tables with lists than any other data struc # utility module has functions to check outputs from python-ihm library and convert to JS friendly format + Template_Dict['report_version'] = self.report_version + Template_Dict['python_ihm_version'] = utility.get_python_ihm_version() Template_Dict['ensemble_info'] = ensemble_info Template_Dict['sphere'] = self.input.check_sphere() Template_Dict['num_ensembles'] = self.input.check_ensembles() diff --git a/ihm_validation/utility.py b/ihm_validation/utility.py index f20d8cfe..b501d9c9 100644 --- a/ihm_validation/utility.py +++ b/ihm_validation/utility.py @@ -518,3 +518,8 @@ def compress_cx_stats(cx_stats: dict) -> list: out_stats.append(mgv['cx_stats']['All']['Satisfied']) return out_stats + +def get_python_ihm_version() -> str: + """returns Python-IHM version""" + import ihm + return ihm.__version__ diff --git a/templates/full_validation_pdf.html b/templates/full_validation_pdf.html index 879ab607..c15bd10d 100644 --- a/templates/full_validation_pdf.html +++ b/templates/full_validation_pdf.html @@ -139,6 +139,8 @@
The following software was used in the production of this report:
The following software was used in the production of this report.