Skip to content

Commit 80fc942

Browse files
authored
Merge pull request #4962 from firedrakeproject/connorjward/merge-release
2 parents 0e715b4 + 27911a2 commit 80fc942

8 files changed

Lines changed: 52940 additions & 53202 deletions

File tree

.github/workflows/core.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,6 @@ jobs:
182182
: # Empty the pip cache to ensure that everything is compiled from scratch
183183
pip cache purge
184184
185-
: # Fix for petsc4py+slepc4py build
186-
echo 'setuptools<81' > constraints.txt
187-
export PIP_CONSTRAINT=constraints.txt
188-
189185
if [ ${{ inputs.target_branch }} = 'release' ]; then
190186
EXTRA_BUILD_ARGS=''
191187
EXTRA_PIP_FLAGS=''
@@ -440,10 +436,6 @@ jobs:
440436
: # Empty the pip cache to ensure that everything is compiled from scratch
441437
pip cache purge
442438
443-
: # Fix for petsc4py+slepc4py build
444-
echo 'setuptools<81' > constraints.txt
445-
export PIP_CONSTRAINT=constraints.txt
446-
447439
if [ ${{ inputs.target_branch }} = 'release' ]; then
448440
EXTRA_PIP_FLAGS=''
449441
else

docker/Dockerfile.vanilla

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
# Extra arguments to pass to PETSc's `configure` script
3737
#
3838
# Example usage for a specific firedrake release with complex scalars:
39-
# $ docker build \
39+
# $ docker build . \
4040
# --file=Dockerfile.vanilla \
4141
# --tag=firedrake:2025.4.2-complex \
4242
# --build-arg ARCH=complex \
4343
# --build-arg BRANCH=2025.4.2
4444
#
4545
# Example usage for building from firedrake main with real scalars, ml installed with PETSc, and valgrind installed with apt:
46-
# $ docker build \
46+
# $ docker build . \
4747
# --file=Dockerfile.vanilla \
4848
# --tag=firedrake:main-latest \
4949
# --build-arg ARCH=default \
@@ -136,28 +136,28 @@ ENV MPICC=mpicc
136136
ENV CFLAGS="-O3 -mtune=generic" CPPFLAGS="-O3 -mtune=generic"
137137

138138
# Install Firedrake
139-
# - petsc4py and slepc4py are installed from source in PETSc repo.
140-
# - slepc4py is installed without build isolation so it links against
141-
# the correct petsc4py version.
139+
# - If installing 'main' then petsc4py and slepc4py are installed from source,
140+
# otherwise they are installed from PyPI. This mirrors our CI.
142141
# - Firedrake main branch requires main/master branch of some upstream
143142
# packages. These are installed in editable mode.
144143
# The order these are installed is important, e.g. FIAT must be installed
145144
# before UFL otherwise `pip install fiat` will reinstall pypi ufl.
146145

147-
# Fix for petsc4py+slepc4py build to be removed after #4873 is resolved.
148-
RUN echo 'setuptools<81' > /opt/constraints.txt
149-
ENV PIP_CONSTRAINT=/opt/constraints.txt
150-
151146
RUN git clone --branch ${BRANCH} \
152147
https://github.com/firedrakeproject/firedrake.git /opt/firedrake \
153-
&& pip cache purge \
154-
&& pip install --verbose ${PETSC_DIR}/src/binding/petsc4py \
155-
&& pip install --verbose -r /opt/firedrake/requirements-build.txt \
156-
&& pip install --verbose --no-build-isolation \
157-
${SLEPC_DIR}/externalpackages/git.slepc/src/binding/slepc4py \
158-
&& pip install --verbose --no-binary h5py --no-build-isolation \
159-
--editable '/opt/firedrake[docker]' || exit; \
160-
if [ ${BRANCH} == "main" ]; then \
148+
&& pip cache purge || exit; \
149+
if [ ${BRANCH} == "main" ]; then \
150+
pip install --verbose ${PETSC_DIR}/src/binding/petsc4py \
151+
&& pip install --verbose -r /opt/firedrake/requirements-build.txt \
152+
&& pip install --verbose --no-build-isolation \
153+
${SLEPC_DIR}/externalpackages/git.slepc/src/binding/slepc4py \
154+
&& pip install --verbose --no-binary h5py --no-build-isolation \
155+
--editable '/opt/firedrake[docker]' || exit; \
156+
else \
157+
pip install --verbose --no-binary h5py \
158+
--editable '/opt/firedrake[docker]' || exit; \
159+
fi; \
160+
if [ ${BRANCH} == "main" ]; then \
161161
for pkg in \
162162
"git+https://github.com/dolfin-adjoint/pyadjoint.git#egg=pyadjoint-ad" \
163163
"git+https://github.com/firedrakeproject/fiat.git#egg=firedrake-fiat" \

