Coverage for src / prepare_times_nz / utilities / filepaths.py: 100%
23 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-01 22:14 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-01 22:14 +0000
1"""
2This file surfaces our directory locations for anything else to reference
4This way any scripts can use these without hardcoding,
5which ensures consistent locations for the whole system
6We use Path variables to ensure consistency across separate environments.
8Note that this file expects to be in a specific location to find _REPO_ROOT
9That means if this file is moved, the _REPO_ROOT definition will need to change
11Note that output and data intermediate directories are currently wiped on each run
12THese are based on the addresses defined in this file.
14"""
16from pathlib import Path
18_THIS_DIR = Path(__file__).resolve().parent
19_REPO_ROOT = _THIS_DIR.parent.parent.parent
21# main directories
22PREP_LIBRARY_LOCATION = _THIS_DIR
23PREP_LOCATION = _REPO_ROOT
24TIMES_LOCATION = _REPO_ROOT.parent
26# Data directories (Top-level)
27OUTPUT_LOCATION = PREP_LOCATION / "output"
28DATA_INTERMEDIATE = PREP_LOCATION / "data_intermediate"
29DATA_RAW = PREP_LOCATION / "data_raw"
31# Data raw subfolders
33ASSUMPTIONS = DATA_RAW / "coded_assumptions"
34EXTERNAL_DATA = DATA_RAW / "external_data"
35CONCORDANCES = DATA_RAW / "concordances"
37# Data intermediate subfolders
39STAGE_0_DATA = DATA_INTERMEDIATE / "stage_0_config"
40STAGE_1_DATA = DATA_INTERMEDIATE / "stage_1_input_data"
41STAGE_2_DATA = DATA_INTERMEDIATE / "stage_2_baseyear_data"
42STAGE_3_DATA = DATA_INTERMEDIATE / "stage_3_scenario_data"
43STAGE_4_DATA = DATA_INTERMEDIATE / "stage_4_veda_format"
45# Scripts
47STAGE_0_SCRIPTS = PREP_LOCATION / "scripts/stage_0_settings"
48STAGE_1_SCRIPTS = PREP_LOCATION / "scripts/stage_1_prep_raw_data"
49STAGE_2_SCRIPTS = PREP_LOCATION / "scripts/stage_2_baseyear"
50STAGE_3_SCRIPTS = PREP_LOCATION / "scripts/stage_3_scenarios"
51STAGE_4_SCRIPTS = PREP_LOCATION / "scripts/stage_4_veda_format"
53# Other
55ANALYSIS = PREP_LOCATION / "analysis"