Skip to content

Commit 8c512ba

Browse files
committed
refactor: update data input path handling for consistency
1 parent 7ef0662 commit 8c512ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

inat_fetcher/src/fetcher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
p = Path(__file__).parents[1]
1313

1414
# Set up paths and filenames
15-
data_in_path = "/data/in/"
15+
data_in_path = p / "data" / "in"
16+
data_in_path.mkdir(parents=True, exist_ok=True)
1617
output_filename = "inat_observations_raw"
1718
filename_suffix = "csv"
18-
path_to_output_file = os.path.join(str(p) + data_in_path, output_filename + "." + filename_suffix)
19+
path_to_output_file = data_in_path / f"{output_filename}.{filename_suffix}"
1920

2021
# import env variable
2122
access_token = os.getenv("INATURALIST_ACCESS_TOKEN")

0 commit comments

Comments
 (0)