From f62d137978a4c54b95dd690f034dd8d04c6532fb Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 19 Nov 2024 21:03:47 +0100 Subject: [PATCH] Allow fetching from compressed properties files. --- docs/news.rst | 12 ++++++++++++ lab/fetcher.py | 9 ++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/news.rst b/docs/news.rst index cb7ab7c0d..b3ef57444 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,18 @@ Changelog ========= +v8.4 (unreleased) +----------------- + +Lab +^^^ +* Allow fetching from compressed properties files (Jendrik Seipp). + +Downward Lab +^^^^^^^^^^^^ +* No changes. + + v8.3 (2024-10-22) ----------------- diff --git a/lab/fetcher.py b/lab/fetcher.py index be610e8cc..14a4ad92e 100644 --- a/lab/fetcher.py +++ b/lab/fetcher.py @@ -98,9 +98,6 @@ def __call__(self, src_dir, eval_dir=None, merge=None, filter=None, **kwargs): if not src_dir.exists(): logging.critical(f"{src_dir} is missing") - src_props_file = src_dir if src_dir.is_file() else src_dir / "properties" - run_filter = tools.RunFilter(filter, **kwargs) - eval_dir = eval_dir or str(src_dir).rstrip("/") + "-eval" eval_dir = Path(eval_dir) logging.info( @@ -117,8 +114,14 @@ def __call__(self, src_dir, eval_dir=None, merge=None, filter=None, **kwargs): tools.remove_path(eval_dir) # Load properties in the eval_dir if there are any already. + src_props_file = src_dir / "properties" + for path in [src_dir / "properties.xz", src_dir]: + if not src_props_file.is_file() and path.is_file(): + src_props_file = path + break fetch_from_eval_dir = src_props_file.exists() combined_props = tools.Properties(eval_dir / "properties") + run_filter = tools.RunFilter(filter, **kwargs) if fetch_from_eval_dir: src_props = tools.Properties(filename=src_props_file) if not src_props: