From 12732949b9753011aa3bdcbb86d5150a46f28411 Mon Sep 17 00:00:00 2001 From: lekss361 Date: Thu, 7 May 2026 21:04:38 +0300 Subject: [PATCH] ignore --- .gitignore | 2 ++ data/sql/69_objective_smoke.py | 4 +++- data/sql/69b_objective_minimal.py | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b8c49091..40941af3 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,8 @@ out/ data/raw/ data/raw/prinzip_crm.sqlite data/raw/domrf_photos/ +# Objective API smoke dumps (ходят в backend/data/raw когда скрипт запускают из backend/) +backend/data/raw/ *.csv *.csv.zip !backend/db/init/*.sql diff --git a/data/sql/69_objective_smoke.py b/data/sql/69_objective_smoke.py index e88ea04c..240babba 100644 --- a/data/sql/69_objective_smoke.py +++ b/data/sql/69_objective_smoke.py @@ -42,7 +42,9 @@ def main() -> int: end = date.today().replace(day=1) start = (end - timedelta(days=1)).replace(day=1) - out_dir = Path("data/raw/objective_smoke") / datetime.utcnow().strftime("%Y%m%d_%H%M%S") + # Всегда пишем в /data/raw/objective_smoke/ независимо от cwd + repo_root = Path(__file__).resolve().parent.parent.parent + out_dir = repo_root / "data" / "raw" / "objective_smoke" / datetime.utcnow().strftime("%Y%m%d_%H%M%S") out_dir.mkdir(parents=True, exist_ok=True) try: diff --git a/data/sql/69b_objective_minimal.py b/data/sql/69b_objective_minimal.py index 13c77890..f8595426 100644 --- a/data/sql/69b_objective_minimal.py +++ b/data/sql/69b_objective_minimal.py @@ -109,7 +109,11 @@ def main() -> int: end_date = date.today() start_date = end_date - timedelta(days=args.days) complex_name = None if args.no_complex else args.complex - out_dir = Path("data/raw/objective_test") / datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S") + # Всегда пишем в /data/raw/objective_test/ независимо от cwd скрипта + # (раньше был относительный путь — попадал в backend/data/raw/ когда юзер + # запускал из backend/, и эти файлы превышали 512KB pre-commit лимит). + repo_root = Path(__file__).resolve().parent.parent.parent + out_dir = repo_root / "data" / "raw" / "objective_test" / datetime.now(timezone.utc).strftime("%Y%m%d_%H%M%S") out_dir.mkdir(parents=True, exist_ok=True) print(f"=== Objective minimal probe")