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

Remove ODES solver #3932

Merged
merged 20 commits into from
Mar 29, 2024
Merged

Remove ODES solver #3932

merged 20 commits into from
Mar 29, 2024

Conversation

kratman
Copy link
Contributor

@kratman kratman commented Mar 26, 2024

Description

Since the ODES solver was causing issues for upgrading to python 3.12 and might not offer anything outside of our other solvers, it might be able to be removed.

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

@kratman kratman self-assigned this Mar 26, 2024
@kratman
Copy link
Contributor Author

kratman commented Mar 26, 2024

I created this PR very early since I want to test on CI. This is in no way ready for review

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58%. Comparing base (a3db966) to head (ba3d9b5).
Report is 1 commits behind head on develop.

❗ Current head ba3d9b5 differs from pull request most recent head 34d4b84. Consider uploading reports for the commit 34d4b84 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3932      +/-   ##
===========================================
- Coverage    99.60%   99.58%   -0.03%     
===========================================
  Files          259      257       -2     
  Lines        21347    21190     -157     
===========================================
- Hits         21263    21102     -161     
- Misses          84       88       +4     

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

@valentinsulzer
Copy link
Member

🎵 Should Old Acquaintance be forgot... 🎵

@agriyakhetarpal
Copy link
Member

For the macOS failures, removing some of the recent pybamm-requires caches should work (this comes from time to time whenever CMake puts out a new release, and I always forget about fixing it)

@kratman kratman marked this pull request as ready for review March 27, 2024 15:52
@kratman
Copy link
Contributor Author

kratman commented Mar 27, 2024

Since tests seem to be passing, I am going to open this up for review

Extra things for reviewers to check:

  • Updated documentation
  • Make sure there are no tests/scripts outside of CI that I missed
  • If there are use-cases for ODEs that I missed, please mention them
  • Do any of our linux/mac dependencies in the instructions/docker get used for only ODES? (Agriya: verified, no extra dependencies)

Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks, @kratman! This looks good!

Dockerfile should also be updated to remove the extra odes dependency. Additionally, the CHANGELOG note should ideally be placed under the "Breaking changes" section and should specify why the solver was removed.

@kratman
Copy link
Contributor Author

kratman commented Mar 27, 2024

Thanks, @kratman! This looks good!

Dockerfile should also be updated to remove the extra odes dependency. Additionally, the CHANGELOG note should ideally be placed under the "Breaking changes" section and should specify why the solver was removed.

Yeah I was making the changelog now. Good catch on the dockerfile

kratman and others added 3 commits March 27, 2024 12:24
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
.github/workflows/test_on_push.yml Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

So long, old friend

@agriyakhetarpal
Copy link
Member

On another note, we shouldn't need to install two of the macOS system dependencies now with this, just graphviz and libomp should be required. We are fine with using Accelerate as a BLAS vendor and we needed gcc to get gfortran earlier for compiling scikits.odes (it wasn't being used for compiling IDAKLU anyway, we used the system Clang for that). I guess these changes would probably be better in a separate PR.

@kratman
Copy link
Contributor Author

kratman commented Mar 29, 2024

On another note, we shouldn't need to install two of the macOS system dependencies now with this, just graphviz and libomp should be required. We are fine with using Accelerate as a BLAS vendor and we needed gcc to get gfortran earlier for compiling scikits.odes (it wasn't being used for compiling IDAKLU anyway, we used the system Clang for that). I guess these changes would probably be better in a separate PR.

Can you add this to #3941 and I will look at it there

@kratman kratman dismissed Saransh-cpp’s stale review March 29, 2024 16:08

Changes were address. Additional improvements will be done in a follow task

@kratman
Copy link
Contributor Author

kratman commented Mar 29, 2024

Coverage will be fixed in #3942

@kratman kratman merged commit 60ba076 into pybamm-team:develop Mar 29, 2024
43 of 44 checks passed
@kratman kratman deleted the feat/removeODES branch March 29, 2024 17:35
@kratman kratman mentioned this pull request Jun 6, 2024
5 tasks
@agriyakhetarpal agriyakhetarpal mentioned this pull request Jul 20, 2024
8 tasks
js1tr3 pushed a commit to js1tr3/PyBaMM that referenced this pull request Aug 12, 2024
* Remove ODES

* Remove some additional ODES files

* More ODES removals

* Update .github/workflows/run_periodic_tests.yml

* Change versions and fix comments

* Remove some unneeded comments

* Change log and docker

* Apply suggestions from code review

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* Docker fix and bumping version in a test

* Revert test version

* Replace skipped test

* Update change log

---------

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@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.

4 participants