Skip to content

Commit dec8487

Browse files
authored
Merge pull request #4611 from firedrakeproject/connorjward/merge-release
Merge release
2 parents 61ff76a + 469c5bd commit dec8487

9 files changed

Lines changed: 70 additions & 65 deletions

File tree

.github/workflows/core.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ jobs:
8282
OMP_NUM_THREADS: 1
8383
OPENBLAS_NUM_THREADS: 1
8484
FIREDRAKE_CI: 1
85-
PYOP2_CI_TESTS: 1
8685
PYOP2_SPMD_STRICT: 1
8786
# NOTE: One should occasionally update test_durations.json by running
8887
# 'make test_durations' inside a 'firedrake:latest' Docker image.
@@ -134,17 +133,6 @@ jobs:
134133
exit 1
135134
fi
136135
137-
# Raise an error if any 'TODO RELEASE' comments remain
138-
- name: Check no 'TODO RELEASE' comments (release only)
139-
if: inputs.target_branch == 'release'
140-
working-directory: firedrake-repo
141-
run: |
142-
if [ -z "$( grep -r --exclude-dir='.*' 'TODO RELEASE' )" ]; then
143-
exit 0
144-
else
145-
exit 1
146-
fi
147-
148136
- name: Install system dependencies (2)
149137
run: |
150138
apt-get -y install \

.github/workflows/docker.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,11 @@ jobs:
4141
matrix:
4242
os: [Linux, macOS]
4343
arch: [default, complex]
44-
platform: [linux/amd64, linux/arm64]
45-
# Cannot use inputs in exclude clauses, so add a dummy matrix dim
46-
build_dev:
47-
- ${{ inputs.build_dev }}
48-
# exclude incompatible os+platform, and only build linux dev containers
49-
exclude:
50-
- os: Linux
51-
platform: linux/arm64
52-
- os: macOS
53-
platform: linux/amd64
54-
- os: macOS
55-
build_dev: true
44+
include:
45+
- os: Linux
46+
platform: linux/amd64
47+
- os: macOS
48+
platform: linux/arm64
5649
uses: ./.github/workflows/docker_build.yml
5750
with:
5851
os: ${{ matrix.os }}

.github/workflows/release.yml

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,72 @@
11
name: Publish release
22

33
on:
4-
release:
5-
types: [released]
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: The branch to release from
8+
type: string
9+
required: true
10+
version:
11+
description: The version number to release
12+
type: string
13+
required: true
614

715
jobs:
8-
deploy:
16+
check:
17+
name: Pre-release checks
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v5
21+
with:
22+
path: firedrake-repo
23+
ref: ${{ inputs.branch }}
24+
25+
- name: Check no 'TODO RELEASE' comments remain
26+
working-directory: firedrake-repo
27+
run: |
28+
if [ -z "$( grep -r --exclude-dir='.*' 'TODO RELEASE' )" ]; then
29+
exit 0
30+
else
31+
exit 1
32+
fi
33+
34+
- name: Check version number matches
35+
working-directory: firedrake-repo
36+
run: |
37+
if [ -z "$( grep 'version = \"${{ inputs.version }}\"' pyproject.toml )" ]; then
38+
exit 1
39+
else
40+
exit 0
41+
fi
42+
43+
pypi:
944
uses: ./.github/workflows/core.yml
45+
needs: check
1046
with:
11-
source_ref: release
47+
source_ref: ${{ inputs.branch }}
1248
target_branch: release
1349
run_tests: false
1450
upload_pypi: true
1551
secrets: inherit
1652

53+
github_release:
54+
name: Create GitHub release
55+
needs: pypi
56+
runs-on: ubuntu-latest
57+
permissions:
58+
contents: write
59+
steps:
60+
- name: Create release
61+
env:
62+
GH_TOKEN: ${{ github.token }}
63+
run: gh release create ${{ inputs.version }} --title ${{ inputs.version }} --generate-notes
64+
1765
docker:
1866
name: Build Docker containers
1967
uses: ./.github/workflows/docker.yml
68+
needs: pypi
2069
with:
21-
tag: ${{ github.ref_name }}
22-
branch: ${{ github.ref_name }}
23-
build_dev: false
70+
tag: ${{ inputs.version }}
71+
branch: ${{ inputs.branch }}
2472
secrets: inherit

docker/Dockerfile.vanilla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,5 @@ ENV PYOP2_CFLAGS=$CFLAGS
168168

169169
# Run the smoke tests.
170170
RUN cd /opt/firedrake/ \
171-
&& firedrake-check \
171+
&& firedrake-check --mpiexec 'mpiexec --oversubscribe -n' \
172172
&& firedrake-clean

