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

Throw an error when concatenations have different number of children #4562

Merged
merged 13 commits into from
Nov 12, 2024

Conversation

aabills
Copy link
Contributor

@aabills aabills commented Nov 4, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #4561

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 run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ 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
Copy link
Contributor Author

aabills commented Nov 4, 2024

Tests are going to fail on this due to an unrelated issue that I am working on concurrently, so opening this for now and once we merge the other one we can merge this one.

@aabills aabills changed the title add error and test Throw an error when concatenations have different number of children Nov 4, 2024
@aabills aabills mentioned this pull request Nov 4, 2024
8 tasks
@aabills aabills marked this pull request as ready for review November 11, 2024 17:54
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.26%. Comparing base (1022c6b) to head (f313159).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4562      +/-   ##
===========================================
- Coverage    99.27%   99.26%   -0.02%     
===========================================
  Files          302      302              
  Lines        22868    22889      +21     
===========================================
+ Hits         22703    22721      +18     
- Misses         165      168       +3     

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

kratman
kratman previously approved these changes Nov 11, 2024
Copy link
Contributor

@kratman kratman left a comment

Choose a reason for hiding this comment

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

Seems fine as a temporary fix for the bug

@kratman kratman self-requested a review November 12, 2024 02:38
@kratman
Copy link
Contributor

kratman commented Nov 12, 2024

@aabills Can you update the bug fix section of the change log

kratman
kratman previously approved these changes Nov 12, 2024
Copy link
Contributor

@kratman kratman left a comment

Choose a reason for hiding this comment

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

Looks good to me now. I can't vouch for the physics, but I don't see any issues with the code.

@aabills
Copy link
Contributor Author

aabills commented Nov 12, 2024

@aabills Can you update the bug fix section of the change log

Done, I realized I haven't done that for the other PR's either so I did all 3.

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Eric G. Kratz <[email protected]>
@kratman kratman merged commit cb50363 into pybamm-team:develop Nov 12, 2024
24 of 25 checks passed
pkalbhor pushed a commit to pkalbhor/PyBaMM that referenced this pull request Nov 15, 2024
…ybamm-team#4562)

* add error and test

* disable thermal half cells for now

* easier way to fix it

* clean up

* move half cell code to function

* style: pre-commit fixes

* changelog

* Update CHANGELOG.md

Co-authored-by: Eric G. Kratz <[email protected]>

---------

Co-authored-by: Eric G. Kratz <[email protected]>
Co-authored-by: Alexander Bills <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

[Bug]: Binary operators on concatenations assume that each concatenation has the same number of orphans
2 participants