django-daiquiri / daiquiri

A framework for the publication of scientific databases
https://escience.aip.de/daiquiri
Apache License 2.0
26 stars 8 forks source link

fixed the missing ucd issue #128

Closed agy-why closed 1 year ago

agy-why commented 1 year ago

now the existence of the ucd key is checked (not guarantied).

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3827884884


Changes Missing Coverage Covered Lines Changed/Added Lines %
daiquiri/core/generators.py 2 3 66.67%
<!-- Total: 2 3 66.67% -->
Totals Coverage Status
Change from base Build 3822213246: 0.005%
Covered Lines: 4599
Relevant Lines: 6980

💛 - Coveralls
kimakan commented 1 year ago

I see what you mean. Due to the fact that the metadata in the QueryJob model is a JSON field, the presence of the ucd field is not guaranteed. This makes sense since the users are allowed to upload their own tables where the ucd field is not required. Interestingly, the existence of the fields arraysize and datatype is checked before accessing it, unlike the ucd field. I'm closing the PR with this. :-)

agy-why commented 1 year ago

The reason why ucd was not checked, was because we introduced it later, while implementing the datalink protocol. And forgot that there is no guaranty that ucd is there. So it was really a BUG.