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

Python 3.9 - 3.13: CI Updates #1671

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
environment:
matrix:
- TARGET_ARCH: x64
CONDA_PY: 3.7
CONDA_PY: 3.9
CONDA_INSTALL_LOCN: C:\\Miniconda37-x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x64
SHARED: OFF

- TARGET_ARCH: x86
CONDA_PY: 3.7
CONDA_PY: 3.9
CONDA_INSTALL_LOCN: C:\\Miniconda37
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x86
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
# gcc-4.8.5_py35_nompi_h5
# gcc-7.4.0_py_ompi_h5_ad2_coveralls

gcc7_py36_pd_dd_ompi_h5_ad2:
gcc7_py39_pd_dd_ompi_h5_ad2:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
Expand All @@ -224,19 +224,16 @@ jobs:
- name: Install
run: |
sudo apt-get update
sudo apt-get install g++-7 gfortran libopenmpi-dev python3 python3-setuptools
sudo apt-get install g++-7 gfortran libopenmpi-dev python3.9 python3.9-dev python3.9-venv
sudo .github/workflows/dependencies/install_spack
python3 -m pip install -U pip
python3 -m pip install -U numpy
python3 -m pip install -U mpi4py
python3 -m pip install -U pandas
python3 -m pip install -U dask
python3 -m pip install -U pyarrow
- name: Build
env: {CC: gcc-7, CXX: g++-7, CXXFLAGS: -Werror}
run: |
eval $(spack env activate --sh .github/ci/spack-envs/gcc7_py36_ompi_h5_ad2/)
spack install
python3.9 -m venv env
source env/bin/activate
pip install numpy mpi4py pandas dask pyarrow

share/openPMD/download_samples.sh build
cmake -S . -B build \
Expand All @@ -249,19 +246,22 @@ jobs:
cd build
ctest --output-on-failure

