Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v3.1.0 #645

Merged
merged 75 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
3a4942f
Merge pull request #632 from DeepRank/release_3.0.5
gcroci2 Jul 19, 2024
928c67b
use ubuntu:22.04 image and add conda installation for fixing libstdc+…
gcroci2 Aug 8, 2024
7b25a14
add action for releasing new docker image
gcroci2 Sep 4, 2024
ded33a7
add todo
gcroci2 Sep 4, 2024
d8165c1
add logs
gcroci2 Sep 4, 2024
385a748
remove unsupported commands
gcroci2 Sep 4, 2024
ed3b17d
specify platform for building the image in the action
gcroci2 Sep 4, 2024
56d4f77
add tags and multiarch build
gcroci2 Sep 4, 2024
c464425
add debug runs
gcroci2 Sep 4, 2024
5b93d05
restore the inital file
gcroci2 Sep 4, 2024
d33106f
point to the current branch
gcroci2 Sep 4, 2024
03014a8
try rsd workflow
gcroci2 Sep 4, 2024
4547855
remove skip
gcroci2 Sep 4, 2024
f01cfc3
fix base_image_name
gcroci2 Sep 4, 2024
92e4be6
use latest
gcroci2 Sep 4, 2024
ff9d1a9
lowercase
gcroci2 Sep 4, 2024
394c132
move ghcr to actions/ folder
gcroci2 Sep 5, 2024
0051d34
fix folders structure
gcroci2 Sep 5, 2024
0bb5a1b
move actions to workflows
gcroci2 Sep 5, 2024
56b5e87
fix action error
gcroci2 Sep 5, 2024
77c4f01
restore old folder
gcroci2 Sep 5, 2024
24eea90
reindent yml content
gcroci2 Sep 5, 2024
6218944
fix path
gcroci2 Sep 5, 2024
45fa50a
fix _ghcr link
gcroci2 Sep 5, 2024
a647d75
add tag based on software version
gcroci2 Sep 5, 2024
a1ec7e5
lowercase the organization
gcroci2 Sep 5, 2024
bcb67b2
try to increase patch version
gcroci2 Sep 5, 2024
2e60717
ci: update linter
DaniBodor Aug 5, 2024
9fd9c11
ci: lint _generate_testdata.ipynb
DaniBodor Aug 5, 2024
7ee75af
ci: fix linting for tutorial notebooks
DaniBodor Aug 5, 2024
4d88301
tutorials: error message when folder exists
DaniBodor Sep 4, 2024
008ef41
docs: improve error messages for failed queries
DaniBodor Sep 4, 2024
1682a7a
tutorial: update csv filename for srv tutorial
DaniBodor Sep 5, 2024
82ea4bc
move docker upload to release.yml
gcroci2 Sep 5, 2024
389548a
fix ubuntu to 22.04
gcroci2 Sep 5, 2024
3f91ab0
add test for docker image
gcroci2 Sep 5, 2024
65b123c
debug docker container running
gcroci2 Sep 5, 2024
22745b6
copy tests folder recursively
gcroci2 Sep 5, 2024
de8c626
print copied tests folder
gcroci2 Sep 5, 2024
f61f7c1
try to copy the whole repo
gcroci2 Sep 5, 2024
243721a
try to fix work dire
gcroci2 Sep 5, 2024
0660c5a
try to copy tests only again
gcroci2 Sep 5, 2024
fcd14eb
remove duplicated run
gcroci2 Sep 5, 2024
233fb77
add project dir
gcroci2 Sep 5, 2024
1955300
remove debugging comment and trigger wf only when release is completed
gcroci2 Sep 5, 2024
e0b209a
tutorials: use zenodo doi for latest files
DaniBodor Sep 5, 2024
6bcb480
fix tutorials add
gcroci2 Sep 6, 2024
f931154
update zenodo address
gcroci2 Sep 6, 2024
3d784ca
update zenodo address
gcroci2 Sep 6, 2024
b61662b
update docs
gcroci2 Sep 6, 2024
55bd679
update target values file for svr
gcroci2 Sep 6, 2024
128d5f9
Merge pull request #637 from DeepRank/529_fix_dockerfile_add_test_gcr…
gcroci2 Sep 6, 2024
e2c0e99
ci: move ruff settings to separate file
DaniBodor Sep 6, 2024
ea47488
Merge pull request #636 from DeepRank/635_tutorials_dbodor
DaniBodor Sep 6, 2024
592672a
Merge pull request #642 from DeepRank/641_ruff_toml_dbodor
DaniBodor Sep 6, 2024
27ca9a8
build: use bump-my-version
DaniBodor Jul 9, 2024
7b37933
docs: update releasing instructions
DaniBodor Jul 9, 2024
3fc8fd4
ci: create workflow for automated github release
DaniBodor Jul 9, 2024
bc88f31
ci: add comment about GitHub token
DaniBodor Jul 9, 2024
2dbb415
docs: improve release instructions
DaniBodor Jul 9, 2024
61b0ab0
explicitly install ruff version in linting workflow
DaniBodor Jul 12, 2024
c656ddf
ci: fix action
DaniBodor Jul 17, 2024
9a29318
ci: fix linting action
DaniBodor Aug 5, 2024
f1d829c
ci: move bumpversion settings to separate toml
DaniBodor Sep 6, 2024
ddbd99b
docs: update instructions for manual release
DaniBodor Sep 6, 2024
c3e8849
ci: do not allow releases from dev branch
DaniBodor Sep 6, 2024
604650b
ci: ensure that job fails if a step fails
DaniBodor Sep 6, 2024
f9e5363
docs: Update README.dev.md
DaniBodor Sep 6, 2024
f8a7fbc
ci: error message if token expired
DaniBodor Sep 6, 2024
3472459
ci: fix erroneous branch checking
DaniBodor Sep 6, 2024
59c81d4
Merge pull request #621 from DeepRank/170_release_workflow_dbodor
DaniBodor Sep 11, 2024
d65507b
add suggestions
gcroci2 Sep 13, 2024
ca9adbe
merge with dev
gcroci2 Sep 13, 2024
a822861
Merge pull request #640 from DeepRank/529_add_docker_testing_action_g…
gcroci2 Sep 16, 2024
e8e31f3
bump minor version
gcroci2 Sep 16, 2024
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
17 changes: 0 additions & 17 deletions .bumpversion.cfg

