Skip to content

Commit 756bffc

Browse files
ax3lfranzpoeschel
andauthored
Release 0.14.4 backports (#1177)
* Add `cmake/` to MANIFEST.in Forgot to add in #1128, which is then missing in Python sdist files for pip from-source builds. * Add failing test * Read gridSpacing also from long doubles * Python: 3.10 Add support for Python 3.10. * CI: Python 3.10 on Alpine Linux musllinux uses the musl libc on an Alpine stack, especially for docker-ish containers. Let's add coverage while also covering CPython 3.10 * Fix: Python Iteration Repr Typo Fix a typo in the `__repr__` of `Iteration` in Python. * Remove invalid records from our data structure entirely Until now, the half-parsed records were not deleted. Our sanity checks in `Series::~Series()` caught up on that and threw errors. * Fix doxygen? No idea why this PR triggers that error * Don't apply compression operators multipe times Happened so far in variable-based iteration encoding * ICC 19.1.2: CXX17 Work-Arounds (Variant) The `Attribute` constructors with implicit variant conversion sometimes do not work in ICC 19.1.2. ``` openPMD-api/src/RecordComponent.cpp(226): error: no instance of constructor "openPMD::Attribute::Attribute" matches the argument list argument types are: (openPMD::Extent) Attribute a(getExtent()); ^ openPMD-api/include/openPMD/backend/Attribute.hpp(50): note: this candidate was rejected because arguments do not match class Attribute : ^ openPMD-api/include/openPMD/backend/Attribute.hpp(50): note: this candidate was rejected because arguments do not match class Attribute : ^ openPMD-api/include/openPMD/backend/Attribute.hpp(79): note: this candidate was rejected because arguments do not match Attribute(resource r) : Variant(std::move(r)) ^ ``` Same work-around as for NVCC in #1103 * CMake 3.22+: Policy CMP0127 Fix a warning with CMake 3.22+. We use simple syntax in cmake_dependent_option, so we are compatible with the extended syntax in CMake 3.22+: https://cmake.org/cmake/help/v3.22/policy/CMP0127.html * Docs: Minor Warnings Fix minor warnings in the docs: - double reference (make 2nd ref annonymous) - misaligned reference * Docs: Fix HDF5 JSON File Fix misnamed filename and misnamed prefix in text. * Docs: Update Citation & Add BibTeX Add `.bib` blocks for easier citation of standard and API. * Docs: Fix CLI Highlighting Fix a highlighting issue for `openPMD-ls` in the docs. Explicitly use `python3` for module calls. * CMake: Warning Flags First in CXXFLAGS If we append them, then we overwrite flags like `-Wno-...` from environment variables. * ADIOS2 fixes: Incompatibilites w/ `master` Referes to post-`2.7.1` `master` branch of ADIOS2. Catch new ADIOS2 error type: string getCompressionOperator Dirtily catch ADIOS2 exception in automatically_deactivate_span Cleanly destruct a Series that errored during flushing Problem was that IO tasks that do not return cleanly but throw an exception must be removed from the IO queue, otherwise the task will be tried again during destruction. Usually, this means that anything will happen. SerialIOTest: Remove Comments (resolved) Print warning when removing task from IO queue std::string and fix warning * Automatically deactivate span-based API when operators are present * Add .pre-commit-config.yaml * Release: 0.14.4 Co-authored-by: Franz Pöschel <[email protected]>
1 parent 00532a7 commit 756bffc

33 files changed

+590
-38
lines changed

.github/workflows/linux.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,32 @@ jobs:
229229
cmake --build build --parallel 2
230230
ctest --test-dir build --output-on-failure
231231
232+
musllinux_py10:
233+
runs-on: ubuntu-20.04
234+
if: github.event.pull_request.draft == false
235+
container:
236+
image: quay.io/pypa/musllinux_1_1_x86_64
237+
steps:
238+
- uses: actions/checkout@v2
239+
- name: Install
240+
run: |
241+
apk update
242+
apk add hdf5-dev
243+
python3.10 -m pip install numpy
244+
- name: Build
245+
env: {CXXFLAGS: -Werror -Wno-deprecated-declarations}
246+
run: |
247+
share/openPMD/download_samples.sh build
248+
chmod u-w build/samples/git-sample/*.h5
249+
cmake -S . -B build \
250+
-DopenPMD_USE_PYTHON=ON \
251+
-DopenPMD_USE_MPI=OFF \
252+
-DopenPMD_USE_HDF5=ON \
253+
-DopenPMD_USE_INVASIVE_TESTS=ON \
254+
-DPython_EXECUTABLE=$(which python3.10)
255+
cmake --build build --parallel 2
256+
ctest --test-dir build --output-on-failure
257+
232258
conda_ompi_all:
233259
runs-on: ubuntu-20.04
234260
steps:

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://pre-commit.com for more information
14+
15+
# Do not check/format anything from third parties
16+
exclude: '^share/openPMD/thirdParty'
17+
18+
# See https://pre-commit.com/hooks.html for more hooks
19+
repos:
20+
- repo: https://github.com/pre-commit/pre-commit-hooks
21+
rev: v4.1.0
22+
hooks:
23+
- id: mixed-line-ending
24+
- id: check-json
25+
- id: check-toml
26+
- id: check-yaml
27+
- id: check-added-large-files

CHANGELOG.rst

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,57 @@
33
Changelog
44
=========
55

6-
0.14.2
6+
0.14.4
7+
------
8+
**Date:** 2022-01-21
9+
10+
Increased Compatibility & Python Install Bug
11+
12+
This release fixes various read/parsing bugs and increases compatibility with upcoming versions of ADIOS and old releases of Intel ``icpc``.
13+
An installation issue for pip-based installs from source in the last release was fixed and Python 3.10 support added.
14+
Various documentation and installation warnings have been fixed.
15+
16+
Changes to "0.14.3"
17+
^^^^^^^^^^^^^^^^^^^
18+
19+
Bug Fixes
20+
"""""""""
21+
22+
- ADIOS2:
23+
24+
- automatically deactivate ``span`` based ``Put`` API when operators are present #1155
25+
- solve incompatibilities w/ post-``2.7.1`` ``master``-branch #1166
26+
- ICC 19.1.2: C++17 work-arounds (``variant``) #1157
27+
- Don't apply compression operators multiple times in variable-based iteration encoding #1152
28+
- Reading/parsing:
29+
30+
- remove invalid records from data structures entirely #1150
31+
- fix grid spacing with type long double #1137
32+
- Python:
33+
34+
- fix ``Iteration`` ``__repr__`` typo #1149
35+
- add ``cmake/`` to ``MANIFEST.in`` #1140
36+
37+
Other
38+
"""""
39+
40+
- add simple ``.pre-commit-config.yaml``
41+
- Python:
42+
43+
- support Python 3.10 #1139
44+
- CMake:
45+
46+
- warning flags first in ``CXXFLAGS`` #1172
47+
- add policy CMP0127 (v3.22+) #1165
48+
- Docs:
49+
50+
- fix CLI highlighting #1171
51+
- update citation & add BibTeX #1168
52+
- fix HDF5 JSON File #1169
53+
- minor warnings #1170
54+
55+
56+
0.14.3
757
------
858
**Date:** 2021-11-03
959

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ contact:
2525
orcid: https://orcid.org/0000-0003-1943-7141
2626
2727
title: "openPMD-api: C++ & Python API for Scientific I/O with openPMD"
28-
version: 0.14.3
28+
version: 0.14.4
2929
repository-code: https://github.com/openPMD/openPMD-api
3030
doi: 10.14278/rodare.27
3131
license: LGPL-3.0-or-later

CMakeLists.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
cmake_minimum_required(VERSION 3.15.0)
44

5-
project(openPMD VERSION 0.14.3) # LANGUAGES CXX
5+
project(openPMD VERSION 0.14.4) # LANGUAGES CXX
66

77
# the openPMD "markup"/"schema" standard version
88
set(openPMD_STANDARD_VERSION 1.1.0)
@@ -18,6 +18,13 @@ if(POLICY CMP0074)
1818
cmake_policy(SET CMP0074 NEW)
1919
endif()
2020

21+
# We use simple syntax in cmake_dependent_option, so we are compatible with the
22+
# extended syntax in CMake 3.22+
23+
# https://cmake.org/cmake/help/v3.22/policy/CMP0127.html
24+
if(POLICY CMP0127)
25+
cmake_policy(SET CMP0127 NEW)
26+
endif()
27+
2128

2229
# Project structure ###########################################################
2330
#
@@ -883,23 +890,22 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
883890
# /usr/lib/llvm-6.0/lib/clang/6.0.0/lib/linux/libclang_rt.ubsan_minimal-x86_64.so
884891
# at runtime when used with symbol-hidden code (e.g. pybind11 module)
885892

886-
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything")
887-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code")
893+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code ${CMAKE_CXX_FLAGS}")
888894
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
889-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w3 -wd193,383,1572")
895+
set(CMAKE_CXX_FLAGS "-w3 -wd193,383,1572 ${CMAKE_CXX_FLAGS}")
890896
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
891-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wunreachable-code")
897+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wshadow -Woverloaded-virtual -Wunreachable-code ${CMAKE_CXX_FLAGS}")
892898
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
893899
# Warning C4503: "decorated name length exceeded, name was truncated"
894900
# Symbols longer than 4096 chars are truncated (and hashed instead)
895-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4503")
901+
set(CMAKE_CXX_FLAGS "-wd4503 ${CMAKE_CXX_FLAGS}")
896902
# Warning C4244: "conversion from 'X' to 'Y', possible loss of data"
897-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4244")
903+
set(CMAKE_CXX_FLAGS "-wd4244 ${CMAKE_CXX_FLAGS}")
898904
# Yes, you should build against the same C++ runtime and with same
899905
# configuration (Debug/Release). MSVC does inconvenient choices for their
900906
# developers, so be it. (Our Windows-users use conda-forge builds, which
901907
# are consistent.)
902-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4251")
908+
set(CMAKE_CXX_FLAGS "-wd4251 ${CMAKE_CXX_FLAGS}")
903909
endif()
904910
endif()
905911

Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ FROM quay.io/pypa/manylinux2010_x86_64 as build-env
55
# FROM quay.io/pypa/manylinux1_x86_64 as build-env
66
ENV DEBIAN_FRONTEND noninteractive
77

8-
# Python 3.6-3.9 via "36m 37m 38 39"
9-
ARG PY_VERSIONS="36m 37m 38 39"
8+
# Python 3.6-3.10 via "36m 37m 38 39 310"
9+
ARG PY_VERSIONS="36m 37m 38 39 310"
1010

1111
# static libs need relocatable symbols for linking to shared python lib
1212
ENV CFLAGS="-fPIC ${CFLAGS}"
@@ -188,6 +188,21 @@ RUN python3.9 -c "import openpmd_api as io; print(io.__version__); print(
188188
RUN python3.9 -m openpmd_api.ls --help
189189
RUN openpmd-ls --help
190190

191+
# test in fresh env: Debian:Bullseye + Python 3.10
192+
FROM debian:bullseye
193+
ENV DEBIAN_FRONTEND noninteractive
194+
COPY --from=build-env /wheelhouse/openPMD_api-*-cp310-cp310-manylinux2010_x86_64.whl .
195+
RUN apt-get update \
196+
&& apt-get install -y --no-install-recommends python3.10 python3-distutils ca-certificates curl \
197+
&& rm -rf /var/lib/apt/lists/*
198+
RUN python3.10 --version \
199+
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
200+
&& python3.10 get-pip.py \
201+
&& python3.10 -m pip install openPMD_api-*-cp310-cp310-manylinux2010_x86_64.whl
202+
RUN python3.10 -c "import openpmd_api as io; print(io.__version__); print(io.variants)"
203+
RUN python3.10 -m openpmd_api.ls --help
204+
RUN openpmd-ls --help
205+
191206

192207
# copy binary artifacts (wheels)
193208
FROM quay.io/pypa/manylinux2010_x86_64

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ include README.md COPYING COPYING.LESSER
22
include pyproject.toml
33
include requirements.txt
44
global-include CMakeLists.txt *.cmake *.in
5+
recursive-include cmake *
56
recursive-include include *
67
recursive-include src *
78
recursive-include share *

NEWS.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
Upgrade Guide
44
=============
55

6+
0.15.0
7+
------
8+
9+
Python 3.10 is now supported.
10+
11+
612
0.14.0
713
------
814

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ while those can be built either with or without:
119119

120120
Optional language bindings:
121121
* Python:
122-
* Python 3.6 - 3.9
122+
* Python 3.6 - 3.10
123123
* pybind11 2.6.2+
124124
* numpy 1.15+
125125
* mpi4py 2.1+ (optional, for MPI)

docs/source/citation.rst

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,29 @@ The most general reference to openPMD is:
1818
*"openPMD: A meta data standard for particle and mesh based data,"*
1919
`DOI:10.5281/zenodo.591699 <https://doi.org/10.5281/zenodo.591699>`_ (2015)
2020

21+
The equivalent BibTeX code is:
22+
23+
.. code-block:: bibtex
24+
25+
@misc{openPMDstandard,
26+
author = {Huebl, Axel and
27+
Lehe, R{\'e}mi and
28+
Vay, Jean-Luc and
29+
Grote, David P. and
30+
Sbalzarini, Ivo and
31+
Kuschel, Stephan and
32+
Sagan, David and
33+
P{\'e}rez, Fr{\'e}d{\'e}ric and
34+
Koller, Fabian and
35+
Bussmann, Michael},
36+
title = {{openPMD: A meta data standard for particle and mesh based data}},
37+
year = 2015,
38+
publisher = {Zenodo},
39+
doi = {10.5281/zenodo.591699},
40+
url = {https://www.openPMD.org},
41+
howpublished = {https://github.com/openPMD}
42+
}
43+
2144
Since the openPMD-standard is an actively evolving meta data schema, a specific version of the openPMD standard might be used in your work.
2245
You can select a version-specific DOI from the `release page <https://github.com/openPMD/openPMD-standard/releases>`_ and add the version number to the cited title, e.g.
2346

@@ -34,13 +57,13 @@ openPMD-api is a **software library** that provides a reference implementation o
3457
It targets both desktop as well as high-performance computing environments.
3558

3659
It is good scientific practice to document all used software, including transient dependencies, with versions in, e.g. a methods section of a publication.
37-
As a software citation, you almost always want to refer to a *specific version* of openPMD-api in your work, as illustrated for version 0.10.3:
60+
As a software citation, you almost always want to refer to a *specific version* of openPMD-api in your work, as illustrated for version 0.14.3:
3861

3962
.. tip::
4063

41-
Fabian Koller, Franz Poeschel, Junmin Gu, and Axel Huebl.
42-
*"openPMD-api 0.10.3: C++ & Python API for Scientific I/O with openPMD,"*
43-
`DOI:10.14278/rodare.209 <https://doi.org/10.14278/rodare.209>`_ (2019)
64+
Axel Huebl, Franz Poeschel, Fabian Koller, and Junmin Gu.
65+
*"openPMD-api 0.14.3: C++ & Python API for Scientific I/O with openPMD,"*
66+
`DOI:10.14278/rodare.1234 <https://doi.org/10.14278/rodare.1234>`_ (2021)
4467

4568
A list of all releases and DOIs can be found `on the release page <https://github.com/openPMD/openPMD-api/releases>`_.
4669

@@ -52,6 +75,23 @@ We also provide a DOI that refers to all releases of openPMD-api:
5275
*"openPMD-api: C++ & Python API for Scientific I/O with openPMD"*
5376
`DOI:10.14278/rodare.27 <https://doi.org/10.14278/rodare.27>`_ (2018)
5477

78+
The equivalent BibTeX code is:
79+
80+
.. code-block:: bibtex
81+
82+
@misc{openPMDapi,
83+
author = {Huebl, Axel and
84+
Poeschel, Franz and
85+
Koller, Fabian and
86+
Gu, Junmin},
87+
title = {{openPMD-api: C++ \& Python API for Scientific I/O with openPMD}},
88+
month = june,
89+
year = 2018,
90+
doi = {10.14278/rodare.27},
91+
url = {https://github.com/openPMD/openPMD-api}
92+
}
93+
94+
5595
Dependent Software
5696
~~~~~~~~~~~~~~~~~~
5797

0 commit comments

Comments
 (0)