EnzymeML / PyEnzyme

🧬 - Data management and modeling framework based on EnzymeML.
BSD 2-Clause "Simplified" License
21 stars 9 forks source link

Correct structure in the REST API measurement-documentation #41

Closed StephanM87 closed 2 years ago

StephanM87 commented 2 years ago

I found this in the description of the REST-API documentation: https://enzymeml.sloppy.zone/redoc#operation/create_EnzymeML_create_post

Is it correct that there are two unnamed dicts concentrated in a row in the measurements--> species dict?

grafik

JR-1991 commented 2 years ago

Thanks for submitting! As denoted in the species_dict description, it is in fact a dictionary that holds at most two keys, which are proteins and/or reactants. Each of these then hold MeasurementData that corresponds to replicates and initial concentration. Splitting both reactants and proteins is done to support different high-level features that operate on measurements, but are planned to be substituted with a better solution.

In addition, since the REST-API documentation is based of the PyDantic model, this directly translates to the documentation and might seem confusing at first. We might have to think about a better documentation on this matter. What would you think would suit your needs best?

StephanM87 commented 2 years ago

Hey Thanks for answering! Ah now I get it! 🥳 ok that's pretty clever! What confused me was the two property name elements. But now it makes sense! In my opinion, it would be very nice to see a example json :) I think an example in combination with your documentation would be a good combination.

JR-1991 commented 2 years ago

Thats a great idea! Where would you want to access the example? I think the general documentation would be a good primer.

StephanM87 commented 2 years ago

absolutely! I would search it on the readme page on the entry for the REST-API: In my opinion, it would be nice to have a link to a json available there grafik

JR-1991 commented 2 years ago

Has been fixed by adding the example directly to the REST-API documentation. In addition, the unit-part is now also removed, since it is not used. as a consequence the unit_dict is now private so that FastAPI won't include it in the OpenAPI schema. This is linked to issue #26