This file was deleted.

17 changes: 17 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.bumpversion]
current_version = "3.1.0"

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = 'version: "{current_version}"'
replace = 'version: "{new_version}"'

[[tool.bumpversion.files]]
filename = "deeprank2/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'
70 changes: 70 additions & 0 deletions .github/workflows/_ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all)
# SPDX-FileCopyrightText: 2022 dv4all
# SPDX-FileCopyrightText: 2024 Ewan Cahen (Netherlands eScience Center) <[email protected]>
# SPDX-FileCopyrightText: 2024 Netherlands eScience Center
#
# SPDX-License-Identifier: Apache-2.0

name: reusable ghcr.io module

on:
workflow_call:
inputs:
ghcr_user:
required: true
description: User for logging to ghcr.io (use github.actor)
type: string
base_image_name:
required: true
description: Base image name incl. ghcr.io
type: string
image_tag:
required: true
description: Image tag (version)
type: string
dockerfile:
required: true
description: Location and name of docker file
type: string
docker_context:
required: true
description: Docker context for the build command
type: string
secrets:
token:
required: true
outputs:
image_created:
description: Full image name after upload to ghcr.io
value: ${{jobs.build_and_push.outputs.image_build}}
image_uploaded:
description: Confirmation that image is uploaded to ghcr.io
value: ${{jobs.build_and_push.outputs.image_pushed}}

jobs:
build_and_push:
name: build and push image
runs-on: ubuntu-22.04
outputs:
image_build: ${{steps.build_image.outputs.image_build}}
image_pushed: ${{steps.build_image.outputs.image_pushed}}
steps:
- name: checkout
# https://github.com/actions/checkout
uses: actions/checkout@v4
- name: build
id: build_image
run: |
IMAGE_TAG_VERSION=${{inputs.base_image_name}}:${{inputs.image_tag}}
IMAGE_TAG_LASTEST=${{inputs.base_image_name}}:latest
echo image_tag_version $IMAGE_TAG_VERSION
docker build -t $IMAGE_TAG_VERSION -t $IMAGE_TAG_LASTEST -f ${{inputs.dockerfile}} ${{inputs.docker_context}}
echo "{image_build}={$IMAGE_TAG_VERSIONvalue}" >> $GITHUB_OUTPUT
- name: push to ghcr.io
id: push_image
run: |
echo login
echo "${{secrets.token}}" | docker login https://ghcr.io -u ${{inputs.ghcr_user}} --password-stdin
echo push auth image with all tags
docker push ${{inputs.base_image_name}} --all-tags
echo "{image_build}={$IMAGE_TAG_VERSIONvalue}" >> $GITHUB_OUTPUT
4 changes: 2 additions & 2 deletions .github/workflows/build-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build (latest release)
# Only trigger, when the release workflow succeeded
on:
workflow_run:
workflows: ["Build and upload to PyPI"]
workflows: ["Build and upload to PyPI and ghcr.io"]
types:
- completed

