calpoly-csai / api

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.
https://nimbus.api.calpolycsai.com/
GNU General Public License v3.0
9 stars 4 forks source link

AudioMetadata lives again!!!! #148

Closed Waidhoferj closed 4 years ago

Waidhoferj commented 4 years ago

What's New?

AudioMetadata is dead, long live AudioMetadata! The prodigal son returns from the depths of rebase hell... sort of. The branch was so many commits behind that it was easier to just reimplement the PR. So this is more like AudioMetadata's clone, here to avenge the death of AudioMetadata.

Basically the changes are the same:

How Has This Been Tested?

Postman. I sent partial data packages to ensure that it would reject, and data packages with the wrong values and types. The validator is pretty strict. It does its job well.

snekiam commented 4 years ago

Actually it looks like run_tests was passing on the last merge and they're failing now - I think one of the tests needs to be updated @Waidhoferj

Waidhoferj commented 4 years ago

@Jason-Ku I was able to refactor two of the tests to reflect the use cases for the updated schema. However test_new_data_wakeword_db_error might need to be rewritten or removed. I don't think we use save_audio_sample_meta_data at all anymore, and the validation should be handled by the WakeWordValidator instead of the database wrapper. Lmk what you think.

Jason-Ku commented 4 years ago

@Jason-Ku I was able to refactor two of the tests to reflect the use cases for the updated schema. However test_new_data_wakeword_db_error might need to be rewritten or removed. I don't think we use save_audio_sample_meta_data at all anymore, and the validation should be handled by the WakeWordValidator instead of the database wrapper. Lmk what you think.

That sounds good to me, makes more sense to test the validator itself, so I think removing it is the right call here.