Skip to content

Commit

Permalink
fixed #493
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Sep 10, 2024
1 parent 0f28c65 commit 03de2d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion peppy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.40.5"
__version__ = "0.40.6"
6 changes: 4 additions & 2 deletions peppy/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_Project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 03de2d6

Please sign in to comment.