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

Retiring BaseModel.setup #541

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

davidorme
Copy link
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

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
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
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