From 275508ed1f212834625deeb9448350bda7303b48 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Tue, 14 May 2024 15:43:19 +0000 Subject: [PATCH 1/7] preparation for release 0.1.0 --- CHANGELOG.md | 8 +++ CITATION.cff | 45 ++++++++++++++ RELEASE_PROCEDURE.md | 31 ++++++++++ scripts/roll_release.sh | 131 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 CITATION.cff create mode 100644 RELEASE_PROCEDURE.md create mode 100644 scripts/roll_release.sh diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d35b4cd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## DLA-Future-Fortran 0.1.0 + +First release of [DLA-Future-Fortran], a Fortran interface for [DLA-Future]. + +[DLA-Future]: https://github.com/eth-cscs/DLA-Future +[DLA-Future-Fortran]: https://github.com/eth-cscs/DLA-Future-Fortran diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..55ad96d --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,45 @@ +cff-version: 1.2.0 +title: DLA-Future-Fortran 0.1.0 +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: John + family-names: Biddiscombe + orcid: 'https://orcid.org/0000-0002-6552-2833' + - given-names: Alberto + family-names: Invernizzi + orcid: 'https://orcid.org/0009-0004-4948-0313' + - given-names: Rocco + family-names: Meli + orcid: 'https://orcid.org/0000-0002-2845-3410' + - given-names: Auriane + family-names: Reverdell + orcid: 'https://orcid.org/0000-0002-5531-0458' + - given-names: Mikael + family-names: Simberg + orcid: 'https://orcid.org/0000-0002-7238-8935' + - given-names: Raffaele + family-names: SolcĂ  + orcid: 'https://orcid.org/0009-0009-9346-4376' + - given-names: Mathieu + family-names: Taillefumier + orcid: 'https://orcid.org/0000-0002-3983-5625' +identifiers: + - type: doi + value: + description: The concept DOI of the work. +repository-code: 'https://github.com/eth-cscs/DLA-Future-Fortran' +abstract: Fortran interface for DLA-Future (Distributed Linear Algebra from the Future) +keywords: + - fortran + - eigensolver + - "generalized eigensolver" + - scalapack + - "high performance computing" + - "linear algebra" + - mpi +license: BSD-3-Clause +version: 0.1.0 +date-released: '2024-05-14' diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md new file mode 100644 index 0000000..6a892ea --- /dev/null +++ b/RELEASE_PROCEDURE.md @@ -0,0 +1,31 @@ +# Release procedure for DLA-Future-Fortran + +DLA-Future-Fortran follows [Semantic Versioning](https://semver.org). + +1. For minor and major releases: check out the `main` branch. All changes required for the release are + added to `main` via pull requests. For patch releases: check out the corresponding + `release-major.minor` branch. + +1. Write release notes in `CHANGELOG.md`. + +1. Update the version in `CMakeLists.txt`. + +1. Update the version and date in `CITATION.cff`. + +1. When making a major release, remove deprecated functionality if appropriate. + +1. Update the minimum required versions if necessary. + +1. Ensure you have [GitHub CLI]() installed. Run `gh auth login` to authenticate with your GitHub account, + or set the `GITHUB_TOKEN` to a token with `public_repo` access. + +1. Create a release on GitHub using the script `scripts/roll_release.sh`. + +1. Update spack recipe in `spack/packages/dla-future/package.py` adding the new release. + +1. Synchronize [upstream spack + package](https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dla-future-fortran/package.py) + with local repository. Exclude blocks delimited by `###` comments. These are only intended for the + internal spack package. + +1. Delete your `GITHUB_TOKEN` if created only for the release. diff --git a/scripts/roll_release.sh b/scripts/roll_release.sh new file mode 100644 index 0000000..b748813 --- /dev/null +++ b/scripts/roll_release.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash + +# +# Distributed Linear Algebra with Future (DLAF) +# +# Copyright (c) 2018-2024, ETH Zurich +# All rights reserved. +# +# Please, refer to the LICENSE file in the root directory. +# SPDX-License-Identifier: BSD-3-Clause +# + +# This script tags a release locally and creates a release on GitHub. It relies +# on the GitHub CLI (https://cli.github.com). + +set -o errexit + +VERSION_MAJOR=$(sed -n 's/project(DLAFFortran VERSION \([0-9]\+\)\.[0-9]\+\.[0-9]\+ .*)/\1/p' CMakeLists.txt) +VERSION_MINOR=$(sed -n 's/project(DLAFFortran VERSION [0-9]\+\.\([0-9]\+\)\.[0-9]\+ .*)/\1/p' CMakeLists.txt) +VERSION_PATCH=$(sed -n 's/project(DLAFFortran VERSION [0-9]\+\.[0-9]\+\.\([0-9]\+\) .*)/\1/p' CMakeLists.txt) +VERSION_FULL="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" +VERSION_FULL_TAG="v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" +VERSION_TITLE="DLA-Future-Fortran ${VERSION_FULL}" +CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +if ! which gh >/dev/null 2>&1; then + echo "GitHub CLI not installed on this system (see https://cli.github.com). Exiting." + exit 1 +fi + +# Major and minor releases are made directly from master. Patch releases are branched out from the major +# and minor releases with a version_X.Y branch. +if [[ "${VERSION_PATCH}" -eq 0 ]]; then + RELEASE_BRANCH="main" +else + RELEASE_BRANCH="release-${VERSION_MAJOR}.${VERSION_MINOR}" +fi + +if ! [[ "$CURRENT_BRANCH" == "$RELEASE_BRANCH" ]]; then + echo "Not on release branch (expected \"$RELEASE_BRANCH\", currently on \"${CURRENT_BRANCH}\"). Not continuing to make release." + exit 1 +fi + +changelog_path="CHANGELOG.md" +readme_path="README.md" +cff_path="CITATION.cff" + +echo "You are about to tag and create a final release on GitHub." + +echo "" +echo "Sanity checking release" + +sanity_errors=0 + +printf "Checking that %s has an entry for %s... " "${changelog_path}" "${VERSION_FULL}" +if grep "## DLA-Future-Fortran ${VERSION_FULL}" "${changelog_path}"; then + echo "OK" +else + echo "Missing" + sanity_errors=$((sanity_errors + 1)) +fi + +printf "Checking that %s has correct version for %s... " "${cff_path}" "${VERSION_FULL}" +if grep "^version: ${VERSION_FULL}" "${cff_path}"; then + echo "OK" +else + echo "Missing" + sanity_errors=$((sanity_errors + 1)) +fi + +printf "Checking that %s has correct title for %s... " "${cff_path}" "${VERSION_FULL}" +if grep "^title: ${VERSION_TITLE}" "${cff_path}"; then + echo "OK" +else + echo "Missing" + sanity_errors=$((sanity_errors + 1)) +fi + +if [[ ${sanity_errors} -gt 0 ]]; then + echo "Found ${sanity_errors} error(s). Fix it/them and try again." + exit 1 +fi + +# Extract the changelog for this version +VERSION_DESCRIPTION=$( + # Find the correct heading and print everything from there to the end of the file + awk "/^## DLA-Future-Fortran ${VERSION_FULL}/,EOF" ${changelog_path} | + # Remove the heading + tail -n+3 | + # Find the next heading or the end of the file and print everything until that heading + sed '/^## /Q' | + # Move headings one level up, i.e. transform ### to ##, ## to #, etc. There should be no + # top-level heading in the file except for "# Changelog". + sed 's/^##/#/' +) + +echo "" +echo "The version is: ${VERSION_FULL}" +echo "The version title is: ${VERSION_TITLE}" +echo "The version description is:" +echo "${VERSION_DESCRIPTION}" + +echo "Do you want to continue?" +select yn in "Yes" "No"; do + case $yn in + Yes) break ;; + No) exit ;; + esac +done + +echo "" +if [[ "$(git tag -l ${VERSION_FULL_TAG})" == "${VERSION_FULL_TAG}" ]]; then + echo "Tag already exists locally." +else + echo "Tagging release." + git tag --annotate "${VERSION_FULL_TAG}" --message="${VERSION_TITLE}" +fi + +remote=$(git remote -v | grep github.com:eth-cscs\/DLA-Future-Fortran.git | cut -f1 | uniq) +if [[ "$(git ls-remote --tags --refs $remote | grep -o ${VERSION_FULL_TAG})" == "${VERSION_FULL_TAG}" ]]; then + echo "Tag already exists remotely." +else + echo "Pushing tag to $remote." + git push $remote "${VERSION_FULL_TAG}" +fi + +echo "" +echo "Creating release." +gh release create "${VERSION_FULL_TAG}" \ + --title "${VERSION_TITLE}" \ + --notes "${VERSION_DESCRIPTION}" From 272ef188584cc0512709d77bb28c9f0d69aa994a Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Tue, 14 May 2024 19:11:15 +0000 Subject: [PATCH 2/7] fix release notes --- RELEASE_PROCEDURE.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md index 6a892ea..c6e6bd6 100644 --- a/RELEASE_PROCEDURE.md +++ b/RELEASE_PROCEDURE.md @@ -16,16 +16,16 @@ DLA-Future-Fortran follows [Semantic Versioning](https://semver.org). 1. Update the minimum required versions if necessary. -1. Ensure you have [GitHub CLI]() installed. Run `gh auth login` to authenticate with your GitHub account, - or set the `GITHUB_TOKEN` to a token with `public_repo` access. +1. Ensure you have [GitHub CLI](https://cli.github.com) installed. Run `gh auth login` to authenticate with + your GitHub account, or set the `GITHUB_TOKEN` to a token with `public_repo` access. 1. Create a release on GitHub using the script `scripts/roll_release.sh`. -1. Update spack recipe in `spack/packages/dla-future/package.py` adding the new release. +1. Update Spack recipe in `spack/packages/dla-future-fortran/package.py` adding the new release. -1. Synchronize [upstream spack +1. Synchronize [upstream Spack package](https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dla-future-fortran/package.py) - with local repository. Exclude blocks delimited by `###` comments. These are only intended for the - internal spack package. + with local repository. Exclude blocks delimited by `# !!!` comments. These are only intended for the + internal Spack package. 1. Delete your `GITHUB_TOKEN` if created only for the release. From 742e29516f6478fbd5995ff2bbd00567ba41d1df Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 15 May 2024 09:19:42 +0200 Subject: [PATCH 3/7] Update scripts/roll_release.sh Co-authored-by: Mikael Simberg --- scripts/roll_release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/roll_release.sh b/scripts/roll_release.sh index b748813..ec66454 100644 --- a/scripts/roll_release.sh +++ b/scripts/roll_release.sh @@ -28,7 +28,7 @@ if ! which gh >/dev/null 2>&1; then exit 1 fi -# Major and minor releases are made directly from master. Patch releases are branched out from the major +# Major and minor releases are made directly from main. Patch releases are branched out from the major # and minor releases with a version_X.Y branch. if [[ "${VERSION_PATCH}" -eq 0 ]]; then RELEASE_BRANCH="main" From 4da7f3142d1d1f2589746603ea556fab98c71ecc Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 15 May 2024 09:24:07 +0200 Subject: [PATCH 4/7] remove identifiers field --- CITATION.cff | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 55ad96d..091578b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -26,10 +26,6 @@ authors: - given-names: Mathieu family-names: Taillefumier orcid: 'https://orcid.org/0000-0002-3983-5625' -identifiers: - - type: doi - value: - description: The concept DOI of the work. repository-code: 'https://github.com/eth-cscs/DLA-Future-Fortran' abstract: Fortran interface for DLA-Future (Distributed Linear Algebra from the Future) keywords: From 0fae73a400739f78e548c8c7d18beb31ec50f11e Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 15 May 2024 09:24:37 +0200 Subject: [PATCH 5/7] add rasolca to maintainers --- spack/packages/dla-future-fortran/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack/packages/dla-future-fortran/package.py b/spack/packages/dla-future-fortran/package.py index f7aa470..5ec8d84 100644 --- a/spack/packages/dla-future-fortran/package.py +++ b/spack/packages/dla-future-fortran/package.py @@ -16,7 +16,7 @@ class DlaFutureFortran(CMakePackage): url = "https://github.com/eth-cscs/DLA-Future-Fortran/archive/v0.0.0.tar.gz" git = "https://github.com/eth-cscs/DLA-Future-Fortran.git" - maintainers("RMeli") + maintainers("RMeli", "rasolca") license("BSD-3-Clause") From 3cac2ffa1f7c4df0c71fe28ac96ef7241336504a Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 15 May 2024 09:39:27 +0200 Subject: [PATCH 6/7] add check on current date --- CITATION.cff | 2 +- scripts/roll_release.sh | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 091578b..31fec8b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -38,4 +38,4 @@ keywords: - mpi license: BSD-3-Clause version: 0.1.0 -date-released: '2024-05-14' +date-released: '2024-05-15' diff --git a/scripts/roll_release.sh b/scripts/roll_release.sh index ec66454..b9c97e3 100644 --- a/scripts/roll_release.sh +++ b/scripts/roll_release.sh @@ -22,6 +22,7 @@ VERSION_FULL="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" VERSION_FULL_TAG="v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" VERSION_TITLE="DLA-Future-Fortran ${VERSION_FULL}" CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" +RELEASE_DATE=$(date '+%Y-%m-%d') if ! which gh >/dev/null 2>&1; then echo "GitHub CLI not installed on this system (see https://cli.github.com). Exiting." @@ -42,7 +43,6 @@ if ! [[ "$CURRENT_BRANCH" == "$RELEASE_BRANCH" ]]; then fi changelog_path="CHANGELOG.md" -readme_path="README.md" cff_path="CITATION.cff" echo "You are about to tag and create a final release on GitHub." @@ -56,7 +56,7 @@ printf "Checking that %s has an entry for %s... " "${changelog_path}" "${VERSION if grep "## DLA-Future-Fortran ${VERSION_FULL}" "${changelog_path}"; then echo "OK" else - echo "Missing" + echo "ERROR" sanity_errors=$((sanity_errors + 1)) fi @@ -64,7 +64,7 @@ printf "Checking that %s has correct version for %s... " "${cff_path}" "${VERSIO if grep "^version: ${VERSION_FULL}" "${cff_path}"; then echo "OK" else - echo "Missing" + echo "ERROR" sanity_errors=$((sanity_errors + 1)) fi @@ -72,7 +72,15 @@ printf "Checking that %s has correct title for %s... " "${cff_path}" "${VERSION_ if grep "^title: ${VERSION_TITLE}" "${cff_path}"; then echo "OK" else - echo "Missing" + echo "ERROR" + sanity_errors=$((sanity_errors + 1)) +fi + +printf "Checking that %s has today's date... " "${cff_path}" +if grep "^date-released: '${RELEASE_DATE}'" "${cff_path}"; then + echo "OK" +else + echo "ERROR" sanity_errors=$((sanity_errors + 1)) fi @@ -97,6 +105,7 @@ VERSION_DESCRIPTION=$( echo "" echo "The version is: ${VERSION_FULL}" echo "The version title is: ${VERSION_TITLE}" +echo "The release date is: ${RELEASE_DATE}" echo "The version description is:" echo "${VERSION_DESCRIPTION}" From 6136d45620335725e0ef6a398995ffd0012c289b Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 22 May 2024 08:59:15 +0200 Subject: [PATCH 7/7] first author --- CITATION.cff | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 31fec8b..a831977 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -5,15 +5,15 @@ message: >- metadata from this file. type: software authors: + - given-names: Rocco + family-names: Meli + orcid: 'https://orcid.org/0000-0002-2845-3410' - given-names: John family-names: Biddiscombe orcid: 'https://orcid.org/0000-0002-6552-2833' - given-names: Alberto family-names: Invernizzi orcid: 'https://orcid.org/0009-0004-4948-0313' - - given-names: Rocco - family-names: Meli - orcid: 'https://orcid.org/0000-0002-2845-3410' - given-names: Auriane family-names: Reverdell orcid: 'https://orcid.org/0000-0002-5531-0458' @@ -32,6 +32,7 @@ keywords: - fortran - eigensolver - "generalized eigensolver" + - "Cholesky decomposition" - scalapack - "high performance computing" - "linear algebra"