Преглед изворни кода

fix for AnnexI submissions and import fix in UNFCCC_reader

Johannes Gütschow пре 9 месеци
родитељ
комит
094aa66e6c

+ 5 - 1
src/unfccc_ghg_data/unfccc_downloader/unfccc_submission_info.py

@@ -121,7 +121,11 @@ def get_unfccc_submission_info(  # noqa: PLR0912, PLR0915
                             kind = "NID"
                         elif ("NIR" in doctype) or ("NIR" in title):
                             kind = "NIR"
-                        elif ("BRT" in doctype) or ("BTR" in title):
+                        elif ("SEF" in doctype) or ("SEF" in title):
+                            kind = "SEF"
+                        elif ("CRF" in doctype) or ("CRF" in title):
+                            kind = "CRF"
+                        elif ("BTR" in doctype) or ("BTR" in title):
                             kind = "BTR"
                         else:
                             kind = "other"

+ 6 - 7
src/unfccc_ghg_data/unfccc_reader/Taiwan/read_TWN_2022_Inventory_from_pdf.py

@@ -12,6 +12,12 @@ import copy
 import camelot
 import pandas as pd
 import primap2 as pm2
+from config_twn_nir2022 import (
+    fix_rows,
+    gwp_to_use,
+    page_defs,
+    table_defs,
+)
 from primap2.pm2io._data_reading import matches_time_format
 
 from unfccc_ghg_data.helper import (
@@ -20,13 +26,6 @@ from unfccc_ghg_data.helper import (
     make_wide_table,
 )
 
-from .config_twn_nir2022 import (
-    fix_rows,
-    gwp_to_use,
-    page_defs,
-    table_defs,
-)
-
 if __name__ == "__main__":
     # ###
     # configuration