Skip to content

Conversation

@swastim01
Copy link
Contributor

@swastim01 swastim01 commented Nov 1, 2025

feat: introduce BaseBatterySubModel for battery-specific domain handling (#2221)

Description

This PR introduces the new BaseBatterySubModel class to handle battery-specific domain validation, moving that logic out of the generic BaseSubModel.

Fixes:
Fixes #2221


Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix
  • Refactor
  • Documentation update

Changelog

Added under Unreleased → Features:

- Added `BaseBatterySubModel` to handle battery-specific domain validation separately from `BaseSubModel` ([#5254](https://github.com/pybamm-team/PyBaMM/pull/5254))

Important checks

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • Documentation builds: nox -s doctests
  • Code is clearly commented
  • Unit tests added and passing

Notes

Tried to incorporate all the points discussed in the issue conversation, looking for feedback to make further tweaks if needed!

…team#2221) - Removed domain checks from BaseSubModel - Added new BaseBatterySubModel class to handle battery-specific domain validation - Updated __init__.py to include BaseBatterySubModel - Cleaned and refactored BaseSubModel tests - Added dedicated tests for BaseBatterySubModel domain validation
@swastim01 swastim01 requested a review from a team as a code owner November 1, 2025 05:06
@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (fe522ac) to head (c9f9635).
⚠️ Report is 11 commits behind head on develop.

Additional details and impacted files
@@ Coverage Diff @@ ## develop #5254 +/- ## ======================================== Coverage 98.78% 98.78% ======================================== Files 321 322 +1 Lines 27643 27648 +5 ======================================== + Hits 27306 27311 +5  Misses 337 337 

☔ 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant