From 414ac0493fdcbe28263d24df4ddb6c3f7f41b2ee Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 7 Oct 2024 19:26:19 -0700 Subject: [PATCH 1/6] Release: 0.16.1 Signed-off-by: Axel Huebl --- CHANGELOG.rst | 9 +++++++++ CITATION.cff | 2 +- CMakeLists.txt | 2 +- README.md | 4 ++-- docs/source/conf.py | 4 ++-- docs/source/dev/linking.rst | 4 ++-- docs/source/index.rst | 2 +- include/openPMD/version.hpp | 2 +- setup.py | 2 +- test/SerialIOTest.cpp | 2 +- 10 files changed, 21 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 409997c5b8..0dc16f88a9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,15 @@ Changelog ========= +0.16.1 +------ +**Date:** 2024-10-07 + +New Backends, Extension, Perf. & Memory + +This is the 0.16.0 release but with internal version bumps where they were missing. + + 0.16.0 ------ **Date:** 2024-10-07 diff --git a/CITATION.cff b/CITATION.cff index a810842b0c..a0f24d52ea 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -37,7 +37,7 @@ contact: orcid: https://orcid.org/0000-0003-1943-7141 email: axelhuebl@lbl.gov title: "openPMD-api: C++ & Python API for Scientific I/O with openPMD" -version: 0.16.0-dev +version: 0.16.1 repository-code: https://github.com/openPMD/openPMD-api doi: 10.14278/rodare.27 license: LGPL-3.0-or-later diff --git a/CMakeLists.txt b/CMakeLists.txt index a0cc161f4a..bf44036715 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # cmake_minimum_required(VERSION 3.22.0) -project(openPMD VERSION 0.16.0) # LANGUAGES CXX +project(openPMD VERSION 0.16.1) # LANGUAGES CXX # the openPMD "markup"/"schema" standard version set(openPMD_STANDARD_VERSION 1.1.0) diff --git a/README.md b/README.md index 2fc4c7be82..0791a4fea8 100644 --- a/README.md +++ b/README.md @@ -304,7 +304,7 @@ export CMAKE_PREFIX_PATH=$HOME/somepath:$CMAKE_PREFIX_PATH Use the following lines in your project's `CMakeLists.txt`: ```cmake # supports: COMPONENTS MPI NOMPI HDF5 ADIOS2 -find_package(openPMD 0.16.0 CONFIG) +find_package(openPMD 0.16.1 CONFIG) if(openPMD_FOUND) target_link_libraries(YourTarget PRIVATE openPMD::openPMD) @@ -332,7 +332,7 @@ set(openPMD_INSTALL OFF) # or instead use: set(openPMD_USE_PYTHON OFF) FetchContent_Declare(openPMD GIT_REPOSITORY "https://github.com/openPMD/openPMD-api.git" - GIT_TAG "0.16.0") + GIT_TAG "0.16.1") FetchContent_MakeAvailable(openPMD) ``` diff --git a/docs/source/conf.py b/docs/source/conf.py index 668ef4c8ae..f93e0a2763 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -86,9 +86,9 @@ # built documents. # # The short X.Y version. -version = u'0.16.0' +version = u'0.16.1' # The full version, including alpha/beta/rc tags. -release = u'0.16.0-dev' +release = u'0.16.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/dev/linking.rst b/docs/source/dev/linking.rst index 191612f541..5048ddbf1d 100644 --- a/docs/source/dev/linking.rst +++ b/docs/source/dev/linking.rst @@ -23,7 +23,7 @@ Use the following lines in your project's ``CMakeLists.txt``: .. code-block:: cmake # supports: COMPONENTS MPI NOMPI HDF5 ADIOS2 - find_package(openPMD 0.16.0 CONFIG) + find_package(openPMD 0.16.1 CONFIG) if(openPMD_FOUND) target_link_libraries(YourTarget PRIVATE openPMD::openPMD) @@ -53,7 +53,7 @@ Just replace the ``add_subdirectory`` call with: set(openPMD_USE_PYTHON OFF) FetchContent_Declare(openPMD GIT_REPOSITORY "https://github.com/openPMD/openPMD-api.git" - GIT_TAG "0.16.0") + GIT_TAG "0.16.1") FetchContent_MakeAvailable(openPMD) diff --git a/docs/source/index.rst b/docs/source/index.rst index 5fc4475364..e38b87d486 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -44,7 +44,7 @@ openPMD-api version supported openPMD standard versions ======================== =================================== ``2.0.0+`` ``2.0.0+`` (not released yet) ``1.0.0+`` ``1.0.1-1.1.0`` (not released yet) -``0.13.1-0.15.1`` (beta) ``1.0.0-1.1.0`` +``0.13.1-0.16.1`` (beta) ``1.0.0-1.1.0`` ``0.1.0-0.12.0`` (alpha) ``1.0.0-1.1.0`` ======================== =================================== diff --git a/include/openPMD/version.hpp b/include/openPMD/version.hpp index 9f32154d92..ead912a23c 100644 --- a/include/openPMD/version.hpp +++ b/include/openPMD/version.hpp @@ -29,7 +29,7 @@ */ #define OPENPMDAPI_VERSION_MAJOR 0 #define OPENPMDAPI_VERSION_MINOR 16 -#define OPENPMDAPI_VERSION_PATCH 0 +#define OPENPMDAPI_VERSION_PATCH 1 #define OPENPMDAPI_VERSION_LABEL "" /** @} */ diff --git a/setup.py b/setup.py index 1c4e7476d3..271f24bc53 100644 --- a/setup.py +++ b/setup.py @@ -174,7 +174,7 @@ def build_extension(self, ext): setup( name='openPMD-api', # note PEP-440 syntax: x.y.zaN but x.y.z.devN - version='0.16.0.dev', + version='0.16.1', author='Axel Huebl, Franz Poeschel, Fabian Koller, Junmin Gu', author_email='axelhuebl@lbl.gov, f.poeschel@hzdr.de', maintainer='Axel Huebl', diff --git a/test/SerialIOTest.cpp b/test/SerialIOTest.cpp index 7323a32582..439d17c329 100644 --- a/test/SerialIOTest.cpp +++ b/test/SerialIOTest.cpp @@ -6363,7 +6363,7 @@ void adios2_bp5_no_steps(bool usesteps) IO.DefineAttribute("/openPMD", std::string("1.1.0")); IO.DefineAttribute("/openPMDextension", uint32_t(0)); IO.DefineAttribute("/software", std::string("openPMD-api")); - IO.DefineAttribute("/softwareVersion", std::string("0.16.0-dev")); + IO.DefineAttribute("/softwareVersion", std::string("0.16.1")); IO.DefineAttribute("/data/0/dt", double(1)); IO.DefineAttribute( From c3e43efa4a1db0dddf5bf8a87932e8b1e78d975d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 8 Oct 2024 11:17:41 +0200 Subject: [PATCH 2/6] Fix new_version.py --- new_version.py | 68 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/new_version.py b/new_version.py index 59f2e4e49d..f670042b19 100755 --- a/new_version.py +++ b/new_version.py @@ -40,6 +40,7 @@ VERSION_STR = f"{MAJOR}.{MINOR}.{PATCH}" VERSION_STR_SUFFIX = VERSION_STR + (f"-{SUFFIX}" if SUFFIX else "") +VERSION_STR_SUFFIX_WITH_DOT = VERSION_STR + (f".{SUFFIX}" if SUFFIX else "") print() print(f"Your new version is: {VERSION_STR_SUFFIX}") @@ -51,9 +52,27 @@ for line in f: match = re.search(r"find_package.*openPMD *([^ ]*) *CONFIG\).*", line) if match: - OLD_VERSION_STR = match.group(1) + OLD_VERSION_STR_README = match.group(1) break +with open(str(REPO_DIR.joinpath("CMakeLists.txt")), encoding="utf-8") as f: + for line in f: + match = re.search(r"project\(openPMD *VERSION *(.*)\)", line) + if match: + OLD_VERSION_STR_CMAKE = match.group(1) + break + +OLD_VERSION_TAG = "" +with open(str(REPO_DIR.joinpath("include/openPMD/version.hpp")), encoding="utf-8") as f: + for line in f: + match = re.search(r'#define OPENPMDAPI_VERSION_LABEL "([^"]+)"', line) + if match: + OLD_VERSION_TAG = match.group(1) + break + +OLD_VERSION_SUFFIX = f"(-{OLD_VERSION_TAG})?" if OLD_VERSION_TAG else "" +OLD_VERSION_STR = f"({re.escape(OLD_VERSION_STR_README)})|({re.escape(OLD_VERSION_STR_CMAKE)}{OLD_VERSION_SUFFIX})" + print(f"The old version is: {OLD_VERSION_STR}") print() @@ -86,18 +105,57 @@ f.write(cmakelists_content) -def generic_replace(filename): +def generic_replace(filename, previous, after): filename = str(REPO_DIR.joinpath(filename)) with open(filename, encoding="utf-8") as f: content = f.read() - content = re.sub(re.escape(OLD_VERSION_STR), VERSION_STR, content) + content = re.sub(previous, after, content, flags=re.MULTILINE) with open(filename, "w", encoding="utf-8") as f: f.write(content) -for file in ["docs/source/dev/linking.rst", "README.md"]: - generic_replace(file) +for file in [ + "docs/source/dev/linking.rst", + "README.md", +]: + generic_replace(file, previous=OLD_VERSION_STR, after=VERSION_STR) + +for file in ["CITATION.cff", "test/SerialIOTest.cpp"]: + generic_replace(file, previous=OLD_VERSION_STR, after=VERSION_STR_SUFFIX) + +generic_replace( + "docs/source/index.rst", + previous=r"``0.13.1-[^`]*``", + after=f"``0.13.1-{VERSION_STR}``", +) +setup_py_path = str(REPO_DIR.joinpath("setup.py")) +with open(setup_py_path, encoding="utf-8") as f: + for line in f: + match = re.search(r"version='([^']+)',", line) + if match: + PREVIOUS_PIP_VERSION = match.group(1) + break +generic_replace( + "setup.py", previous=PREVIOUS_PIP_VERSION, after=VERSION_STR_SUFFIX_WITH_DOT +) +generic_replace( + ".github/workflows/windows.yml", + previous=f"{PREVIOUS_PIP_VERSION}0?", + after=( + f"{VERSION_STR_SUFFIX_WITH_DOT}0" if SUFFIX else VERSION_STR_SUFFIX_WITH_DOT + ), +) +generic_replace( + "docs/source/conf.py", + previous=r"^version.*=.*", + after=f"version = u'{VERSION_STR}'", +) +generic_replace( + "docs/source/conf.py", + previous=r"^release.*=.*", + after=f"release = u'{VERSION_STR_SUFFIX}'", +) version_hpp_path = str(REPO_DIR.joinpath("include/openPMD/version.hpp")) with open(version_hpp_path, encoding="utf-8") as f: From 74ab5d39ade4e7cb4507bb24d91052529a3fc90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 8 Oct 2024 12:07:30 +0200 Subject: [PATCH 3/6] Update version in windows.yml --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index efb6d6d762..183bcc4f7e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -42,7 +42,7 @@ jobs: python3.exe -m pip wheel . if(!$?) { Exit $LASTEXITCODE } - python3.exe -m pip install openPMD_api-0.16.0.dev0-cp39-cp39-win_amd64.whl + python3.exe -m pip install openPMD_api-0.16.1-cp39-cp39-win_amd64.whl if(!$?) { Exit $LASTEXITCODE } python3.exe -c "import openpmd_api as api; print(api.variants)" From 401b1031d895cb908a9929260529e3f698c2d377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 8 Oct 2024 13:07:02 +0200 Subject: [PATCH 4/6] Reformat with yapf3 --- new_version.py | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/new_version.py b/new_version.py index f670042b19..46e6c7ae4e 100755 --- a/new_version.py +++ b/new_version.py @@ -14,13 +14,11 @@ # Maintainer Inputs ########################################################### -print( - """Hi there, this is an openPMD maintainer tool to update the source +print("""Hi there, this is an openPMD maintainer tool to update the source code of openPMD-api to a new version. For it to work, you need write access on the source directory and you should be working in a clean git branch without ongoing -rebase/merge/conflict resolves and without unstaged changes.""" -) +rebase/merge/conflict resolves and without unstaged changes.""") # check source dir # REPO_DIR = Path(__file__).parent.parent.parent.absolute() @@ -63,7 +61,8 @@ break OLD_VERSION_TAG = "" -with open(str(REPO_DIR.joinpath("include/openPMD/version.hpp")), encoding="utf-8") as f: +with open(str(REPO_DIR.joinpath("include/openPMD/version.hpp")), + encoding="utf-8") as f: for line in f: match = re.search(r'#define OPENPMDAPI_VERSION_LABEL "([^"]+)"', line) if match: @@ -71,19 +70,19 @@ break OLD_VERSION_SUFFIX = f"(-{OLD_VERSION_TAG})?" if OLD_VERSION_TAG else "" -OLD_VERSION_STR = f"({re.escape(OLD_VERSION_STR_README)})|({re.escape(OLD_VERSION_STR_CMAKE)}{OLD_VERSION_SUFFIX})" +OLD_VERSION_STR = \ + f"({re.escape(OLD_VERSION_STR_README)})" + \ + f"|({re.escape(OLD_VERSION_STR_CMAKE)}{OLD_VERSION_SUFFIX})" print(f"The old version is: {OLD_VERSION_STR}") print() - REPLY = input("Is this information correct? Will now start updating! [y/N] ") print() if REPLY not in ["Y", "y", ""]: print("You did not confirm with 'y', aborting.") sys.exit(1) - # Ask for new ################################################################# print("""We will now run a few sed commands on your source directory.\n""") @@ -116,8 +115,8 @@ def generic_replace(filename, previous, after): for file in [ - "docs/source/dev/linking.rst", - "README.md", + "docs/source/dev/linking.rst", + "README.md", ]: generic_replace(file, previous=OLD_VERSION_STR, after=VERSION_STR) @@ -136,15 +135,14 @@ def generic_replace(filename, previous, after): if match: PREVIOUS_PIP_VERSION = match.group(1) break -generic_replace( - "setup.py", previous=PREVIOUS_PIP_VERSION, after=VERSION_STR_SUFFIX_WITH_DOT -) +generic_replace("setup.py", + previous=PREVIOUS_PIP_VERSION, + after=VERSION_STR_SUFFIX_WITH_DOT) generic_replace( ".github/workflows/windows.yml", previous=f"{PREVIOUS_PIP_VERSION}0?", - after=( - f"{VERSION_STR_SUFFIX_WITH_DOT}0" if SUFFIX else VERSION_STR_SUFFIX_WITH_DOT - ), + after=(f"{VERSION_STR_SUFFIX_WITH_DOT}0" + if SUFFIX else VERSION_STR_SUFFIX_WITH_DOT), ) generic_replace( "docs/source/conf.py", @@ -180,8 +178,6 @@ def replace(key, value): # Epilogue #################################################################### -print( - """Done. Please check your source, e.g. via +print("""Done. Please check your source, e.g. via git diff -now and commit the changes if no errors occurred.""" -) +now and commit the changes if no errors occurred.""") From f6c7f96a24d2590727d9a5f538c034359ef24489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 8 Oct 2024 15:39:29 +0200 Subject: [PATCH 5/6] Fix greedy Regex parsing --- new_version.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/new_version.py b/new_version.py index 46e6c7ae4e..a261c99add 100755 --- a/new_version.py +++ b/new_version.py @@ -70,9 +70,11 @@ break OLD_VERSION_SUFFIX = f"(-{OLD_VERSION_TAG})?" if OLD_VERSION_TAG else "" +# The order of the alternatives is important, since the Regex parser +# should greedily include the old version suffix OLD_VERSION_STR = \ - f"({re.escape(OLD_VERSION_STR_README)})" + \ - f"|({re.escape(OLD_VERSION_STR_CMAKE)}{OLD_VERSION_SUFFIX})" + f"({re.escape(OLD_VERSION_STR_CMAKE)}{OLD_VERSION_SUFFIX})" + \ + f"|({re.escape(OLD_VERSION_STR_README)})" print(f"The old version is: {OLD_VERSION_STR}") print() From dd8b4c8c48fc2519c04b3fed970e4daddadeac74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Thu, 10 Oct 2024 18:20:28 +0200 Subject: [PATCH 6/6] Changelog: Add PRs #1681 #1679 #1678 --- CHANGELOG.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0dc16f88a9..0c1ea69822 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,19 @@ New Backends, Extension, Perf. & Memory This is the 0.16.0 release but with internal version bumps where they were missing. +Changes to "0.15.0" +^^^^^^^^^^^^^^^^^^^ + +Bug Fixes +""""""""" + +- Fix CMake variables for controlling internal dependencies #1678 +- Bump toml11 dependency to v4.2.0 by default #1679 + +Other +""""" + +- Replace deprecated Python unittest API call #1681 0.16.0 ------