vivarium-collective / vivarium-core

Core Interface and Engine for Vivarium
https://vivarium-core.readthedocs.io/
Apache License 2.0
25 stars 2 forks source link

Add data key to breakdown documents if missing #236

Closed thalassemia closed 9 months ago

thalassemia commented 9 months ago

When retrieving data from MongoDB, the assemble_data function expects each document to have a data key. When a document is too large, the breakdown_data method splits the large nested dictionary into smaller sub-dictionaries, some of which may not have a data key after the split. This PR ensures that all documents have a data key, not just those that also have a corresponding time key. This fixes an issue where a very large configuration document (no time key) is broken down into sub-dictionaries, one of which lacks the data key and breaks assemble_data.


By creating this pull request, I agree to the Contributor License Agreement, which is available in CLA.md at the top level of this repository.

eagmon commented 9 months ago

@thalassemia do you need a new release?

thalassemia commented 9 months ago

Yeah a new release would be great! As an aside, I want to try creating GitHub Actions tests for the MongoDB functionality. I'll do some testing and hopefully have a PR up in the next week or so.

eagmon commented 9 months ago

Great idea to test mongoDB functionality. I'll merge and release this now, v1.6.2