firedrake/interpolation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ def interpolate(expr, V, subset=None, access=None, allow_missing_dofs=False, def
205205
class Interpolator(abc.ABC):
206206
"""A reusable interpolation object.
207207
208+
This object can be used to carry out the same interpolation
209+
multiple times (for example in a timestepping loop).
210+
208211
Parameters
209212
----------
210213
expr
@@ -249,11 +252,8 @@ class Interpolator(abc.ABC):
249252
between a VOM and its input ordering. Defaults to ``True`` which uses SF broadcast
250253
and reduce operations.
251254
252-
This object can be used to carry out the same interpolation
253-
multiple times (for example in a timestepping loop).
254-
255-
Note
256-
----
255+
Notes
256+
-----
257257
258258
The :class:`Interpolator` holds a reference to the provided
259259
arguments (such that they won't be collected until the

pyop2/caching.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
# OF THE POSSIBILITY OF SUCH DAMAGE.
3333

3434
"""Provides common base classes for cached objects."""
35-
import atexit
3635
import cachetools
3736
import functools
3837
import hashlib
@@ -61,9 +60,6 @@
6160
_CACHE_CIDX = count()
6261
_KNOWN_CACHES = []
6362

64-
# Flag for outputting information at the end of testing (do not abuse!)
65-
_running_on_ci = bool(os.environ.get('PYOP2_CI_TESTS'))
66-
6763

6864
# FIXME: (Later) Remove ObjectCached
6965
class ObjectCached(object):
@@ -312,10 +308,6 @@ def print_cache_stats(*args, **kwargs):
312308
print(hline)
313309

314310

315-
if _running_on_ci:
316-
print_cache_stats = atexit.register(print_cache_stats)
317-
318-
319311
class _CacheMiss:
320312
pass
321313

@@ -488,7 +480,7 @@ class DEFAULT_CACHE(dict):
488480
# EXOTIC_CACHE = partial(instrument(cachetools.LRUCache), maxsize=100)
489481

490482
# Turn on cache measurements if printing cache info is enabled
491-
if configuration["print_cache_info"] or _running_on_ci:
483+
if configuration["print_cache_info"]:
492484
DEFAULT_CACHE = instrument(DEFAULT_CACHE)
493485
DictLikeDiskAccess = instrument(DictLikeDiskAccess)
494486

pyop2/mpi.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@
7676
_DUPED_COMM_DICT = {}
7777
# Flag to indicate whether we are in cleanup (at exit)
7878
PYOP2_FINALIZED = False
79-
# Flag for outputting information at the end of testing (do not abuse!)
80-
_running_on_ci = bool(os.environ.get('PYOP2_CI_TESTS'))
8179

8280

8381
class PyOP2CommError(ValueError):
@@ -549,12 +547,10 @@ def finalize_safe_debug():
549547
finished writing debug information. In this case we fall back to using the
550548
Python `print` function to output debugging information.
551549
552-
Furthermore, we always want to see this finalization information when
553-
running the CI tests.
554550
'''
555551
global debug
556552
if PYOP2_FINALIZED:
557-
if logger.level > DEBUG and not _running_on_ci:
553+
if logger.level > DEBUG:
558554
debug = lambda string: None
559555
else:
560556
debug = lambda string: print(string)

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[project]
22
name = "firedrake"
33
# <year>.<month>.<patch>
4+
# TODO RELEASE: remove '.dev0'
45
version = "2025.5.0.dev0"
56
description = "An automated system for the portable solution of partial differential equations using the finite element method"
67
readme = "README.rst"
@@ -77,7 +78,7 @@ docs = [
7778
"matplotlib", # needed to resolve API
7879
"numpydoc",
7980
"pylit",
80-
"sphinx<8.2.0", # https://github.com/firedrakeproject/firedrake/issues/4059
81+
"sphinx",
8182
"sphinx-autobuild",
8283
"sphinx-reredirects",
8384
"sphinxcontrib-bibtex",

scripts/check-config

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,12 @@ class InvalidConfigurationException(Exception):
2020

2121

2222
def main():
23-
# TODO RELEASE
24-
# check_firedrake_version()
2523
check_min_python_version()
2624
check_petsc_version()
2725
check_slepc_version()
2826
check_petsc_version_spec()
2927

3028

31-
def check_firedrake_version():
32-
firedrake_version = check_file_contains_pattern(
33-
REPO_ROOT / "pyproject.toml",
34-
"version = \"(.*)\""
35-
)
36-
check_file_contains_pattern(
37-
REPO_ROOT/"docs/source/install.rst",
38-
f"https://raw.githubusercontent.com/firedrakeproject/firedrake/refs/tags/{firedrake_version}/scripts/firedrake-configure"
39-
)
40-
41-
4229
def check_min_python_version() -> None:
4330
min_python_version = check_file_contains_pattern(
4431
REPO_ROOT / "pyproject.toml",

0 commit comments

Comments
 (0)