docs/notebooks/11-extract-adjoint-solutions.ipynb

Lines changed: 52863 additions & 53148 deletions
Large diffs are not rendered by default.

docs/source/install.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,6 @@ install Firedrake. To do this perform the following steps:
240240
so that it can be detected by mpi4py. See `here <https://mpi4py.readthedocs.io/en/stable/install.html#linux>`__
241241
for more information.
242242

243-
#. Set ``PIP_CONSTRAINT`` to work around
244-
`an issue with setuptools <https://gitlab.com/petsc/petsc/-/merge_requests/9016>`__::
245-
246-
$ echo 'setuptools<81' > constraints.txt
247-
$ export PIP_CONSTRAINT=constraints.txt
248-
249243
#. Install Firedrake::
250244

251245
$ pip install --no-binary h5py 'firedrake[check]'

docs/source/tutorial_mar_26.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ also be possible to join the tutorial using the cloud. Installing `Paraview <htt
2626
Registration
2727
------------
2828

29-
Registration of £25 covers tea, coffee, and biscuits. `Registration is now open on the Oxford online store <https://www.oxforduniversitystores.co.uk/product-catalogue/mathematical-institute/events/solving-partial-differential-equations-with-firedrake>`__.
30-
29+
Registration of £25 covered tea, coffee, and biscuits. Registration closed on 6 March 2026.
3130

3231
Where and when
3332
--------------
@@ -62,7 +61,7 @@ Thu Mar 19 (room L4)
6261
+-------------+-------------------------------------+
6362
| Time | Session |
6463
+=============+=====================================+
65-
| 09:00-10:45 | Surface integrals. Nonlinearity |
64+
| 09:00-10:45 | Boundaries. Nonlinearity |
6665
+-------------+-------------------------------------+
6766
| 10:45-11:15 | Coffee break |
6867
+-------------+-------------------------------------+

