You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer I want to use native types as much as possible, so that I don't need to do unnecessary string munging.
This includes comparing parse_datetime(entity.created_date) with something like "lookback period" or "days ago", but also the strings of SourceMeasurement total and value.
Pydantic should handle conversion to json, with stringy values if needed. Note that we currently already do some comprehension; i.e. when there's a datetime string returned in an entity, but EntryAttribute type is DATE.
To discuss: convert to string in collector (which means the db doesn't change), or in api (so native types can be used in all python code)?
Tasks
Components
Shared code
Review the data model for entities
API-server
TBD - should the json be generated here, or by the collector (before storing in db)?
Collector
Change collector so that all entity attributes are native in code instead of casting to string
The text was updated successfully, but these errors were encountered:
wkoot
added
Tech
Technical change without significant user impact
python
Pull requests that update Python code
labels
Dec 15, 2023
User story
As a developer I want to use native types as much as possible, so that I don't need to do unnecessary string munging.
This includes comparing
parse_datetime(entity.created_date)
with something like "lookback period" or "days ago", but also the strings of SourceMeasurement total and value.Pydantic should handle conversion to json, with stringy values if needed. Note that we currently already do some comprehension; i.e. when there's a datetime string returned in an entity, but EntryAttribute type is DATE.
To discuss: convert to string in collector (which means the db doesn't change), or in api (so native types can be used in all python code)?
Tasks
Components
Shared code
API-server
Collector
collector
so that all entity attributes are native in code instead of casting to stringThe text was updated successfully, but these errors were encountered: