Skip to content

Setup Variables (umbrella) #389

@dalonsoa

Description

@dalonsoa
          Ok, so I'm booking myself Thursday and Friday next week to work on this. My plan would be:

Step 1 (one PR)

  • Start from the simplified version created by @davidorme
  • Add a step somewhere in the Config class after the required models have been pulled out of the configuration to populate the initialised_by, updated_by, and used_by lists. The models might need updating.
  • Run some validation based initially on the following conditions, raising an error if they are broken:
    • No variable is initialised by two models
    • There is no variable used or updated that has not been initialised
    • No two models update the same variable (or they do, I don't know if that is a use case)

Step 2 (another PR, after the above is merged)

  • Update the get_model_sequence function to use this information, as well as (or in place of?) the explicit dependencies already in place, to try to come up with the right sequence.
  • Update the models so they initialise the variables when they are initialised and the registry of initialised variables is populated.

Step 3 (yet another PR)

  • Update the models so they use the information from this registry -> TBC by each model at its own pace

I'm sure I'm missing something and I will need to improvise, but is there anything obvious I'm forgetting?

Originally posted by @dalonsoa in #371 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions