diff --git a/peppy/_version.py b/peppy/_version.py index d6d6823d..6e2b9eaa 100644 --- a/peppy/_version.py +++ b/peppy/_version.py @@ -1 +1 @@ -__version__ = "0.40.5" +__version__ = "0.40.6" diff --git a/peppy/project.py b/peppy/project.py index 9f46cccc..b7b58e0b 100644 --- a/peppy/project.py +++ b/peppy/project.py @@ -345,8 +345,10 @@ def to_dict( SUBSAMPLE_RAW_LIST_KEY: sub_df, } else: - p_dict = self.config.copy() - p_dict["_samples"] = [s.to_dict() for s in self.samples] + p_dict = { + "project": self.config.copy(), + "samples": [s.to_dict() for s in self.samples], + } return p_dict diff --git a/tests/test_Project.py b/tests/test_Project.py index 7f7a9bb9..6d573f2b 100644 --- a/tests/test_Project.py +++ b/tests/test_Project.py @@ -375,7 +375,7 @@ def test_to_dict_does_not_create_nans(self, example_pep_nextflow_csv_path): p1 = Project( cfg=example_pep_nextflow_csv_path, sample_table_index="sample" ).to_dict() - for sample in p1.get("_samples"): + for sample in p1.get("samples"): for attribute, value in sample.items(): assert value not in wrong_values