|
@@ -3,15 +3,15 @@ Define tasks to download and read the FAO data set.
|
|
|
"""
|
|
|
import datalad.api
|
|
|
|
|
|
-
|
|
|
-def get_output_folders(domains_and_releases_to_read):
|
|
|
- """Get the paths of folders where output files will be saved"""
|
|
|
- output_folders = []
|
|
|
- # todo remove hard coded key
|
|
|
- for domain, release in domains_and_releases_to_read["2024"]:
|
|
|
- # todo pathlib Path
|
|
|
- output_folders.append(f"downloaded_data/{domain}/{release}")
|
|
|
- return output_folders
|
|
|
+# we need this for the download script
|
|
|
+# def get_output_folders(domains_and_releases_to_read):
|
|
|
+# """Get the paths of folders where output files will be saved"""
|
|
|
+# output_folders = []
|
|
|
+# # todo remove hard coded key
|
|
|
+# for domain, release in domains_and_releases_to_read["2024"]:
|
|
|
+# # todo pathlib Path
|
|
|
+# output_folders.append(f"downloaded_data/{domain}/{release}")
|
|
|
+# return output_folders
|
|
|
|
|
|
|
|
|
def task_test_basic_target():
|
|
@@ -25,25 +25,25 @@ def task_test_basic_target():
|
|
|
return {"actions": [do_nothing]}
|
|
|
|
|
|
|
|
|
-def task_test_download_target():
|
|
|
+def task_download():
|
|
|
"""
|
|
|
test datalad target
|
|
|
"""
|
|
|
|
|
|
def datalad_run_download():
|
|
|
- datalad.api.run(cmd="python3 scripts/download_all_domains.py")
|
|
|
+ datalad.api.run(
|
|
|
+ cmd="python3 scripts/download_all_domains.py", outputs="downloaded_data"
|
|
|
+ )
|
|
|
|
|
|
return {"actions": [datalad_run_download]}
|
|
|
|
|
|
|
|
|
-def task_read_data():
|
|
|
+def task_read():
|
|
|
"""
|
|
|
read data set
|
|
|
"""
|
|
|
|
|
|
def read_dataset(save_path, run_id):
|
|
|
- # output_folders = get_output_folders(domains_and_releases_to_read)
|
|
|
-
|
|
|
print(f"Reading dataset for {save_path=} and {run_id=}")
|
|
|
cmd = (
|
|
|
f"python3 scripts/read_data_set.py "
|