Skip to content

Commit 32f1439

Browse files
committed
improve log_path() formatting and remove PATHS["state"]
1 parent fe5e217 commit 32f1439

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/shared.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def setup(current_file):
4141
)
4242
paths["data"] = os.path.join(paths["repo"], "data")
4343
data_quarter = os.path.join(paths["data"], f"{quarter}")
44-
paths["state"] = os.path.join(data_quarter, "state.yaml")
4544
for phase in ["1-fetch", "2-process", "3-report"]:
4645
paths[f"data_{phase}"] = os.path.join(data_quarter, phase)
4746
paths["data_phase"] = os.path.join(data_quarter, current_phase)
@@ -53,9 +52,14 @@ def setup(current_file):
5352

5453
def log_paths(logger, paths):
5554
paths_list = []
55+
repo_path = paths["repo"]
5656
for label, path in paths.items():
5757
label = f"{label}:"
58-
paths_list.append(f"\n{' ' * 4}{label:<11} {path}")
58+
if label == "repo:":
59+
paths_list.append(f"\n{' ' * 4}{label} {path}")
60+
else:
61+
path_new = path.replace(repo_path, ".")
62+
paths_list.append(f"\n{' ' * 8}{label:<15} {path_new}")
5963
paths_list = "".join(paths_list)
6064
logger.info(f"PATHS:{paths_list}")
6165

0 commit comments

Comments
 (0)