Skip to content

Commit 01b1747

Browse files
committed
link to images from current version
1 parent e225e5a commit 01b1747

File tree

10 files changed

+23
-15
lines changed

10 files changed

+23
-15
lines changed

.github/scripts/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
print("release=no")
2626
break
2727
else:
28-
print("release=yes")
28+
print(f"release={version}")
2929
symfem.create_git_ref(ref=f"refs/heads/v{version}-changelog", sha=branch.commit.sha)
3030
new_branch = symfem.get_branch(f"v{version}-changelog")
3131
changelog_file = symfem.get_contents("CHANGELOG_SINCE_LAST_VERSION.md", new_branch.commit.sha)

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929

3030
- name: Trigger Read the Docs build
3131
run: python .github/scripts/trigger_rtd_build.py ${{ secrets.RTDS_TOKEN }}
32-
if: steps.version-check.outputs.release == 'yes'
32+
if: steps.version-check.outputs.release != 'no'
3333

3434
- name: Prepare release
35-
run: python3 prepare_release.py
35+
run: python3 prepare_release.py --version ${{ steps.version-check.outputs.release }}
3636
- name: Build a wheel for PyPI
3737
run: |
3838
python3 -m pip install build
3939
python3 -m build .
40-
if: steps.version-check.outputs.release == 'yes'
40+
if: steps.version-check.outputs.release != 'no'
4141
- name: Publish to PyPI
4242
uses: pypa/gh-action-pypi-publish@release/v1
43-
if: steps.version-check.outputs.release == 'yes'
43+
if: steps.version-check.outputs.release != 'no'

.github/workflows/test-packages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: ${{ matrix.python-version }}
1919
- uses: actions/checkout@v4
2020
with:
21-
ref: v2023.12.8
21+
ref: v2023.12.9
2222
name: Get latest Symfem version
2323
- run: rm -rf symfem VERSION
2424
name: Remove downloaded symfem
@@ -51,7 +51,7 @@ jobs:
5151
activate-environment: symfem
5252
- uses: actions/checkout@v4
5353
with:
54-
ref: v2023.12.8
54+
ref: v2023.12.9
5555
name: Get latest Symfem version
5656
- run: rm -rf symfem VERSION
5757
name: Remove downloaded symfem
@@ -82,7 +82,7 @@ jobs:
8282
with:
8383
python-version: ${{ matrix.python-version }}
8484
- run: |
85-
wget -O symfem.tar.gz https://pypi.io/packages/source/s/symfem/symfem-2023.12.8.tar.gz
85+
wget -O symfem.tar.gz https://pypi.io/packages/source/s/symfem/symfem-2023.12.9.tar.gz
8686
tar -xvzf symfem.tar.gz
8787
name: Download and unpack latest version of Symfem
8888
- name: Install LaTeΧ
@@ -92,7 +92,7 @@ jobs:
9292
- run: pip install pytest
9393
name: Install pytest
9494
- run: |
95-
cd symfem-2023.12.8
95+
cd symfem-2023.12.9
9696
pip install .[optional]
9797
python3 -m pytest test/
9898
name: Install requirements, run tests and demos

CHANGELOG_SINCE_LAST_VERSION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Link to images from correct version

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
given-names: Matthew W.
66
orcid: 0000-0002-4658-2443
77
title: Symfem
8-
version: 2023.12.8
8+
version: 2023.12.9
99
date-released: 2023-12-18
1010
license: MIT
1111
url: https://github.com/mscroggs/symfem

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023.12.8
1+
2023.12.9

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld", "@type": "Code", "author": [{"@id": "0000-0002-4658-2443", "@type": "Person", "email": "[email protected]", "name": "Matthew Scroggs", "affiliation": "Department of Engineering, University of Cambridge"}], "identifier": "", "codeRepository": "https://github.com/mscroggs/symfem", "datePublished": "2021-01-23", "dateModified": "2023-12-18", "dateCreated": "2021-01-23", "description": "A symbolic finite element definition library", "keywords": "Python, finite element method, numerical analysis", "license": "MIT", "title": "Symfem", "version": "2023.12.8"}
1+
{"@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld", "@type": "Code", "author": [{"@id": "0000-0002-4658-2443", "@type": "Person", "email": "[email protected]", "name": "Matthew Scroggs", "affiliation": "Department of Engineering, University of Cambridge"}], "identifier": "", "codeRepository": "https://github.com/mscroggs/symfem", "datePublished": "2021-01-23", "dateModified": "2023-12-18", "dateCreated": "2021-01-23", "description": "A symbolic finite element definition library", "keywords": "Python, finite element method, numerical analysis", "license": "MIT", "title": "Symfem", "version": "2023.12.9"}

prepare_release.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
"""Script to prepare files for uploading to PyPI."""
22

3+
import argparse
4+
5+
parser = argparse.ArgumentParser(description="Build defelement.com")
6+
parser.add_argument('version', metavar='version',
7+
default="main", help="Symfem version.")
8+
version = parser.parse_arge["version"]
9+
310
with open("README.md") as f:
411
parts = f.read().split("](")
512

@@ -8,7 +15,7 @@
815
for p in parts[1:]:
916
content += "]("
1017
if not p.startswith("http"):
11-
content += "https://raw.githubusercontent.com/mscroggs/symfem/main/"
18+
content += f"https://raw.githubusercontent.com/mscroggs/symfem/v{version}/"
1219
content += p
1320

1421
with open("README.md", "w") as f:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
44

55
[project]
66
name = "symfem"
7-
version = "2023.12.8"
7+
version = "2023.12.9"
88
description = "a symbolic finite element definition library"
99
readme = "README.md"
1010
requires-python = ">=3.8.0"

symfem/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version number."""
22

3-
version = "2023.12.8"
3+
version = "2023.12.9"

0 commit comments

Comments
 (0)