Skip to content

Make bypass setup and run update invalid in static models#693

Merged
dalonsoa merged 13 commits intodevelopfrom
687_fix_static
Feb 13, 2025
Merged

Make bypass setup and run update invalid in static models#693
dalonsoa merged 13 commits intodevelopfrom
687_fix_static

Conversation

@dalonsoa
Copy link
Copy Markdown
Collaborator

Description

This PR removes the possibility of skipping running the _setup method but still running _update once, which is an invalid configuration for static models.

As an extra, a bug is fixed by which the _update method was run in static models if no variables were present and None were required. If None are required, then the updated method should not run. Granted that is unlikely to happen in a real scenario, yet it should not happen ever.

Fixes #687

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.75%. Comparing base (8aa5af7) to head (d589958).
Report is 805 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #693      +/-   ##
===========================================
+ Coverage    94.74%   94.75%   +0.01%     
===========================================
  Files           73       73              
  Lines         4984     4995      +11     
===========================================
+ Hits          4722     4733      +11     
  Misses         262      262              

☔ 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

@sallymatson sallymatson left a comment

Choose a reason for hiding this comment

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

Great - I'll add this specification in the docs as well.

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.

Looks fine to me

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.

The logic looks solid but a couple of things I'm not so clear on.

@dalonsoa dalonsoa requested a review from davidorme February 3, 2025 14:17
@dalonsoa
Copy link
Copy Markdown
Collaborator Author

@davidorme , I think I implemented all the changes requested here. Shall we merge, so it does not become stalled?

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

@dalonsoa dalonsoa merged commit b87adc1 into develop Feb 13, 2025
@dalonsoa dalonsoa deleted the 687_fix_static branch February 13, 2025 06:09
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.

Prevent not running _setup but running _update from happening in static models

5 participants