Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Variables (umbrella) #389

Closed
8 tasks done
dalonsoa opened this issue Feb 15, 2024 · 2 comments · Fixed by #548
Closed
8 tasks done

Setup Variables (umbrella) #389

dalonsoa opened this issue Feb 15, 2024 · 2 comments · Fixed by #548
Assignees

Comments

@dalonsoa
Copy link
Collaborator

dalonsoa commented Feb 15, 2024

          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)

@davidorme
Copy link
Collaborator

@dalonsoa Where are we on this meta issue? I think it's all done apart from the get_model_sequence replacement?

@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Sep 3, 2024

Yes, that's all that is left, aside from using the variables, but that's more for each individual model to adopt.

I'll see if I can tackle the get_model_sequence before the end of this week.

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 a pull request may close this issue.

2 participants