AlexsLemonade / refinebio

Refine.bio harmonizes petabytes of publicly available biological data into ready-to-use datasets for cancer researchers and AI/ML scientists.
https://www.refine.bio/
Other
129 stars 19 forks source link

Experiment.protocol_description is a JSONField #3296

Open davidsmejia opened 1 year ago

davidsmejia commented 1 year ago

Context

I was digging through the experiment model while updating the SRA parser and was curious about default values when I noticed that the Experiment.protocol_description is a JSONField column in the database which has an empty dict as the default value.

Problem or idea

Depending on the results from looking further into how this is used, we should either update the column type to match the content (TextField) or store all protocol_descriptions as JSON values, whichever is more appropriate. We are most likely incurring a minor performance penalty. Either way having strings in a JSONField could lead to errors down the line.

Solution or next step