firedrake/scripts/firedrake-zenodo

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import os
1212
import subprocess
1313
from argparse import ArgumentParser, RawDescriptionHelpFormatter
1414
import json
15+
import textwrap
1516
import time
1617
import requests
1718
import base64
@@ -791,13 +792,25 @@ def generate_unique_release_tag() -> str:
791792
def check_ref_exists(component):
792793
if "version" in shas[component]:
793794
# component is versioned, a GitHub release should already exist
794-
if not release_already_exists(component, shas[component]["version"]):
795-
log.error(
796-
f"A release of {component} is referenced but no corresponding "
797-
"release on GitHub can be found. For repositories we do not own "
798-
"(e.g. PETSc) it will be necessary to push the release tags to "
799-
"the Firedrake fork before making a release."
795+
version = shas[component]["version"]
796+
if not release_already_exists(component, version):
797+
msg = textwrap.dedent(
798+
f"""\
799+
Release {shas[component]['version']} of {component} is
800+
referenced but no corresponding release on GitHub can be
801+
found. To fix this you have to update the fork and create the
802+
release. Assuming that you have added the upstream repository
803+
as a remote called 'upstream' the steps you have to follow are:
804+
805+
1. git fetch upstream
806+
2. git push --tags
807+
3. gh release create {version} --latest=false --prerelease --title {version} --repo firedrakeproject/{component}
808+
809+
Where 'gh' is the GitHub CLI tool.
810+
811+
"""
800812
)
813+
log.error(msg)
801814
sys.exit(1)
802815
else:
803816
repo = get_component_repository(component)
@@ -832,7 +845,7 @@ def make_github_release_or_tag_existing(component: str) -> None:
832845
if tag_existing_release:
833846
log.info(f"Commit '{commit_id}' found in a pre-existing release for "
834847
f"'{component}', adding tag '{release_tag}' to it")
835-
date = datetime.datetime.utcnow().replace(microsecond=0, tzinfo=datetime.timezone.utc).isoformat()
848+
date = datetime.datetime.now(datetime.UTC).replace(microsecond=0, tzinfo=datetime.timezone.utc).isoformat()
836849
tagger = {"name": "firedrake-zenodo",
837850
"email": "firedrake@imperial.ac.uk",
838851
"date": date}
@@ -850,13 +863,38 @@ def make_github_release_or_tag_existing(component: str) -> None:
850863
"or any of its dependencies. Instead, refer to "
851864
"https://www.firedrakeproject.org/citing.html"
852865
)
853-
repo.create_release(
854-
tag_name=release_tag,
855-
target_commitish=commit_id,
856-
name=DESCRIPTIONS[component],
857-
body=body,
858-
draft=False,
859-
prerelease=True)
866+
try:
867+
repo.create_release(
868+
tag_name=release_tag,
869+
target_commitish=commit_id,
870+
name=DESCRIPTIONS[component],
871+
body=body,
872+
draft=False,
873+
prerelease=True)
874+
except github3.exceptions.NotFoundError:
875+
# The GitHub API is buggy and this will occasionally fail
876+
msg = textwrap.dedent(f"""\
877+
Failed to create a release for {component}, this will have to
878+
be done manually:
879+
880+
1. Tag the relevant commit:
881+
882+
a. git clone git@github.com:firedrakeproject/{component}.git
883+
b. cd {component}
884+
c. git tag {release_tag} {commit_id}
885+
d. git push --tags
886+
887+
2. Make a prerelease on GitHub using this tag. The release name
888+
should be:
889+
890+
'{DESCRIPTIONS[component]}'
891+
892+
and the text should be:
893+
894+
{body}
895+
896+
""")
897+
log.error(msg)
860898

861899

862900
def make_releases() -> None:

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131
"numpy",
3232
"packaging",
3333
# TODO RELEASE
34-
# "petsc4py==3.24.0",
34+
# "petsc4py==3.24.5",
3535
"petsctools @ git+https://github.com/firedrakeproject/petsctools.git@main",
3636
"pkgconfig",
3737
"progress",
@@ -98,7 +98,7 @@ jax = [
9898
# ]
9999
# TODO RELEASE
100100
# slepc = [
101-
# "slepc4py==3.24.0",
101+
# "slepc4py==3.24.3",
102102
# ]
103103
torch = [ # requires passing '--extra-index-url' to work
104104
"torch",
@@ -127,7 +127,7 @@ ci = [
127127
"pytest-timeout",
128128
"pytest-xdist",
129129
# TODO RELEASE
130-
# "slepc4py==3.24.0",
130+
# "slepc4py==3.24.3",
131131
"torch", # requires passing '--extra-index-url' to work
132132
"vtk",
133133
]
@@ -147,7 +147,7 @@ docker = [ # Used in firedrake-vanilla container
147147
"pytest-timeout",
148148
"pytest-xdist",
149149
# TODO RELEASE
150-
# "slepc4py==3.24.0",
150+
# "slepc4py==3.24.3",
151151
"vtk",
152152
]
153153

@@ -159,7 +159,7 @@ requires = [
159159
"mpi4py; python_version < '3.13'",
160160
"numpy",
161161
# TODO RELEASE
162-
# "petsc4py==3.24.0",
162+
# "petsc4py==3.24.5",
163163
"petsctools",
164164
"pkgconfig",
165165
"pybind11",

scripts/firedrake-configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ARCH_DEFAULT = FiredrakeArch.DEFAULT
3939
ARCH_COMPLEX = FiredrakeArch.COMPLEX
4040

4141

42-
SUPPORTED_PETSC_VERSION = "v3.24.0"
42+
SUPPORTED_PETSC_VERSION = "v3.24.5"
4343

4444

4545
def main():

0 commit comments

Comments
 (0)