Browse Source

[DATALAD] Recorded changes

Daniel Busch 3 months ago
parent
commit
65f0c96ff8

+ 37 - 37
src/faostat_data_primap/helper/FAO_categorisation_temp.py

@@ -1,4 +1,4 @@
-"""Do not edit this file"""
+"""Temp"""
 spec = {
     "name": "FAO",
     "title": "Food and Agriculture Organization of the United Nations (FAO) FAOSTAT data set categorisation",
@@ -420,18 +420,18 @@ spec = {
         "3.A.4": {
             "title": "Asses enteric fermentation",
             "comment": "Asses enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.A": {
             "title": "Asses",
             "comment": "Asses",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.A.1", "3.A.2", "3.A.3", "3.A.4"]],
         },
         "3.A.1": {
             "title": "Asses manure management",
             "comment": "Asses manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.A.1.a", "3.A.1.b", "3.A.1.c"]],
         },
         "3.A.1.a": {
@@ -506,18 +506,18 @@ spec = {
         "3.B.4": {
             "title": "Camels enteric fermentation",
             "comment": "Camels enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.B": {
             "title": "Camels",
             "comment": "Camels",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.B.1", "3.B.2", "3.B.3", "3.B.4"]],
         },
         "3.B.1": {
             "title": "Camels manure management",
             "comment": "Camels manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.B.1.a", "3.B.1.b", "3.B.1.c"]],
         },
         "3.B.1.a": {
@@ -592,18 +592,18 @@ spec = {
         "3.C.4": {
             "title": "Cattle, dairy enteric fermentation",
             "comment": "Cattle, dairy enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.C": {
             "title": "Cattle, dairy",
             "comment": "Cattle, dairy",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.C.1", "3.C.2", "3.C.3", "3.C.4"]],
         },
         "3.C.1": {
             "title": "Cattle, dairy manure management",
             "comment": "Cattle, dairy manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.C.1.a", "3.C.1.b", "3.C.1.c"]],
         },
         "3.C.1.a": {
@@ -678,18 +678,18 @@ spec = {
         "3.D.4": {
             "title": "Cattle, non-dairy enteric fermentation",
             "comment": "Cattle, non-dairy enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.D": {
             "title": "Cattle, non-dairy",
             "comment": "Cattle, non-dairy",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.D.1", "3.D.2", "3.D.3", "3.D.4"]],
         },
         "3.D.1": {
             "title": "Cattle, non-dairy manure management",
             "comment": "Cattle, non-dairy manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.D.1.a", "3.D.1.b", "3.D.1.c"]],
         },
         "3.D.1.a": {
@@ -926,18 +926,18 @@ spec = {
         "3.G.4": {
             "title": "Goats enteric fermentation",
             "comment": "Goats enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.G": {
             "title": "Goats",
             "comment": "Goats",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.G.1", "3.G.2", "3.G.3", "3.G.4"]],
         },
         "3.G.1": {
             "title": "Goats manure management",
             "comment": "Goats manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.G.1.a", "3.G.1.b", "3.G.1.c"]],
         },
         "3.G.1.a": {
@@ -1012,18 +1012,18 @@ spec = {
         "3.H.4": {
             "title": "Horses enteric fermentation",
             "comment": "Horses enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.H": {
             "title": "Horses",
             "comment": "Horses",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.H.1", "3.H.2", "3.H.3", "3.H.4"]],
         },
         "3.H.1": {
             "title": "Horses manure management",
             "comment": "Horses manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.H.1.a", "3.H.1.b", "3.H.1.c"]],
         },
         "3.H.1.a": {
@@ -1098,18 +1098,18 @@ spec = {
         "3.I.4": {
             "title": "Mules and hinnies enteric fermentation",
             "comment": "Mules and hinnies enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.I": {
             "title": "Mules and hinnies",
             "comment": "Mules and hinnies",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.I.1", "3.I.2", "3.I.3", "3.I.4"]],
         },
         "3.I.1": {
             "title": "Mules and hinnies manure management",
             "comment": "Mules and hinnies manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.I.1.a", "3.I.1.b", "3.I.1.c"]],
         },
         "3.I.1.a": {
@@ -1184,18 +1184,18 @@ spec = {
         "3.J.4": {
             "title": "Sheep enteric fermentation",
             "comment": "Sheep enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.J": {
             "title": "Sheep",
             "comment": "Sheep",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.J.1", "3.J.2", "3.J.3", "3.J.4"]],
         },
         "3.J.1": {
             "title": "Sheep manure management",
             "comment": "Sheep manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.J.1.a", "3.J.1.b", "3.J.1.c"]],
         },
         "3.J.1.a": {
@@ -1270,18 +1270,18 @@ spec = {
         "3.K.4": {
             "title": "Llamas enteric fermentation",
             "comment": "Llamas enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.K": {
             "title": "Llamas",
             "comment": "Llamas",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.K.1", "3.K.2", "3.K.3", "3.K.4"]],
         },
         "3.K.1": {
             "title": "Llamas manure management",
             "comment": "Llamas manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.K.1.a", "3.K.1.b", "3.K.1.c"]],
         },
         "3.K.1.a": {
@@ -1518,18 +1518,18 @@ spec = {
         "3.N.4": {
             "title": "Buffalo enteric fermentation",
             "comment": "Buffalo enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.N": {
             "title": "Buffalo",
             "comment": "Buffalo",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.N.1", "3.N.2", "3.N.3", "3.N.4"]],
         },
         "3.N.1": {
             "title": "Buffalo manure management",
             "comment": "Buffalo manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.N.1.a", "3.N.1.b", "3.N.1.c"]],
         },
         "3.N.1.a": {
@@ -1685,18 +1685,18 @@ spec = {
         "3.P.4": {
             "title": "Swine, breeding enteric fermentation",
             "comment": "Swine, breeding enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.P": {
             "title": "Swine, breeding",
             "comment": "Swine, breeding",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.P.1", "3.P.2", "3.P.3", "3.P.4"]],
         },
         "3.P.1": {
             "title": "Swine, breeding manure management",
             "comment": "Swine, breeding manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.P.1.a", "3.P.1.b", "3.P.1.c"]],
         },
         "3.P.1.a": {
@@ -1771,18 +1771,18 @@ spec = {
         "3.Q.4": {
             "title": "Swine, market enteric fermentation",
             "comment": "Swine, market enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.Q": {
             "title": "Swine, market",
             "comment": "Swine, market",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.Q.1", "3.Q.2", "3.Q.3", "3.Q.4"]],
         },
         "3.Q.1": {
             "title": "Swine, market manure management",
             "comment": "Swine, market manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.Q.1.a", "3.Q.1.b", "3.Q.1.c"]],
         },
         "3.Q.1.a": {

+ 4 - 2
src/faostat_data_primap/read.py

@@ -199,10 +199,12 @@ def read_data(  # noqa: PLR0915 PLR0912
     df_all = pd.concat(df_list, axis=0, join="outer", ignore_index=True)
 
     # some domains don't have Source column or values are empty
+    # we assume these values come from FAO
+    # TODO Better not to hard-code this in case the label changes
     if "Source" not in df_all.columns:
-        df_all["Source"] = "unknown"
+        df_all["Source"] = "FAO TIER 1"
     else:
-        df_all["Source"] = df_all["Source"].fillna("unknown")
+        df_all["Source"] = df_all["Source"].fillna("FAO TIER 1")
 
     # Remove the "Y" prefix for the years columns
     df_all = df_all.rename(columns=lambda x: x.lstrip("Y") if x.startswith("Y") else x)

+ 36 - 36
tests/unit/FAO.py

@@ -421,18 +421,18 @@ spec = {
         "3.A.4": {
             "title": "Asses enteric fermentation",
             "comment": "Asses enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.A": {
             "title": "Asses",
             "comment": "Asses",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.A.1", "3.A.2", "3.A.3", "3.A.4"]],
         },
         "3.A.1": {
             "title": "Asses manure management",
             "comment": "Asses manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.A.1.a", "3.A.1.b", "3.A.1.c"]],
         },
         "3.A.1.a": {
@@ -507,18 +507,18 @@ spec = {
         "3.B.4": {
             "title": "Camels enteric fermentation",
             "comment": "Camels enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.B": {
             "title": "Camels",
             "comment": "Camels",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.B.1", "3.B.2", "3.B.3", "3.B.4"]],
         },
         "3.B.1": {
             "title": "Camels manure management",
             "comment": "Camels manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.B.1.a", "3.B.1.b", "3.B.1.c"]],
         },
         "3.B.1.a": {
@@ -593,18 +593,18 @@ spec = {
         "3.C.4": {
             "title": "Cattle, dairy enteric fermentation",
             "comment": "Cattle, dairy enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.C": {
             "title": "Cattle, dairy",
             "comment": "Cattle, dairy",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.C.1", "3.C.2", "3.C.3", "3.C.4"]],
         },
         "3.C.1": {
             "title": "Cattle, dairy manure management",
             "comment": "Cattle, dairy manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.C.1.a", "3.C.1.b", "3.C.1.c"]],
         },
         "3.C.1.a": {
@@ -679,18 +679,18 @@ spec = {
         "3.D.4": {
             "title": "Cattle, non-dairy enteric fermentation",
             "comment": "Cattle, non-dairy enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.D": {
             "title": "Cattle, non-dairy",
             "comment": "Cattle, non-dairy",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.D.1", "3.D.2", "3.D.3", "3.D.4"]],
         },
         "3.D.1": {
             "title": "Cattle, non-dairy manure management",
             "comment": "Cattle, non-dairy manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.D.1.a", "3.D.1.b", "3.D.1.c"]],
         },
         "3.D.1.a": {
@@ -927,18 +927,18 @@ spec = {
         "3.G.4": {
             "title": "Goats enteric fermentation",
             "comment": "Goats enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.G": {
             "title": "Goats",
             "comment": "Goats",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.G.1", "3.G.2", "3.G.3", "3.G.4"]],
         },
         "3.G.1": {
             "title": "Goats manure management",
             "comment": "Goats manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.G.1.a", "3.G.1.b", "3.G.1.c"]],
         },
         "3.G.1.a": {
@@ -1013,18 +1013,18 @@ spec = {
         "3.H.4": {
             "title": "Horses enteric fermentation",
             "comment": "Horses enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.H": {
             "title": "Horses",
             "comment": "Horses",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.H.1", "3.H.2", "3.H.3", "3.H.4"]],
         },
         "3.H.1": {
             "title": "Horses manure management",
             "comment": "Horses manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.H.1.a", "3.H.1.b", "3.H.1.c"]],
         },
         "3.H.1.a": {
@@ -1099,18 +1099,18 @@ spec = {
         "3.I.4": {
             "title": "Mules and hinnies enteric fermentation",
             "comment": "Mules and hinnies enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.I": {
             "title": "Mules and hinnies",
             "comment": "Mules and hinnies",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.I.1", "3.I.2", "3.I.3", "3.I.4"]],
         },
         "3.I.1": {
             "title": "Mules and hinnies manure management",
             "comment": "Mules and hinnies manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.I.1.a", "3.I.1.b", "3.I.1.c"]],
         },
         "3.I.1.a": {
@@ -1185,18 +1185,18 @@ spec = {
         "3.J.4": {
             "title": "Sheep enteric fermentation",
             "comment": "Sheep enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.J": {
             "title": "Sheep",
             "comment": "Sheep",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.J.1", "3.J.2", "3.J.3", "3.J.4"]],
         },
         "3.J.1": {
             "title": "Sheep manure management",
             "comment": "Sheep manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.J.1.a", "3.J.1.b", "3.J.1.c"]],
         },
         "3.J.1.a": {
@@ -1271,18 +1271,18 @@ spec = {
         "3.K.4": {
             "title": "Llamas enteric fermentation",
             "comment": "Llamas enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.K": {
             "title": "Llamas",
             "comment": "Llamas",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.K.1", "3.K.2", "3.K.3", "3.K.4"]],
         },
         "3.K.1": {
             "title": "Llamas manure management",
             "comment": "Llamas manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.K.1.a", "3.K.1.b", "3.K.1.c"]],
         },
         "3.K.1.a": {
@@ -1519,18 +1519,18 @@ spec = {
         "3.N.4": {
             "title": "Buffalo enteric fermentation",
             "comment": "Buffalo enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.N": {
             "title": "Buffalo",
             "comment": "Buffalo",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.N.1", "3.N.2", "3.N.3", "3.N.4"]],
         },
         "3.N.1": {
             "title": "Buffalo manure management",
             "comment": "Buffalo manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.N.1.a", "3.N.1.b", "3.N.1.c"]],
         },
         "3.N.1.a": {
@@ -1686,18 +1686,18 @@ spec = {
         "3.P.4": {
             "title": "Swine, breeding enteric fermentation",
             "comment": "Swine, breeding enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.P": {
             "title": "Swine, breeding",
             "comment": "Swine, breeding",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.P.1", "3.P.2", "3.P.3", "3.P.4"]],
         },
         "3.P.1": {
             "title": "Swine, breeding manure management",
             "comment": "Swine, breeding manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.P.1.a", "3.P.1.b", "3.P.1.c"]],
         },
         "3.P.1.a": {
@@ -1772,18 +1772,18 @@ spec = {
         "3.Q.4": {
             "title": "Swine, market enteric fermentation",
             "comment": "Swine, market enteric fermentation",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
         },
         "3.Q": {
             "title": "Swine, market",
             "comment": "Swine, market",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.Q.1", "3.Q.2", "3.Q.3", "3.Q.4"]],
         },
         "3.Q.1": {
             "title": "Swine, market manure management",
             "comment": "Swine, market manure management",
-            "info": {"gases": ["CH4", "N2O"]},
+            "info": {"gases": ["CH4"]},
             "children": [["3.Q.1.a", "3.Q.1.b", "3.Q.1.c"]],
         },
         "3.Q.1.a": {

+ 1 - 13
tests/unit/FAO.yaml

@@ -1,4 +1,4 @@
-name: FAO
+name: FAOSTAT
 title: Food and Agriculture Organization of the United Nations (FAO) FAOSTAT data
   set categorisation
 comment: Needed to add FAOSTAT data to PRIMAP-hist
@@ -556,7 +556,6 @@ categories:
     info:
       gases: &id001
       - CH4
-      - N2O
   3.A:
     title: Asses
     comment: Asses
@@ -659,7 +658,6 @@ categories:
     info:
       gases: &id002
       - CH4
-      - N2O
   3.B:
     title: Camels
     comment: Camels
@@ -762,7 +760,6 @@ categories:
     info:
       gases: &id003
       - CH4
-      - N2O
   3.C:
     title: Cattle, dairy
     comment: Cattle, dairy
@@ -865,7 +862,6 @@ categories:
     info:
       gases: &id004
       - CH4
-      - N2O
   3.D:
     title: Cattle, non-dairy
     comment: Cattle, non-dairy
@@ -1170,7 +1166,6 @@ categories:
     info:
       gases: &id007
       - CH4
-      - N2O
   3.G:
     title: Goats
     comment: Goats
@@ -1273,7 +1268,6 @@ categories:
     info:
       gases: &id008
       - CH4
-      - N2O
   3.H:
     title: Horses
     comment: Horses
@@ -1376,7 +1370,6 @@ categories:
     info:
       gases: &id009
       - CH4
-      - N2O
   3.I:
     title: Mules and hinnies
     comment: Mules and hinnies
@@ -1483,7 +1476,6 @@ categories:
     info:
       gases: &id010
       - CH4
-      - N2O
   3.J:
     title: Sheep
     comment: Sheep
@@ -1586,7 +1578,6 @@ categories:
     info:
       gases: &id011
       - CH4
-      - N2O
   3.K:
     title: Llamas
     comment: Llamas
@@ -1881,7 +1872,6 @@ categories:
     info:
       gases: &id014
       - CH4
-      - N2O
   3.N:
     title: Buffalo
     comment: Buffalo
@@ -2080,7 +2070,6 @@ categories:
     info:
       gases: &id016
       - CH4
-      - N2O
   3.P:
     title: Swine, breeding
     comment: Swine, breeding
@@ -2185,7 +2174,6 @@ categories:
     info:
       gases: &id017
       - CH4
-      - N2O
   3.Q:
     title: Swine, market
     comment: Swine, market

+ 8 - 8
tests/unit/test_conversion.py

@@ -73,12 +73,12 @@ def test_conversion_from_FAO_to_IPCC2006_PRIMAP():
 
 def test_read(tmp_path):
     domains_and_releases_to_read = [
-        # ("farm_gate_agriculture_energy", "2024-11-14"),
-        # ("farm_gate_emissions_crops", "2024-11-14"),
-        # ("farm_gate_livestock", "2024-11-14"),
-        # ("land_use_drained_organic_soils", "2024-11-14"),
-        # ("land_use_fires", "2024-11-14"),
-        # ("land_use_forests", "2024-11-14"),
+        ("farm_gate_agriculture_energy", "2024-11-14"),
+        ("farm_gate_emissions_crops", "2024-11-14"),
+        ("farm_gate_livestock", "2024-11-14"),
+        ("land_use_drained_organic_soils", "2024-11-14"),
+        ("land_use_fires", "2024-11-14"),
+        ("land_use_forests", "2024-11-14"),
         ("pre_post_agricultural_production", "2024-11-14"),
     ]
 
@@ -103,7 +103,7 @@ def test_python_to_yaml():
 
 def test_make_dict_comprehension_for_faster_typing():  # noqa: PLR0912 PLR0915
     spec = {
-        "name": "FAO",
+        "name": "FAOSTAT",
         "title": (
             "Food and Agriculture Organization of the United Nations (FAO) "
             "FAOSTAT data set categorisation"
@@ -365,7 +365,7 @@ def test_make_dict_comprehension_for_faster_typing():  # noqa: PLR0912 PLR0915
 
     for animal, code in zip(animals, codes_animals):
         if animal in enteric_fermentation:
-            gases = ["CH4", "N2O"]
+            gases = ["CH4"]
             animal_children = [f"{code}.{i}" for i in "1234"]
             categories[f"{code}.4"] = {
                 "title": f"{animal} enteric fermentation",