Browse Source

[DATALAD] Recorded changes

Daniel Busch 4 months ago
parent
commit
76faa9536d
2 changed files with 4 additions and 4 deletions
  1. 3 3
      src/faostat_data_primap/read.py
  2. 1 1
      tests/integration/test_download_and_read.py

+ 3 - 3
src/faostat_data_primap/read.py

@@ -191,7 +191,7 @@ def read_data(
 
 
 def read_latest_data(
-    downloaded_data_path: pathlib.Path = downloaded_data_path,
+    downloaded_data_path_custom: pathlib.Path = downloaded_data_path,
     save_path: pathlib.Path = extracted_data_path,
 ) -> None:
     """
@@ -201,11 +201,11 @@ def read_latest_data(
     and saves the files in the extracted_data directory.
 
     """
-    domains = get_all_domains(downloaded_data_path)
+    domains = get_all_domains(downloaded_data_path_custom)
 
     domains_and_releases_to_read = []
     for domain in domains:
-        domain_path = downloaded_data_path / domain
+        domain_path = downloaded_data_path_custom / domain
         domains_and_releases_to_read.append((domain, get_latest_release(domain_path)))
 
     read_data(

+ 1 - 1
tests/integration/test_download_and_read.py

@@ -36,7 +36,7 @@ def test_download_all_domains(tmp_path):
 
     # read and save latest data
     read_latest_data(
-        downloaded_data_path=downloaded_data_path, save_path=extracted_data_path
+        downloaded_data_path_custom=downloaded_data_path, save_path=extracted_data_path
     )
 
     release_folder = os.listdir(extracted_data_path)