PyBaMM
PyBaMM copied to clipboard
Specify `pybind11` as a build-time dependency
Description
This PR adds pybind11
to the list of build-time dependencies in pyproject.toml
(#3301); which means it is picked up, downloaded, and installed by pip
automatically and therefore made available to users. CMake can now find the package instead of using the git-cloned directory. Contributors and developers will no longer have to git-clone the pybind11 repository from GitHub. All instances of pybind11
have been moved to a unified location for other workflows to use.
Closes #3480
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)
- [x] Optimization (back-end change that speeds up the code)
- [ ] Bug fix (non-breaking change which fixes an issue)
Key checklist:
- [x] 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) - [x] All tests pass:
$ python run-tests.py --all
(or$ nox -s tests
) - [x] 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:
- [x] Code is commented, particularly in hard-to-understand areas
- [x] Tests added that prove fix is effective or that feature works
I will run the wheel-building workflow on my fork just to make sure these changes are okay.
It passes locally for me, strangely! Edit: okay, now passing for Linux and macOS, I just need to fix the Windows tests. We don't compile the IDAKLU solver in PR tests for Windows but we do it when building wheels, so we can check for the CIBUILDWHEEL
environment variable in this case. Similarly, the Read the Docs configuration does not compile the IDAKLU solver either, so I can use the READTHEDOCS
environment variable for this. The goal is to ensure that the compilation of the IDAKLU solver remains optional and does not break anything if installing from a source distribution.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.59%. Comparing base (
e2d8792
) to head (e80aaef
). Report is 917 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #3560 +/- ##
========================================
Coverage 99.59% 99.59%
========================================
Files 258 258
Lines 20755 20755
========================================
Hits 20670 20670
Misses 85 85
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm closing this PR; it's quite out of date now with what we're planning to do in #3564, and @cringeyburger can take a look at this in the coming weeks.