Skip to content

Conversation

aabills
Copy link
Contributor

@aabills aabills commented Dec 18, 2024

Description

Makes particle size distribution work with composite electrode.

Test is a bit weird, the standard model test fails due to some shape error -- I'll debug that tomorrow.

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

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

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python -m pytest (or $ nox -s tests)
  • The documentation builds: $ python -m pytest --doctest-plus src (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ nox -s quick.

Further checks:

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

@aabills aabills changed the title Improve submodel compatibility Make particle size distribution work with composite electrode. Dec 18, 2024
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.22%. Comparing base (84fd342) to head (a7253b8).
Report is 121 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4687   +/-   ##
========================================
  Coverage    99.22%   99.22%           
========================================
  Files          302      303    +1     
  Lines        23000    23070   +70     
========================================
+ Hits         22821    22891   +70     
  Misses         179      179           

☔ 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

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

valentinsulzer
valentinsulzer previously approved these changes Dec 18, 2024
Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Generally looks fine to me, the proof will be in the testing and coverage. A lot of places have unnecessarily duplicated code but not a hill I'll die on

@aabills aabills mentioned this pull request Dec 18, 2024
8 tasks
Alexander Bills added 2 commits December 18, 2024 15:23
@aabills
Copy link
Contributor Author

aabills commented Dec 19, 2024

s/b gtg

@aabills aabills enabled auto-merge December 19, 2024 02:47
Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

thanks @aabills looks great, just a few minor comments

)
if ["negative particle size"] in symbol.domains.values():
if ["negative particle size"] in symbol.domains.values() or [
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI geo.domain_params["negative"] is equivalent to geo.n

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how to interpret this comment, as far as I can tell, I never use geo.domain_params['negative']. Is there something here you want changed?

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry I wasn’t clear. I meant that instead of doing an if statement by domain and getting eg geo.n you can do geo.domain_params[domain]. More of a comment then necessarily a suggestion / required change.

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like I left this comment in the wrong place too lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, thanks

@aabills aabills requested a review from rtimms December 19, 2024 18:06
@aabills aabills merged commit 27da28f into pybamm-team:develop Dec 19, 2024
25 checks passed
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.

3 participants