Skip to content

Execution order based on variables#548

Merged
davidorme merged 12 commits intodevelopfrom
execution_order
Oct 10, 2024
Merged

Execution order based on variables#548
davidorme merged 12 commits intodevelopfrom
execution_order

Conversation

@dalonsoa
Copy link
Copy Markdown
Collaborator

@dalonsoa dalonsoa commented Sep 5, 2024

Description

Replaces the current calculation of the model execution order in init and update - based on the input configuration - with another one based on the information on which variables each model initialises and which ones they require.

Using this method has identified also an inconsistency in the variables used by the soil model, which I guess it is a good thing!

The depends section of the example config files have been removed, and I had not spotted it being mentioned anywhere else, including the documentation, but let me know if I missed anything.

In principle, this is the last bit of the implementation of the variables system.

Fixes #389

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Relevant documentation reviewed and updated

@dalonsoa dalonsoa marked this pull request as ready for review September 5, 2024 10:12
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 5, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.09%. Comparing base (c0a84ff) to head (4a1f8a0).
⚠️ Report is 3238 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #548   +/-   ##
========================================
  Coverage    95.08%   95.09%           
========================================
  Files           74       74           
  Lines         4295     4302    +7     
========================================
+ Hits          4084     4091    +7     
  Misses         211      211           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@jacobcook1995 jacobcook1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Collaborator

@vgro vgro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dalonsoa
Copy link
Copy Markdown
Collaborator Author

dalonsoa commented Oct 9, 2024

I'm in no rush, but if this is Ok, it will be best to merge it. The longer a PR is open, the more challenges it brings merging it for ongoing work. It is approved but I would prefer if you merge it, so it is done when it is a good time (eg. to avoid conflicts).

@dalonsoa dalonsoa requested a review from alexdewar October 9, 2024 13:30
Copy link
Copy Markdown
Collaborator

@davidorme davidorme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidorme davidorme merged commit 3c53e4e into develop Oct 10, 2024
@davidorme davidorme deleted the execution_order branch October 10, 2024 14:41
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.

Setup Variables (umbrella)

5 participants