Skip to content

CI fixes and documentation for Pybind v2.12.0 and Numpy 2.0#1637

Merged
franzpoeschel merged 2 commits intoopenPMD:devfrom
franzpoeschel:check-ci-on-dev
Jun 25, 2024
Merged

CI fixes and documentation for Pybind v2.12.0 and Numpy 2.0#1637
franzpoeschel merged 2 commits intoopenPMD:devfrom
franzpoeschel:check-ci-on-dev

Conversation

@franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Jun 17, 2024

With the Pybind upgrade to v2.12.0 and the Numpy upgrade to v2.0, some previous CI setup warnings turned into errors, leading to broken Python imports. Fix by (1) removing conflicting Python versions or (2) using Python virtualenvs.

#1640 and this (#1637) are two separate PRs since I don't want to squash the commits, #1640 has another author (third-party lib).

typename ValueType = typename detail::iterator_access<Iterator>::result_type,
typename... Extra>
iterator make_iterator(Iterator first, Sentinel last, Extra &&...extra) {
typing::Iterator<ValueType> make_iterator(Iterator first, Sentinel last, Extra &&...extra) {

Check notice

Code scanning / CodeQL

Unused static variable

Static variable extra is never read.
typename KeyType = typename detail::iterator_key_access<Iterator>::result_type,
typename... Extra>
iterator make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {
typing::Iterator<KeyType> make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {

Check notice

Code scanning / CodeQL

Unused static variable

Static variable extra is never read.
typename ValueType = typename detail::iterator_access<Iterator>::result_type,
typename... Extra>
iterator make_iterator(Iterator first, Sentinel last, Extra &&...extra) {
typing::Iterator<ValueType> make_iterator(Iterator first, Sentinel last, Extra &&...extra) {

Check notice

Code scanning / CodeQL

Unused local variable

Variable extra is not used.
typename KeyType = typename detail::iterator_key_access<Iterator>::result_type,
typename... Extra>
iterator make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {
typing::Iterator<KeyType> make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {

Check notice

Code scanning / CodeQL

Unused local variable

Variable extra is not used.
@franzpoeschel franzpoeschel force-pushed the check-ci-on-dev branch 11 times, most recently from d1b1220 to f86386e Compare June 20, 2024 15:04
@franzpoeschel franzpoeschel changed the title Empty PR to verify that our CI is currently broken Upgrade to Pybind v2.12.0 for compatibility with Numpy 2.0.0 Jun 20, 2024
@franzpoeschel franzpoeschel requested a review from ax3l June 20, 2024 15:46
@franzpoeschel franzpoeschel force-pushed the check-ci-on-dev branch 2 times, most recently from c794d05 to 5d41f83 Compare June 21, 2024 12:10
@franzpoeschel franzpoeschel changed the title Upgrade to Pybind v2.12.0 for compatibility with Numpy 2.0.0 CI fixes for Pybind v2.12.0 and Numpy 2.0 Jun 24, 2024
@franzpoeschel franzpoeschel changed the title CI fixes for Pybind v2.12.0 and Numpy 2.0 CI fixes and documentation for Pybind v2.12.0 and Numpy 2.0 Jun 24, 2024
@franzpoeschel franzpoeschel enabled auto-merge (squash) June 24, 2024 17:08
@ax3l ax3l disabled auto-merge June 24, 2024 17:53
Comment on lines +132 to +137
# compatibility issues between the two versions.
sudo apt -y autoremove python3
sudo apt install clang-14 cmake gfortran libhdf5-dev python3.11 python3.11-dev wget
python="$(which python3.11)"
sudo ln -s "$python" "${python%.11}"
sudo ln -s "$python" "${python%3.11}"
Copy link
Member

Choose a reason for hiding this comment

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

Is this still needed with a venv?

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 using a venv here, but I can try it as an alternative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that works too. I just have to take care that Spack does not use the venv since it will try finding headers inside the venv.

@franzpoeschel franzpoeschel force-pushed the check-ci-on-dev branch 4 times, most recently from 5b83753 to 658a633 Compare June 25, 2024 10:22
@franzpoeschel franzpoeschel force-pushed the check-ci-on-dev branch 2 times, most recently from c403034 to 04b0471 Compare June 25, 2024 10:47
@franzpoeschel franzpoeschel enabled auto-merge (squash) June 25, 2024 11:08
@franzpoeschel franzpoeschel merged commit 3daaa14 into openPMD:dev Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants