AllenNeuralDynamics / dynamic-foraging-task

Bonsai/Harp workflow for Dynamic Foraging with Python GUI for visualization and control
MIT License
5 stars 4 forks source link

Handle IO errors when checking existing rig.json #507

Closed alexpiet closed 3 months ago

alexpiet commented 3 months ago

Pull Request instructions:

Describe changes:

Previously, when creating a rig metadata, we wrote the new metadata to file, then loaded it back. We then compared this with the existing rig metadata which was loaded to file. We did this to ensure serialization/deserialization happened consistently with the old and new. This created I/O errors when the new file didn't finish writing by the time it was loaded back. So now I just serialize/deserialize in python without writing to disk.

What issues or discussions does this update address?

Describe the expected change in behavior from the perspective of the experimenter

Should limit uncaught errors about JSON decoding

Describe any manual update steps for task computers

Was this update tested in 446/447?

alexpiet commented 3 months ago

@hanhou @XX-Yin this is ready for review