vivarium-collective / vivarium-core

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

Add tests for MongoDB and fix bugs #237

Closed thalassemia closed 9 months ago

thalassemia commented 10 months ago

Adding MongoDB to the test environment proved very straightforward thanks to service containers. I repurposed an existing script to test large emits, query capabilities, and manual insertion of documents. Along the way, I fixed three issues:

According to pytest, coverage of emitter.py went from 44% to 90% with this PR. Most of the remaining untested code is in the MongoDB Atlas functions.


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.

thalassemia commented 10 months ago

The image is hosted on Docker Hub: https://hub.docker.com/_/mongo. In this PR, I pinned the 6.0.13 version of the image for no particular reason. We could set the tag to latest to automatically pull the newest image.