SciCatProject / pyscicat

A python client library for interacting with the SciCat data catalog backend.
Other
0 stars 9 forks source link

Add more model fields #25

Closed jl-wynen closed 2 years ago

jl-wynen commented 2 years ago

Fixes #16 and adds some more dataset and file related fields. Tested it with https://staging.scicat.ess.eu

DerivedDataset.investigator was marked as optional. According to the LoopBack API explorer, it is mandatory. But POST Datasets let me upload it without complaint. But the web interface was then unable to display the dataset. Not sure where the fault lies, but by making it required in pyscicat, we can prevent users from ever encountering this situation.

nitrosx commented 2 years ago

@dylanmcreynolds I implemented the changes that we discussed above. We should be ready to merge. Let me know if you would like me to do it.

One question: PublishedData model does not depend from any other model, but the last for fields are similar to the fields provided by MongoQueryable, minus Optional. Should we remove the fields createBy, updatedBy, createAt, updatedAt and inherit from MongoQueryable?

jl-wynen commented 2 years ago

Thanks Max!

dylanmcreynolds commented 2 years ago

Should we remove the fields createBy, updatedBy, createAt, updatedAt and inherit from MongoQueryable?

I vote for leaving as is for now (and leaving it as the current backend) and re-addressing that question when we align with the new backend.