From 1f5d31b262f2550f9d99450c47dee1144ace6a7a Mon Sep 17 00:00:00 2001 From: Bee Webb Date: Sun, 1 Sep 2024 13:55:12 +0000 Subject: [PATCH] wip don't use metadata json --- data.py | 2 +- make_html.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data.py b/data.py index ea5368ea4..92e989982 100644 --- a/data.py +++ b/data.py @@ -197,7 +197,7 @@ def deep_merge(obj1, obj2): for publisher, publisher_dict in ckan.items() for dataset in publisher_dict.keys() } -metadata = json.load(open('./stats-calculated/metadata.json'), object_pairs_hook=OrderedDict) +#metadata = json.load(open('./stats-calculated/metadata.json'), object_pairs_hook=OrderedDict) with open('./data/downloads/errors') as fp: for line in fp: if line != '.\n': diff --git a/make_html.py b/make_html.py index 04546b9a6..37a4ba0b8 100644 --- a/make_html.py +++ b/make_html.py @@ -32,7 +32,6 @@ github_issues, get_publisher_stats, MAJOR_VERSIONS, - metadata, publisher_name, publishers_ordered_by_title, is_valid_element, @@ -109,7 +108,8 @@ def get_codelist_values(codelist_values_for_element): # Store data processing times -date_time_data_obj = parser.parse(metadata['created_at']) +date_time_data_str = max(json.load(open("stats-calculated/gitdate.json")).values()) +date_time_data_obj = parser.parse(date_time_data_str) # Custom Jinja filters app.jinja_env.filters['xpath_to_url'] = xpath_to_url