Skip to content

[WIP] Introduce context-first configuration and register Unitsdb model classes#25

Draft
suleman-uzair wants to merge 4 commits intomainfrom
feat/context-register-models
Draft

[WIP] Introduce context-first configuration and register Unitsdb model classes#25
suleman-uzair wants to merge 4 commits intomainfrom
feat/context-register-models

Conversation

@suleman-uzair
Copy link
Copy Markdown
Member

Summary

This change introduces a context-first Unitsdb::Configuration flow and wires model registration through Configuration.register_model.

What changed

  • Added Unitsdb::Configuration with:
    • register_model
    • context / populate_context
    • register / populate_register
    • substitution resolution for symbol/class substitution input
  • Updated Unitsdb.database to be context-aware and cache by context ID.
  • Updated Unitsdb::Database.from_db to:
    • accept context:
    • load within GlobalContext.with_context(context_id)
    • pass register: only when an explicit register exists
  • Added Configuration.register_model(...) entries across Unitsdb model files, including:
    • core serializable models
    • identifier/reference/root-derived models
    • QUDT and UCUM model classes
  • Added focused context support spec:
    • validates custom context substitution path with explicit register population

Current behavior/design intent

  • Context is first-class.
  • Register remains explicit (not auto-created).
  • No self-healing/stale auto-refresh logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant