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
{{ message }}
This repository was archived by the owner on Jan 4, 2024. It is now read-only.
As a pathways developer-user
I want my custom unit definitions to be part of my database
so that when I want to share my model, I just need to move one database dump around, rather than having to remember to send my custom unit definition file separately.
AC
Move unit definitions into a new table / SQLAlchemy model (probably just a two-column table with unit name and definition, though it looks like pint also allows for unit aliases so we may want a third column for that). Enforce uniqueness and not-null constraints where possible.
Remove unit_defs.txt
Update readme.md as necessary to remove references to unit_defs.txt
Notes
This work should be done on the data_access branch so the SQLAlchemy infrastructure is available.
We are currently loading unit definitions using pint's UnitRegistry.load_definitions(), which expects a text file. However, it looks like we could easily loop through a database table and create the units one at a time instead.
As a pathways developer-user
I want my custom unit definitions to be part of my database
so that when I want to share my model, I just need to move one database dump around, rather than having to remember to send my custom unit definition file separately.
AC
Notes
This work should be done on the data_access branch so the SQLAlchemy infrastructure is available.
We are currently loading unit definitions using pint's UnitRegistry.load_definitions(), which expects a text file. However, it looks like we could easily loop through a database table and create the units one at a time instead.