Expand All @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
python-version: ["3.10"] # ["3.10", "3.11"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-repo-frozen-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
python-version: ["3.10"] # ["3.10", "3.11"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
python-version: ["3.10"] # ["3.10", "3.11"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
python-version: ["3.10"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
paper:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Paper Draft
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fair-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
verify:
if: github.event.pull_request.draft == false
name: "fair-software"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: fair-software/[email protected]
name: Measure compliance with fair-software.eu recommendations
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
python-version: ["3.10"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
Expand All @@ -57,6 +57,6 @@ jobs:
python3 --version
- name: Check linting and formatting using ruff
run: |
python3 -m pip install ruff
python3 -m pip install ruff==0.5.1
ruff check || (echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally." && (exit 1))
ruff format --check || (echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally." && (exit 1))
2 changes: 1 addition & 1 deletion .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
markdown-link-check:
if: github.event.pull_request.draft == false
name: Check markdown links
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
python-version: ["3.10"] # ["3.10", "3.11"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
Expand All @@ -54,9 +54,11 @@ jobs:
- name: Download the data for the tutorials
shell: bash -l {0}
run: |
wget https://zenodo.org/records/8349335/files/data_raw.zip
wget https://zenodo.org/records/13709906/files/data_raw.zip
unzip data_raw.zip -d data_raw
mv data_raw tutorials
echo listing files in data_raw:
ls tutorials/data_raw

- name: Run tutorial notebooks
run: pytest --nbmake tutorials
139 changes: 139 additions & 0 deletions .github/workflows/release_github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Draft GitHub Release

on:
workflow_dispatch:
inputs:
version_level:
description: "Semantic version level increase."
required: true
type: choice
options:
- patch
- minor
- major

permissions:
contents: write
pull-requests: write

jobs:
draft_release:
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: true

steps:
- name: Display selection
run: |
echo "Branch selected: '${{ github.ref_name }}'"
echo "Release level selected: '${{ github.event.inputs.version_level }}'"

- name: Ensure that permitted release branch was selected
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' }}
run: |
echo "Branch selected: '${{ github.ref_name }}'"
echo "Releasing from main or dev branch is not permitted, please select a different release branch."
exit 1

- name: Check GitHub Token Validity
run: |
echo "-- Validating GitHub Token"
status_code=$(curl -o /dev/null -s -w "%{http_code}" -H "Authorization: token ${{ secrets.GH_RELEASE }}" https://api.github.com/user)
if [ "$status_code" -ne 200 ]; then
echo "Error: GitHub token is invalid or expired. Please update your token in secrets."
echo "Instructions can be found at: https://github.com/DeepRank/deeprank2/blob/main/README.dev.md#updating-the-token"
exit 1
else
echo "GitHub token is valid."
fi

- name: Checkout repository
uses: actions/checkout@v4
with:
# token with admin priviliges to override brach protection on main and dev
token: ${{ secrets.GH_RELEASE }}
ref: main
fetch-depth: 0

- name: Configure git
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git pull

- name: Merge changes into main
run: |
git switch main
git merge origin/${{ github.ref_name }} --no-ff --no-commit
git commit --no-edit

- name: Bump version
id: bump
run: |
echo "-- install bump-my-version"
python3 -m pip install bump-my-version
echo "-- bump the version"
bump-my-version bump ${{ github.event.inputs.version_level }} --commit --tag
echo "-- push bumped version"
echo "RELEASE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
git push --tags -f
git push

- name: Create GitHub Release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ steps.bump.outputs.RELEASE_TAG }} \
--title="Release ${{ steps.bump.outputs.RELEASE_TAG }}" \
--generate-notes \
--draft

tidy_workspace:
# only run if action above succeeds
needs: draft_release
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# token with admin priviliges to override brach protection on main and dev
token: ${{ secrets.GH_RELEASE }}
fetch-depth: 0

- name: Configure git
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git pull

- name: Close PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "-- searching for associated PR"
pr_number=$(gh pr list --head ${{ github.ref_name }} --json number --jq '.[0].number')
if [ -n "$pr_number" ]; then
echo "-- closing PR #$pr_number"
gh pr close $pr_number
else
echo "-- no open pull request found for branch $branch_name"
fi

- name: Merge updates into dev
run: |
git switch dev
git merge origin/main
git push

- name: Delete release branch other than main or dev
run: |
echo "-- deleting branch '${{ github.ref_name }}'"
git push origin -d ${{ github.ref_name }}
Loading
Loading