fix(code): Get data dirs relative to project dir

This commit is contained in:
Marty Oehme 2024-07-15 10:55:46 +02:00
parent ad71859ded
commit c1eccee426
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -1,4 +1,5 @@
from pathlib import Path from pathlib import Path
import os
import re import re
## standard imports ## standard imports
from IPython.core.display import Markdown as md from IPython.core.display import Markdown as md
@ -11,7 +12,8 @@ import bibtexparser
sns.set_style("whitegrid") sns.set_style("whitegrid")
DATA_DIR=Path("./02-data") PROJECT_DIR=Path(os.getenv("QUARTO_PROJECT_DIR", "."))
DATA_DIR=PROJECT_DIR.joinpath("02-data")
RAW_DATA=DATA_DIR.joinpath("raw") RAW_DATA=DATA_DIR.joinpath("raw")
WORKING_DATA=DATA_DIR.joinpath("intermediate") WORKING_DATA=DATA_DIR.joinpath("intermediate")
PROCESSED_DATA=DATA_DIR.joinpath("processed") PROCESSED_DATA=DATA_DIR.joinpath("processed")