vivarium-collective / vivarium-core

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

Recursively compare schemas during validation #234

Closed thalassemia closed 1 year ago

thalassemia commented 1 year ago

This PR properly closes #228 by allowing Numpy arrays to be buried deep within ports schemas (example for _divider). Additionally, this fixes a bug I introduced in #233 which caused things like 0 and np.zeros(10) to be considered equivalent in ports schemas when they should not be.

To ensure that everything works as intended, I added test_numpy_schema_validation to engine.py.


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.