Skip to content

Commit a56ca8d

Browse files
authored
Release 25.01 (#5544)
Prepare the January release of WarpX: ```bash # update dependencies ./Tools/Release/updateAMReX.py ./Tools/Release/updatePICSAR.py # no changes, still 24.09 ./Tools/Release/updatepyAMReX.py # bump version number ./Tools/Release/newVersion.sh ``` Following this workflow: https://warpx.readthedocs.io/en/latest/maintenance/release.html
1 parent 499fcb0 commit a56ca8d

File tree

9 files changed

+214
-11
lines changed

9 files changed

+214
-11
lines changed

.github/workflows/cuda.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
which nvcc || echo "nvcc not in PATH!"
128128
129129
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
130-
cd ../amrex && git checkout --detach b3f67385e62f387b548389222840486c0fffca57 && cd -
130+
cd ../amrex && git checkout --detach 25.01 && cd -
131131
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_FFT=TRUE USE_CCACHE=TRUE -j 4
132132
133133
ccache -s

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Preamble ####################################################################
22
#
33
cmake_minimum_required(VERSION 3.24.0)
4-
project(WarpX VERSION 24.12)
4+
project(WarpX VERSION 25.01)
55

66
include(${WarpX_SOURCE_DIR}/cmake/WarpXFunctions.cmake)
77

Docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ def __init__(self, *args, **kwargs):
107107
# built documents.
108108
#
109109
# The short X.Y version.
110-
version = "24.12"
110+
version = "25.01"
111111
# The full version, including alpha/beta/rc tags.
112-
release = "24.12"
112+
release = "25.01"
113113

114114
# The language for content autogenerated by Sphinx. Refer to documentation
115115
# for a list of supported languages.

Docs/source/maintenance/release.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In order to create a GitHub release, you need to:
2828
1. Create a new branch from ``development`` and update the version number in all source files.
2929
We usually wait for the AMReX release to be tagged first, then we also point to its tag.
3030

31-
There is a script for updating core dependencies of WarpX and the WarpX version:
31+
There are scripts for updating core dependencies of WarpX and the WarpX version:
3232

3333
.. code-block:: sh
3434
@@ -42,6 +42,9 @@ In order to create a GitHub release, you need to:
4242

4343
Then open a PR, wait for tests to pass and then merge.
4444

45+
The maintainer script ``Tools/Release/releasePR.py`` automates the steps above.
46+
Please read through the instructions in the script before running.
47+
4548
2. **Local Commit** (Optional): at the moment, ``@ax3l`` is managing releases and signs tags (naming: ``YY.MM``) locally with his GPG key before uploading them to GitHub.
4649

4750
**Publish**: On the `GitHub Release page <https://github.com/ECP-WarpX/WarpX/releases>`__, create a new release via ``Draft a new release``.

Python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
setup(
6767
name="pywarpx",
68-
version="24.12",
68+
version="25.01",
6969
packages=["pywarpx"],
7070
package_dir={"pywarpx": "pywarpx"},
7171
description="""Wrapper of WarpX""",

Tools/Release/releasePR.py

+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright 2025 The WarpX Community
4+
#
5+
# This file is part of WarpX.
6+
#
7+
# Authors: Axel Huebl
8+
#
9+
10+
# This file is a maintainer tool to open a release PR for WarpX.
11+
# It is highly automated and does a few assumptions, e.g., that you
12+
# are releasing for the current month.
13+
#
14+
# You also need to have git and the GitHub CLI tool "gh" installed and properly
15+
# configured for it to work:
16+
# https://cli.github.com/
17+
#
18+
import subprocess
19+
import sys
20+
from datetime import datetime
21+
from pathlib import Path
22+
23+
# Maintainer Inputs ###########################################################
24+
25+
print("""Hi there, this is a WarpX maintainer tool to ...\n.
26+
For it to work, you need write access on the source directory and
27+
you should be working in a clean git branch without ongoing
28+
rebase/merge/conflict resolves and without unstaged changes.""")
29+
30+
# check source dir
31+
REPO_DIR = Path(__file__).parent.parent.parent.absolute()
32+
print(f"\nYour current source directory is: {REPO_DIR}")
33+
34+
REPLY = input("Are you sure you want to continue? [y/N] ")
35+
print()
36+
if REPLY not in ["Y", "y"]:
37+
print("You did not confirm with 'y', aborting.")
38+
sys.exit(1)
39+
40+
release_repo = input("What is the name of your git remote? (e.g., ax3l) ")
41+
commit_sign = input("How to sign the commit? (e.g., -sS) ")
42+
43+
44+
# Helpers #####################################################################
45+
46+
47+
def concat_answers(answers):
48+
return "\n".join(answers) + "\n"
49+
50+
51+
# Stash current work ##########################################################
52+
53+
subprocess.run(["git", "stash"], capture_output=True, text=True)
54+
55+
56+
# Git Branch ##################################################################
57+
58+
WarpX_version_yr = f"{datetime.now().strftime('%y')}"
59+
WarpX_version_mn = f"{datetime.now().strftime('%m')}"
60+
WarpX_version = f"{WarpX_version_yr}.{WarpX_version_mn}"
61+
release_branch = f"release-{WarpX_version}"
62+
subprocess.run(["git", "checkout", "development"], capture_output=True, text=True)
63+
subprocess.run(["git", "fetch"], capture_output=True, text=True)
64+
subprocess.run(["git", "pull", "--ff-only"], capture_output=True, text=True)
65+
subprocess.run(["git", "branch", "-D", release_branch], capture_output=True, text=True)
66+
subprocess.run(
67+
["git", "checkout", "-b", release_branch], capture_output=True, text=True
68+
)
69+
70+
71+
# AMReX New Version ###########################################################
72+
73+
AMReX_version = f"{datetime.now().strftime('%y')}.{datetime.now().strftime('%m')}"
74+
answers = concat_answers(["y", AMReX_version, AMReX_version, "y"])
75+
76+
process = subprocess.Popen(
77+
[Path(REPO_DIR).joinpath("Tools/Release/updateAMReX.py")],
78+
stdin=subprocess.PIPE,
79+
stdout=subprocess.PIPE,
80+
stderr=subprocess.PIPE,
81+
text=True,
82+
)
83+
84+
process.communicate(answers)
85+
del process
86+
87+
# commit
88+
subprocess.run(["git", "add", "-u"], capture_output=True, text=True)
89+
subprocess.run(
90+
["git", "commit", commit_sign, "-m", f"AMReX: {AMReX_version}"], text=True
91+
)
92+
93+
94+
# PICSAR New Version ##########################################################
95+
96+
PICSAR_version = "24.09"
97+
answers = concat_answers(["y", PICSAR_version, PICSAR_version, "y"])
98+
99+
process = subprocess.Popen(
100+
[Path(REPO_DIR).joinpath("Tools/Release/updatePICSAR.py")],
101+
stdin=subprocess.PIPE,
102+
stdout=subprocess.PIPE,
103+
stderr=subprocess.PIPE,
104+
text=True,
105+
)
106+
107+
process.communicate(answers)
108+
del process
109+
110+
# commit
111+
subprocess.run(["git", "add", "-u"], capture_output=True, text=True)
112+
subprocess.run(
113+
["git", "commit", commit_sign, "-m", f"PICSAR: {PICSAR_version}"], text=True
114+
)
115+
116+
117+
# pyAMReX New Version #########################################################
118+
119+
pyAMReX_version = f"{datetime.now().strftime('%y')}.{datetime.now().strftime('%m')}"
120+
answers = concat_answers(["y", pyAMReX_version, pyAMReX_version, "y"])
121+
122+
process = subprocess.Popen(
123+
[Path(REPO_DIR).joinpath("Tools/Release/updatepyAMReX.py")],
124+
stdin=subprocess.PIPE,
125+
stdout=subprocess.PIPE,
126+
stderr=subprocess.PIPE,
127+
text=True,
128+
)
129+
130+
process.communicate(answers)
131+
del process
132+
133+
# commit
134+
subprocess.run(["git", "add", "-u"], capture_output=True, text=True)
135+
subprocess.run(
136+
["git", "commit", commit_sign, "-m", f"pyAMReX: {pyAMReX_version}"], text=True
137+
)
138+
139+
140+
# WarpX New Version ###########################################################
141+
142+
answers = concat_answers(["y", WarpX_version_yr, WarpX_version_mn, "", "", "y"])
143+
144+
process = subprocess.Popen(
145+
[Path(REPO_DIR).joinpath("Tools/Release/newVersion.sh")],
146+
stdin=subprocess.PIPE,
147+
stdout=subprocess.PIPE,
148+
stderr=subprocess.PIPE,
149+
text=True,
150+
)
151+
152+
process.communicate(answers)
153+
del process
154+
155+
# commit
156+
subprocess.run(["git", "add", "-u"], capture_output=True, text=True)
157+
subprocess.run(
158+
["git", "commit", commit_sign, "-m", f"WarpX: {WarpX_version}"], text=True
159+
)
160+
161+
162+
# GitHub PR ###################################################################
163+
164+
subprocess.run(["git", "push", "-u", release_repo, release_branch], text=True)
165+
166+
subprocess.run(
167+
[
168+
"gh",
169+
"pr",
170+
"create",
171+
"--title",
172+
f"Release {WarpX_version}",
173+
"--body",
174+
f"""Prepare the {datetime.now().strftime('%B')} release of WarpX:
175+
```bash
176+
# update dependencies
177+
./Tools/Release/updateAMReX.py
178+
./Tools/Release/updatePICSAR.py # no changes, still {PICSAR_version}
179+
./Tools/Release/updatepyAMReX.py
180+
# bump version number
181+
./Tools/Release/newVersion.sh
182+
```
183+
184+
Following this workflow: https://warpx.readthedocs.io/en/latest/maintenance/release.html
185+
""",
186+
"--label",
187+
"component: documentation",
188+
"--label",
189+
"component: third party",
190+
"--web",
191+
],
192+
text=True,
193+
)
194+
195+
196+
# Epilogue ####################################################################
197+
198+
print("""Done. Please check your source, e.g. via
199+
git diff
200+
now and commit the changes if no errors occurred.""")

cmake/dependencies/AMReX.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ macro(find_amrex)
271271
endif()
272272
set(COMPONENT_PRECISION ${WarpX_PRECISION} P${WarpX_PARTICLE_PRECISION})
273273

274-
find_package(AMReX 24.12 CONFIG REQUIRED COMPONENTS ${COMPONENT_ASCENT} ${COMPONENT_CATALYST} ${COMPONENT_DIMS} ${COMPONENT_EB} ${COMPONENT_FFT} PARTICLES ${COMPONENT_PIC} ${COMPONENT_PRECISION} ${COMPONENT_SENSEI} LSOLVERS)
274+
find_package(AMReX 25.01 CONFIG REQUIRED COMPONENTS ${COMPONENT_ASCENT} ${COMPONENT_CATALYST} ${COMPONENT_DIMS} ${COMPONENT_EB} ${COMPONENT_FFT} PARTICLES ${COMPONENT_PIC} ${COMPONENT_PRECISION} ${COMPONENT_SENSEI} LSOLVERS)
275275
# note: TINYP skipped because user-configured and optional
276276

277277
# AMReX CMake helper scripts
@@ -294,7 +294,7 @@ set(WarpX_amrex_src ""
294294
set(WarpX_amrex_repo "https://github.com/AMReX-Codes/amrex.git"
295295
CACHE STRING
296296
"Repository URI to pull and build AMReX from if(WarpX_amrex_internal)")
297-
set(WarpX_amrex_branch "b3f67385e62f387b548389222840486c0fffca57"
297+
set(WarpX_amrex_branch "25.01"
298298
CACHE STRING
299299
"Repository branch for WarpX_amrex_repo if(WarpX_amrex_internal)")
300300

cmake/dependencies/pyAMReX.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function(find_pyamrex)
5959
endif()
6060
elseif(NOT WarpX_pyamrex_internal)
6161
# TODO: MPI control
62-
find_package(pyAMReX 24.12 CONFIG REQUIRED)
62+
find_package(pyAMReX 25.01 CONFIG REQUIRED)
6363
message(STATUS "pyAMReX: Found version '${pyAMReX_VERSION}'")
6464
endif()
6565
endfunction()
@@ -74,7 +74,7 @@ option(WarpX_pyamrex_internal "Download & build pyAMReX" ON)
7474
set(WarpX_pyamrex_repo "https://github.com/AMReX-Codes/pyamrex.git"
7575
CACHE STRING
7676
"Repository URI to pull and build pyamrex from if(WarpX_pyamrex_internal)")
77-
set(WarpX_pyamrex_branch "cba1ca5098fd4edc83b2ae630c0391140fac55f4"
77+
set(WarpX_pyamrex_branch "25.01"
7878
CACHE STRING
7979
"Repository branch for WarpX_pyamrex_repo if(WarpX_pyamrex_internal)")
8080

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def build_extension(self, ext):
280280
setup(
281281
name="pywarpx",
282282
# note PEP-440 syntax: x.y.zaN but x.y.z.devN
283-
version="24.12",
283+
version="25.01",
284284
packages=["pywarpx"],
285285
package_dir={"pywarpx": "Python/pywarpx"},
286286
author="Jean-Luc Vay, David P. Grote, Maxence Thévenet, Rémi Lehe, Andrew Myers, Weiqun Zhang, Axel Huebl, et al.",

0 commit comments

Comments
 (0)