mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-24 10:34:18 -08:00
29 lines
536 B
Python
29 lines
536 B
Python
|
from pathlib import Path
|
||
|
|
||
|
from data_pipeline.utils import (
|
||
|
get_module_logger,
|
||
|
remove_all_from_dir,
|
||
|
remove_files_from_dir,
|
||
|
)
|
||
|
|
||
|
|
||
|
logger = get_module_logger(__name__)
|
||
|
|
||
|
|
||
|
def reset_data_directories(
|
||
|
data_path: Path,
|
||
|
) -> None:
|
||
|
"""Empties all tribal files"""
|
||
|
tribal_data_path = data_path / "tribal"
|
||
|
|
||
|
# csv
|
||
|
csv_path = tribal_data_path / "csv"
|
||
|
remove_files_from_dir(
|
||
|
csv_path,
|
||
|
".csv",
|
||
|
)
|
||
|
|
||
|
# geojson
|
||
|
geojson_path = tribal_data_path / "geojson"
|
||
|
remove_all_from_dir(geojson_path)
|