Battery-Intelligence-Lab / galv

An open-source platform for automated storage of battery data with advanced metadata support
https://battery-intelligence-lab.github.io/galv/
Other
33 stars 8 forks source link

Incomplete Cell description breaks API import of data #26

Open adamL-D opened 2 years ago

adamL-D commented 2 years ago

Describe the bug If you don't fill in all the descriptors for cell metadata when you make a new one, e.g. anode chemistry, the API will error when trying to import cycling data with that cell metadata attached

To Reproduce Steps to reproduce the behavior:

  1. create a new cell metadata
  2. leave some of the options blank
  3. attach metadata to a cycler test
  4. import that cycler data using the python API
  5. API fails

Expected behavior python will error when you run the import code

martinjrobins commented 2 years ago

Thanks @adamL-D, I'll have a look at this and get back to you

martinjrobins commented 2 years ago

problem is that the openAPI spec does not have nullable: true for these fields, whereas the galvanalyser backend will send them as null in the json. I'll update the spec so these fields are nullable

martinjrobins commented 2 years ago

version 1.0.2 of batteryclient now fixes this issue. Can you try @adamL-D?

adamL-D commented 2 years ago

Yes, I will install it to the lab and test tommorow

adamL-D commented 1 year ago

image

I get the same error with 1.0.2

martinjrobins commented 1 year ago

@adamL-D do you mind checking this again?