gcc9_py38_pd_nompi_h5_ad2_libcpp:
gcc9_py39_pd_nompi_h5_ad2_libcpp:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Install
run: |
sudo apt-get update
sudo apt-get install g++ libopenmpi-dev libhdf5-openmpi-dev python3 python3-numpy python3-mpi4py python3-pandas
sudo apt-get install g++ libopenmpi-dev libhdf5-openmpi-dev python3.9 python3.9-dev python3.9-venv
# TODO ADIOS2
- name: Build
env: {CXXFLAGS: -Werror, PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig}
run: |
python3.9 -m venv env
source env/bin/activate
pip install numpy mpi4py pandas dask pyarrow
share/openPMD/download_samples.sh build
cmake -S . -B build \
-DopenPMD_USE_PYTHON=ON \
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tooling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ jobs:
- name: Install
run: |
sudo apt-get update
sudo apt-get install clang-10 libc++-dev libc++abi-dev python3 gfortran libopenmpi-dev
python3 -m pip install -U pip
python3 -m pip install -U numpy
sudo apt-get install clang-10 libc++-dev libc++abi-dev python3.9 python3.9-dev python3.9-venv gfortran libopenmpi-dev
sudo .github/workflows/dependencies/install_spack
- name: Build
env: {CC: mpicc, CXX: mpic++, OMPI_CC: clang-10, OMPI_CXX: clang++-10, CXXFLAGS: -Werror, OPENPMD_HDF5_CHUNKS: none, OPENPMD_TEST_NFILES_MAX: 100}
Expand All @@ -58,6 +56,9 @@ jobs:
spack install
SOURCEPATH="$(pwd)"
share/openPMD/download_samples.sh build
python3.9 -m venv env
source env/bin/activate
pip install numpy
export LDFLAGS="${LDFLAGS} -fsanitize=address,undefined -shared-libsan"
export CXXFLAGS="${CXXFLAGS} -fsanitize=address,undefined -shared-libsan"
cmake -S . -B build \
Expand All @@ -66,6 +67,7 @@ jobs:
-DopenPMD_USE_HDF5=ON \
-DopenPMD_USE_ADIOS2=ON \
-DopenPMD_USE_INVASIVE_TESTS=ON \
-DPython_EXECUTABLE="$(which python)" \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build build --parallel 2
export ASAN_OPTIONS=detect_stack_use_after_return=1:detect_leaks=1:check_initialization_order=true:strict_init_order=true:detect_stack_use_after_scope=1:fast_unwind_on_malloc=0
Expand Down
15 changes: 0 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,6 @@ RUN for whl in /opt/src/dist/*.whl; do \
&& du -hs /opt/src/dist/* \
&& du -hs /wheelhouse/*

# test in fresh env: Debian:Sid + Python 3.8
FROM debian:sid
ENV DEBIAN_FRONTEND noninteractive
COPY --from=build-env /wheelhouse/openPMD_api-*-cp38-cp38-manylinux2010_x86_64.whl .
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3.8 python3-distutils ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
RUN python3.8 --version \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3.8 get-pip.py \
&& python3.8 -m pip install openPMD_api-*-cp38-cp38-manylinux2010_x86_64.whl
RUN python3.8 -c "import openpmd_api as io; print(io.__version__); print(io.variants)"
RUN python3.8 -m openpmd_api.ls --help
RUN openpmd-ls --help

# test in fresh env: Debian:Bullseye + Python 3.9
FROM debian:bullseye
ENV DEBIAN_FRONTEND noninteractive
Expand Down
2 changes: 1 addition & 1 deletion NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Note that ADIOS2 does not support compression in BP3 files.

CMake 3.22.0 is now the minimally supported version for CMake.
pybind11 2.13.0 is now the minimally supported version for Python support.
Python 3.12 & 3.13 are now supported, Python 3.7 is removed.
Python 3.12 & 3.13 are now supported, Python 3.7 & 3.8 are removed.
Copy link
Member Author

Choose a reason for hiding this comment

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

Move up to next major release.


The ``len(...)`` of many classes has been reworked for consistency and returns now the number of entries (iterations, record components, etc.).
Previously, this sporadically returned the number of attributes, which is better queried via ``len(<object>.attributes)``.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ while those can be built either with or without:

Optional language bindings:
* Python:
* Python 3.8 - 3.13
* Python 3.9 - 3.13
* pybind11 2.13.0+
* numpy 1.15+
* mpi4py 2.1+ (optional, for MPI)
Expand Down
2 changes: 1 addition & 1 deletion Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Supported frontends are C++11 and Python3.
-DopenPMD_USE_PYTHON=ON \
-DopenPMD_BUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_PYTHONDIR=lib/python3.6/dist-packages
-DCMAKE_INSTALL_PYTHONDIR=lib/python3.12/dist-packages
make
# make test
make install
Expand Down
4 changes: 2 additions & 2 deletions cmake/dependencies/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ set(openPMD_pybind11_branch "v2.13.6"
"Repository branch for openPMD_pybind11_repo if(openPMD_USE_INTERNAL_PYBIND11)")

if(openPMD_USE_PYTHON STREQUAL AUTO)
find_package(Python 3.7.0 COMPONENTS Interpreter Development.Module)
find_package(Python 3.9.0 COMPONENTS Interpreter Development.Module)
ax3l marked this conversation as resolved.
Show resolved Hide resolved
elseif(openPMD_USE_PYTHON)
find_package(Python 3.7.0 COMPONENTS Interpreter Development.Module REQUIRED)
find_package(Python 3.9.0 COMPONENTS Interpreter Development.Module REQUIRED)
ax3l marked this conversation as resolved.
Show resolved Hide resolved
else()
set(openPMD_HAVE_PYTHON FALSE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies:
- pre-commit
- pyarrow # for dask
# - pybind11 # shipped internally
- python>=3.8
- python>=3.9

# just a note for later hackery, we could install pip packages inside the env, too:
# - pip:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dev/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Optional: language bindings

* Python:

* Python 3.8 - 3.13
* Python 3.9 - 3.13
* pybind11 2.13.0+
* numpy 1.15+
* mpi4py 2.1+ (optional, for MPI)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ CMake will summarize the install paths for you before the build step.
# Note that one some systems, /lib might need to be replaced with /lib64.

# change path to your python MAJOR.MINOR version
export PYTHONPATH=$HOME/somepath/lib/python3.8/site-packages:$PYTHONPATH
export PYTHONPATH=$HOME/somepath/lib/python3.12/site-packages:$PYTHONPATH

Adding those lines to your ``$HOME/.bashrc`` and re-opening your terminal will set them permanently.

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def build_extension(self, ext):
cmdclass=dict(build_ext=CMakeBuild),
# scripts=['openpmd-ls'],
zip_safe=False,
python_requires='>=3.8',
python_requires='>=3.9',
ax3l marked this conversation as resolved.
Show resolved Hide resolved
# tests_require=['pytest'],
install_requires=install_requires,
# see: src/bindings/python/cli
Expand Down Expand Up @@ -225,7 +225,6 @@ def build_extension(self, ext):
'Topic :: Database :: Front-Ends',
'Programming Language :: C++',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand Down
Loading