microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
7 stars 3 forks source link

fix: check for LinkML base type "Decimal" on loading changesheet #752

Closed dwinston closed 3 weeks ago

dwinston commented 3 weeks ago

Description

Because "Decimal" is not a Python builtins type, and because (py)mongo does not natively json-encode decimal values, and furthermore because existing behavior assumes decimal values will be supplied as floats (as JSON does not support decimals), added case to coerce decimal-typed values to float, and left inline comment explaining decision and options for decimal support in future.

Fixes #613

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration, if it is not simply make up-test && make test-run.

Configuration Details: none

Definition of Done (DoD) Checklist: