Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/scripts/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import sys
import github
from datetime import datetime

access_key = sys.argv[-1]

Expand All @@ -22,6 +23,24 @@
if release.tag_name == f"v{version}":
break
else:
changelog_file = symfem.get_contents("CHANGELOG_SINCE_LAST_VERSION.md", branch.commit.sha)
changes = changelog_file.decoded_content.decode("utf8").strip()
if changes == "":
changes = "- Released new version of Symfem"
symfem.create_git_tag_and_release(
f"v{version}", f"Version {version}", f"Version {version}", "Latest release",
f"v{version}", f"Version {version}", f"Version {version}", changes,
branch.commit.sha, "commit")

old_changelog_file = symfem.get_contents("CHANGELOG.md", branch.commit.sha)
old_changes = old_changelog_file.decoded_content.decode("utf8").strip()

new_changelog = (f"# Version {version} ({datetime.now().strftime('%d %B %Y')})\n\n"
f"{changes}\n\n{old_changes}")

symfem.update_file(
"CHANGELOG.md", "Update CHANGELOG.md", new_changelog, sha=old_changelog_file.sha
)
symfem.update_file(
"CHANGELOG_SINCE_LAST_VERSION.md", "Reset CHANGELOG_SINCE_LAST_VERSION.md", "",
sha=changelog_file.sha
)
8 changes: 4 additions & 4 deletions .github/workflows/test-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
with:
ref: v2021.7.6
ref: v2021.8.1
name: Get latest Symfem version
- run: rm -rf symfem VERSION
name: Remove downloaded symfem
Expand All @@ -45,7 +45,7 @@ jobs:
activate-environment: symfem
- uses: actions/checkout@v2
with:
ref: v2021.7.6
ref: v2021.8.1
name: Get latest Symfem version
- run: rm -rf symfem VERSION
name: Remove downloaded symfem
Expand All @@ -71,13 +71,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: |
wget -O symfem.tar.gz https://pypi.io/packages/source/s/symfem/symfem-2021.7.6.tar.gz
wget -O symfem.tar.gz https://pypi.io/packages/source/s/symfem/symfem-2021.8.1.tar.gz
tar -xvzf symfem.tar.gz
name: Download and unpack latest version of Symfem
- run: pip install pytest
name: Install pytest
- run: |
cd symfem-2021.7.6
cd symfem-2021.8.1
pip install -r requirements.txt
python3 -m pytest test/
name: Install requirements, run tests and demos
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 11 August 2021

- Started keeping changelog
3 changes: 3 additions & 0 deletions CHANGELOG_SINCE_LAST_VERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Added Guzman-Neilan element
- Added nonconforming Arnold-Winther element
- Wrote JOSS paper
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors:
given-names: Matthew W.
orcid: 0000-0002-4658-2443
title: Symfem
version: 2021.7.6
date-released: 2021-07-12
version: 2021.8.1
date-released: 2021-08-11
license: MIT
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.7.6
2021.8.1
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld", "@type": "Code", "author": [{"@id": "0000-0002-4658-2443", "@type": "Person", "email": "mws48@cam.ac.uk", "name": "Matthew Scroggs", "affiliation": "Department of Engineering, University of Cambridge"}], "identifier": "", "codeRepository": "https://github.com/mscroggs/symfem", "datePublished": "2021-01-23", "dateModified": "2021-07-12", "dateCreated": "2021-01-23", "description": "A symbolic finite element definition library", "keywords": "Python, finite element method, numerical analysis", "license": "MIT", "title": "Symfem", "version": "2021.7.6"}
{"@context": "https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld", "@type": "Code", "author": [{"@id": "0000-0002-4658-2443", "@type": "Person", "email": "mws48@cam.ac.uk", "name": "Matthew Scroggs", "affiliation": "Department of Engineering, University of Cambridge"}], "identifier": "", "codeRepository": "https://github.com/mscroggs/symfem", "datePublished": "2021-01-23", "dateModified": "2021-08-11", "dateCreated": "2021-01-23", "description": "A symbolic finite element definition library", "keywords": "Python, finite element method, numerical analysis", "license": "MIT", "title": "Symfem", "version": "2021.8.1"}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
description="a symbolic finite element definition library",
long_description=long_description,
long_description_content_type="text/markdown",
version="2021.7.6",
version="2021.8.1",
author="Matthew Scroggs",
license="MIT",
author_email="symfem@mscroggs.co.uk",
Expand Down
2 changes: 1 addition & 1 deletion symfem/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version number."""

version = "2021.7.6"
version = "2021.8.1"