Browse Source

[DATALAD] Recorded changes

Daniel Busch 3 months ago
parent
commit
6880d87e42

+ 55 - 0
docs/source/api/faostat_data_primap.download.rst

@@ -0,0 +1,55 @@
+faostat\_data\_primap.download
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.download
+
+.. currentmodule:: faostat_data_primap.download
+
+
+
+find\_previous\_release\_path
+=============================
+
+.. autofunction:: find_previous_release_path
+
+
+calculate\_checksum
+===================
+
+.. autofunction:: calculate_checksum
+
+
+download\_methodology
+=====================
+
+.. autofunction:: download_methodology
+
+
+get\_html\_content
+==================
+
+.. autofunction:: get_html_content
+
+
+get\_last\_updated\_date
+========================
+
+.. autofunction:: get_last_updated_date
+
+
+download\_file
+==============
+
+.. autofunction:: download_file
+
+
+unzip\_file
+===========
+
+.. autofunction:: unzip_file
+
+
+download\_all\_domains
+======================
+
+.. autofunction:: download_all_domains

+ 14 - 0
docs/source/api/faostat_data_primap.exceptions.rst

@@ -0,0 +1,14 @@
+faostat\_data\_primap.exceptions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.exceptions
+
+.. currentmodule:: faostat_data_primap.exceptions
+
+
+
+DateTagNotFoundError
+====================
+
+.. autoclass:: DateTagNotFoundError
+   :members:

+ 6 - 0
docs/source/api/faostat_data_primap.helper.FAO_categorisation_temp.rst

@@ -0,0 +1,6 @@
+faostat\_data\_primap.helper.FAO\_categorisation\_temp
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.helper.FAO_categorisation_temp
+
+.. currentmodule:: faostat_data_primap.helper.FAO_categorisation_temp

+ 6 - 0
docs/source/api/faostat_data_primap.helper.category_aggregation.rst

@@ -0,0 +1,6 @@
+faostat\_data\_primap.helper.category\_aggregation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.helper.category_aggregation
+
+.. currentmodule:: faostat_data_primap.helper.category_aggregation

+ 6 - 0
docs/source/api/faostat_data_primap.helper.country_mapping.rst

@@ -0,0 +1,6 @@
+faostat\_data\_primap.helper.country\_mapping
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.helper.country_mapping
+
+.. currentmodule:: faostat_data_primap.helper.country_mapping

+ 6 - 0
docs/source/api/faostat_data_primap.helper.definitions.rst

@@ -0,0 +1,6 @@
+faostat\_data\_primap.helper.definitions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.helper.definitions
+
+.. currentmodule:: faostat_data_primap.helper.definitions

+ 13 - 0
docs/source/api/faostat_data_primap.helper.paths.rst

@@ -0,0 +1,13 @@
+faostat\_data\_primap.helper.paths
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.helper.paths
+
+.. currentmodule:: faostat_data_primap.helper.paths
+
+
+
+get\_root\_path
+===============
+
+.. autofunction:: get_root_path

+ 16 - 0
docs/source/api/faostat_data_primap.helper.rst

@@ -0,0 +1,16 @@
+faostat\_data\_primap.helper
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.helper
+
+.. currentmodule:: faostat_data_primap.helper
+
+
+.. autosummary::
+  :toctree: ./
+
+  faostat_data_primap.helper.FAO_categorisation_temp
+  faostat_data_primap.helper.category_aggregation
+  faostat_data_primap.helper.country_mapping
+  faostat_data_primap.helper.definitions
+  faostat_data_primap.helper.paths

+ 37 - 0
docs/source/api/faostat_data_primap.read.rst

@@ -0,0 +1,37 @@
+faostat\_data\_primap.read
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. automodule:: faostat_data_primap.read
+
+.. currentmodule:: faostat_data_primap.read
+
+
+
+get\_all\_domains
+=================
+
+.. autofunction:: get_all_domains
+
+
+get\_latest\_release
+====================
+
+.. autofunction:: get_latest_release
+
+
+read\_data
+==========
+
+.. autofunction:: read_data
+
+
+process
+=======
+
+.. autofunction:: process
+
+
+read\_latest\_data
+==================
+
+.. autofunction:: read_latest_data

+ 4 - 0
docs/source/api/faostat_data_primap.rst

@@ -9,4 +9,8 @@ API Reference
 .. autosummary::
   :toctree: ./
 
+  faostat_data_primap.download
+  faostat_data_primap.exceptions
+  faostat_data_primap.helper
   faostat_data_primap.operations
+  faostat_data_primap.read

+ 6 - 6
src/faostat_data_primap/read.py

@@ -9,6 +9,12 @@ import primap2 as pm2  # type: ignore
 import xarray
 import xarray as xr
 
+from faostat_data_primap.helper.category_aggregation import (
+    agg_info_fao,
+    agg_info_ipcc2006_primap_CH4,
+    agg_info_ipcc2006_primap_CO2,
+    agg_info_ipcc2006_primap_N2O,
+)
 from faostat_data_primap.helper.country_mapping import country_to_iso3_mapping
 from faostat_data_primap.helper.definitions import (
     config_to_if,
@@ -20,12 +26,6 @@ from faostat_data_primap.helper.paths import (
     downloaded_data_path,
     extracted_data_path,
 )
-from src.faostat_data_primap.helper.category_aggregation import (
-    agg_info_fao,
-    agg_info_ipcc2006_primap_CH4,
-    agg_info_ipcc2006_primap_CO2,
-    agg_info_ipcc2006_primap_N2O,
-)
 
 
 def get_all_domains(downloaded_data_path: pathlib.Path) -> list[str]: