From 7cde3a30ec84f8f1c8c47d3e41f2d21ed317ff58 Mon Sep 17 00:00:00 2001 From: repror_bot Date: Tue, 2 Jul 2024 15:42:02 +0000 Subject: [PATCH 1/2] Update statistics at docs/index.html From e7d46cf0b88ba863425d1bca8b4b98ca4c3f2346 Mon Sep 17 00:00:00 2001 From: nichmor Date: Wed, 3 Jul 2024 11:27:33 +0300 Subject: [PATCH 2/2] fix: apply correct patches --- src/repror/cli/generate_html.py | 6 +++++- src/repror/internals/patch_database.py | 1 + src/repror/internals/patcher.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/repror/cli/generate_html.py b/src/repror/cli/generate_html.py index 0b40044..96ad4bb 100644 --- a/src/repror/cli/generate_html.py +++ b/src/repror/cli/generate_html.py @@ -108,7 +108,11 @@ def remove_ansi_codes(text: str) -> str: return ansi_escape.sub("", text) -def rerender_html(root_folder: Path, update_remote: bool = False, config_path: Path = Path("config.yaml")): +def rerender_html( + root_folder: Path, + update_remote: bool = False, + config_path: Path = Path("config.yaml"), +): docs_folder = get_docs_dir(root_folder) print(f"Generating into : {docs_folder}") diff --git a/src/repror/internals/patch_database.py b/src/repror/internals/patch_database.py index ddb45e3..faa8c35 100644 --- a/src/repror/internals/patch_database.py +++ b/src/repror/internals/patch_database.py @@ -37,6 +37,7 @@ def patch_recipes_to_db(recipes_dir: str = "recipe_info") -> int: ) if not exisiting_recipe: print(f":running: Writing {recipe_obj.name} to the database") + recipe_obj.id = None session.add(recipe_obj) else: print( diff --git a/src/repror/internals/patcher.py b/src/repror/internals/patcher.py index 1a50238..366b507 100644 --- a/src/repror/internals/patcher.py +++ b/src/repror/internals/patcher.py @@ -13,7 +13,7 @@ def find_patches(folder_path: str) -> list[Path]: """ Use glob to find all .json files in the folder """ - json_files = glob.glob(os.path.join(folder_path, "**/*.json")) + json_files = glob.glob(os.path.join(folder_path, "**/*.json"), recursive=True) return [Path(file) for file in json_files]