From e4c6f52e056463d4c5a8c077076cebd5028cf3dc Mon Sep 17 00:00:00 2001
From: Raoul Schram <r.d.schram@uu.nl>
Date: Tue, 27 Feb 2024 15:09:09 +0100
Subject: [PATCH 1/4] Remove the general table from the toml

---
 metasyn/config.py              | 12 ++++++------
 tests/data/example_config.toml |  2 --
 tests/data/no_data_config.toml |  2 --
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/metasyn/config.py b/metasyn/config.py
index aff515e4..cb2c7a08 100644
--- a/metasyn/config.py
+++ b/metasyn/config.py
@@ -80,14 +80,14 @@ def from_toml(cls, config_fp: Union[str, Path]) -> MetaConfig:
         """
         with open(config_fp, "rb") as handle:
             config_dict = tomllib.load(handle)
-        general = config_dict.get("general", {})
+        # general = config_dict.get("general", {})
         var_list = config_dict.pop("var", [])
-        n_rows = general.pop("n_rows", None)
-        dist_providers = general.pop("dist_providers", ["builtin"])
-        privacy = general.pop("privacy", {"name": "none", "parameters": {}})
-        if len(general) > 0:
+        n_rows = config_dict.pop("n_rows", None)
+        dist_providers = config_dict.pop("dist_providers", ["builtin"])
+        privacy = config_dict.pop("privacy", {"name": "none", "parameters": {}})
+        if len(config_dict) > 0:
             raise ValueError(f"Error parsing configuration file '{config_fp}'."
-                             f" Unknown keys detected: '{list(general)}'")
+                             f" Unknown keys detected: '{list(config_dict)}'")
         return cls(var_list, dist_providers, privacy, n_rows=n_rows)
 
     def to_dict(self) -> dict:
diff --git a/tests/data/example_config.toml b/tests/data/example_config.toml
index dab20a81..3dd07deb 100644
--- a/tests/data/example_config.toml
+++ b/tests/data/example_config.toml
@@ -1,6 +1,4 @@
 # Example toml file as input for metasyn
-
-[general]
 dist_providers = ["builtin"]
 
 
diff --git a/tests/data/no_data_config.toml b/tests/data/no_data_config.toml
index d86c8263..51219d01 100644
--- a/tests/data/no_data_config.toml
+++ b/tests/data/no_data_config.toml
@@ -1,6 +1,4 @@
 # Example toml file as input for metasyn
-
-[general]
 n_rows = 100
 
 

From c75ed38f6f6d60beab8726425ac14859b673557c Mon Sep 17 00:00:00 2001
From: Raoul Schram <r.d.schram@uu.nl>
Date: Tue, 27 Feb 2024 15:10:39 +0100
Subject: [PATCH 2/4] Update documentation

---
 docs/source/usage/cli.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/docs/source/usage/cli.rst b/docs/source/usage/cli.rst
index 5d91b38c..6d882923 100644
--- a/docs/source/usage/cli.rst
+++ b/docs/source/usage/cli.rst
@@ -147,7 +147,6 @@ column is ``data_free``. It is also required to set the number of rows under the
 
    .. code-block:: toml
 
-      [general]
       n_rows = 100
 
 

From 0f88bed0b0412c84cb39d3af1422f0f865f01531 Mon Sep 17 00:00:00 2001
From: Raoul Schram <r.d.schram@uu.nl>
Date: Tue, 27 Feb 2024 15:11:14 +0100
Subject: [PATCH 3/4] Fix example config

---
 examples/example_config.toml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/examples/example_config.toml b/examples/example_config.toml
index be9c4c7d..7e3d6fdb 100644
--- a/examples/example_config.toml
+++ b/examples/example_config.toml
@@ -1,9 +1,8 @@
 # Example toml file as input for metasyn
 
-[general]
 dist_providers = ["builtin", "metasyn-disclosure"]
 
-[general.privacy]
+[privacy]
 name = "disclosure"
 parameters = {n_avg = 11}
 

From abccebc88129fea974d27dc0b70a92002a56a756 Mon Sep 17 00:00:00 2001
From: qubixes <44498096+qubixes@users.noreply.github.com>
Date: Wed, 28 Feb 2024 10:59:06 +0100
Subject: [PATCH 4/4] Update metasyn/config.py

---
 metasyn/config.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/metasyn/config.py b/metasyn/config.py
index cb2c7a08..30363dd1 100644
--- a/metasyn/config.py
+++ b/metasyn/config.py
@@ -80,7 +80,6 @@ def from_toml(cls, config_fp: Union[str, Path]) -> MetaConfig:
         """
         with open(config_fp, "rb") as handle:
             config_dict = tomllib.load(handle)
-        # general = config_dict.get("general", {})
         var_list = config_dict.pop("var", [])
         n_rows = config_dict.pop("n_rows", None)
         dist_providers = config_dict.pop("dist_providers", ["builtin"])