Skip to content

Retiring BaseModel.setup#541

Closed
davidorme wants to merge 2 commits intodevelopfrom
540-retire-setup-from-basemodel
Closed

Retiring BaseModel.setup#541
davidorme wants to merge 2 commits intodevelopfrom
540-retire-setup-from-basemodel

Conversation

@davidorme
Copy link
Copy Markdown
Collaborator

Description

This PR:

  • Moves AnimalModel.setup to AnimalModel._setup, keeping the same organisation. This is called from within __init__, as before.
  • Removes BaseModel.setup from the BaseModel definition
  • Removes calls to model setup methods in the main runner.
  • Updates docs
  • Fixes tests.

Fixes #540 (issue)

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)
  • None of the above! A breaking change (API change) to remove unneeded complexity.

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

@davidorme davidorme linked an issue Aug 30, 2024 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.96%. Comparing base (f3c6f53) to head (d2abee5).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #541      +/-   ##
===========================================
- Coverage    94.98%   94.96%   -0.02%     
===========================================
  Files           74       74              
  Lines         4145     4135      -10     
===========================================
- Hits          3937     3927      -10     
  Misses         208      208              

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

Copy link
Copy Markdown
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

The change looks ok, but I would hold on in case we actually need the setup method. Have a look at #373 - and the explanation in #373 (comment)

@dalonsoa dalonsoa mentioned this pull request Sep 3, 2024
7 tasks
@davidorme
Copy link
Copy Markdown
Collaborator Author

This PR is outdated by the development of the static model

@davidorme davidorme closed this Jan 30, 2025
@davidorme davidorme deleted the 540-retire-setup-from-basemodel branch January 30, 2025 10:20
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.

Retire setup from BaseModel

3 participants