Skip to content
Closed
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
36 changes: 0 additions & 36 deletions .github/workflows/coverage.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/dash_actions.yml

This file was deleted.

124 changes: 65 additions & 59 deletions .github/workflows/release_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,42 +68,9 @@ jobs:
gh pr checks ${{ github.ref_name }} --watch --fail-fast
gh pr checks ${{ github.ref_name }} --json state -q 'if . | length == 0 then "No checks found." elif map(.state == "SUCCESS") | all then "All checks passed" else error("Not all checks passed") end'

test_python_releases:
needs: checks
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
name: Build for ${{ matrix.python-version }}, ${{ matrix.os }}
env:
EIT_PROCESSING_TEST_DATA: ${{ github.workspace }}/../eitprocessing_data/
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install eitprocessing
uses: ./.github/actions/install_eitprocessing
with:
dependencies: testing
extract-data: true
python-version: ${{ matrix.python-version }}
token: ${{ secrets.GITHUB_TOKEN }}
data-directory: ${{ env.EIT_PROCESSING_TEST_DATA }}

- name: Run pytest
run: pytest -v --runslow

- name: Install additional dependencies for building
run: python3 -m pip install --upgrade ".[publishing]"

- name: Build eitprocessing
run: python3 -m build

merge_and_bump:
name: Merge the changes into main and bump the version
needs: test_python_releases
needs: checks
runs-on: ubuntu-latest
outputs:
new-version: ${{ steps.bump.outputs.current-version }}
Expand All @@ -123,12 +90,6 @@ jobs:
git config user.name "GitHub Actions"
git config -l

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

- name: Install Python
uses: actions/setup-python@v5.1.1
with:
Expand All @@ -140,7 +101,69 @@ jobs:
python3 -m pip install pyproject-deplister
pyproject-deplister --extra dev --path pyproject.toml | grep bump-my-version | sed 's/ //g' | xargs -I{} python3 -m pip install "{}"

- name: Pass Inputs to Shell
- name: Test merging PR into main, and main into develop
run: |
git fetch origin main
git checkout -B temp_main_${{github.ref_name}}_${{github.run_id}} origin/main
git branch -f ${{ github.ref_name }} origin/${{ github.ref_name }}
git merge ${{ github.ref_name }} --no-ff --no-edit

git fetch origin develop
git checkout -B temp_develop_${{github.ref_name}}_${{github.run_id}} origin/develop
git merge temp_main_${{github.ref_name}}_${{github.run_id}}

- name: Bump version
id: temp_bump
shell: bash
run: |
bump-my-version bump ${{ inputs.version_level }} --commit --no-tag
([[ $? -gt 0 ]] && echo "bumped=false" || echo "bumped=true") >> $GITHUB_OUTPUT

- name: Fail if bumping failes
if: steps.temp_bump.outputs.bumped == 'false'
run: |
echo "Bumping failed on temp branch."
git reset --hard HEAD^
exit 1

- name: Succeed if version is bumped
if: steps.temp_bump.outputs.bumped == 'true'
run: |
echo "Version would be bumped to $(bump-my-version show current_version)!"
git reset --hard HEAD^

- name: Get current main commit hash
id: premerge
run: |
git fetch origin main
echo "hash=$(git rev-parse origin/main)" >> $GITHUB_OUTPUT

- name: Merge PR
run: |
gh pr merge ${{ github.ref_name }} --merge --delete-branch --squash=false

- name: Wait for main to update
id: waitmain
run: |
for i in {1..10}; do
git fetch origin main
NEW_HASH=$(git rev-parse origin/main)
if [ "$NEW_HASH" != "${{ steps.premerge.outputs.hash }}" ]; then
echo "Main branch updated."
exit 0
fi
echo "Waiting for main branch to update..."
sleep 6
done
echo "Timeout: main branch did not update in time."
exit 1

- name: Checkout main
run: |
git switch main
git pull origin main

- name: Bump version
id: bump
shell: bash
run: |
Expand All @@ -161,6 +184,7 @@ jobs:
run: |
echo "Version was bumped from ${{ steps.bump.outputs.previous-version }} to ${{ steps.bump.outputs.current-version }}!"


- name: Merge main into develop
run: |
git checkout develop
Expand Down Expand Up @@ -203,21 +227,3 @@ jobs:
--title="Release v${{ needs.merge_and_bump.outputs.new-version }}" \
--generate-notes \
--draft

remove_branch:
name: Remove PR branch
needs: github_release
if: ${{ github.ref_name != 'develop' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0

- name: Remove PR branch
uses: dawidd6/action-delete-branch@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branches: ${{ github.ref_name }}
54 changes: 0 additions & 54 deletions .github/workflows/release_pypi.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test_build_documentation.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/testing.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ authors:

date-released: 2023-03-23
doi: 10.5281/zenodo.7869553
version: "1.8.3"
version: "1.9.2"
repository-code: "https://github.com/EIT-ALIVE/eitprocessing"
keywords:
- Mechanical lung ventilation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EITprocessing <!-- omit in toc -->

## Introduction
## Introcduction main

[Electrical Impedance Tomography](https://en.wikipedia.org/wiki/Electrical_impedance_tomography) (EIT) is a noninvasive
and radiation-free continuous imaging tool for monitoring respiratory mechanics. eitprocessing aims to provide a
Expand Down
2 changes: 1 addition & 1 deletion eitprocessing/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.8.3"
__version__ = "1.9.2"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "eitprocessing"
version = "1.8.3"
version = "1.9.2"
description = "Processing of lung image data from electrical impedance tomography."
readme = "README.md"
requires-python = ">=3.10"
Expand Down Expand Up @@ -174,7 +174,7 @@ isort.known-first-party = ["eitprocessing"]
"docs/*" = ["ALL"]

[tool.bumpversion]
current_version = "1.8.3"
current_version = "1.9.2"

[[tool.bumpversion.files]]
filename = "pyproject.toml"
Expand Down