Skip to content

Commit 2592d37

Browse files
Merge branch 'dev' into dev
2 parents 5025415 + 3be6d6b commit 2592d37

File tree

10 files changed

+153
-55
lines changed

10 files changed

+153
-55
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ Please search on the [issue tracker](https://github.com/3dct/vIQA/issues) before
3737
## Your Environment
3838
<!--- Include as many relevant details about the environment you experienced the bug in -->
3939
* Version used:
40-
* Browser Name and version:
41-
* Operating System and version (desktop or mobile):
40+
* Operating System and version:
4241
* Link to your project:

.github/workflows/release.yaml

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
branches:
99
- main
1010
- dev
11+
pull_request:
12+
branches:
13+
- main
14+
- dev
15+
paths-ignore:
16+
- .github/*
1117

1218
jobs:
1319
changes:
@@ -93,7 +99,12 @@ jobs:
9399
name: Semantic Release
94100
runs-on: ubuntu-latest
95101
needs: [lint]
96-
if: github.ref == 'refs/heads/main' && github.repository == '3dct/viqa' && always()
102+
if: >-
103+
${{
104+
github.ref == 'refs/heads/main' &&
105+
github.repository == '3dct/viqa' &&
106+
github.event_name != 'pull_request' && !cancelled()
107+
}}
97108
permissions:
98109
id-token: write
99110
contents: write
@@ -113,7 +124,7 @@ jobs:
113124

114125
- name: Python Semantic Release
115126
id: release
116-
uses: python-semantic-release/python-semantic-release@v9.12.0
127+
uses: python-semantic-release/python-semantic-release@v9.21.0
117128
with:
118129
github_token: ${{ secrets.GITHUB_TOKEN }}
119130
git_committer_name: "github-actions"
@@ -123,10 +134,12 @@ jobs:
123134
name: Build wheels on ${{ matrix.os }}
124135
runs-on: ${{ matrix.os }}
125136
needs: [changes, semantic_release]
126-
if: |
127-
(needs.changes.outputs.build-changes == 'true' ||
128-
needs.changes.outputs.src-changes == 'true' ||
129-
needs.changes.outputs.ci-changes == 'true') && always()
137+
if: >-
138+
${{
139+
(needs.changes.outputs.build-changes == 'true' ||
140+
needs.changes.outputs.src-changes == 'true' ||
141+
needs.changes.outputs.ci-changes == 'true') && !cancelled()
142+
}}
130143
strategy:
131144
fail-fast: false
132145
matrix:
@@ -154,8 +167,6 @@ jobs:
154167

155168
- name: Build wheels
156169
uses: pypa/cibuildwheel@v2.19.2
157-
env:
158-
CIBW_PRERELEASE_PYTHONS: true
159170
with:
160171
package-dir: .
161172
output-dir: wheelhouse
@@ -171,10 +182,12 @@ jobs:
171182
name: Build source distribution
172183
runs-on: ubuntu-24.04
173184
needs: [changes, semantic_release]
174-
if: |
175-
(needs.changes.outputs.build-changes == 'true' ||
176-
needs.changes.outputs.src-changes == 'true' ||
177-
needs.changes.outputs.ci-changes == 'true') && always()
185+
if: >-
186+
${{
187+
(needs.changes.outputs.build-changes == 'true' ||
188+
needs.changes.outputs.src-changes == 'true' ||
189+
needs.changes.outputs.ci-changes == 'true') && !cancelled()
190+
}}
178191
steps:
179192
- name: Checkout code
180193
uses: actions/checkout@v4
@@ -194,9 +207,11 @@ jobs:
194207
upload_testpypi:
195208
name: Upload to Test PyPI
196209
needs: [semantic_release, build_wheels, build_sdist]
197-
if: |
198-
(github.ref == 'refs/heads/dev' && startsWith(github.ref, 'refs/tags/v')) ||
199-
(github.ref == 'refs/heads/main' && needs.semantic_release.outputs.released == 'true')
210+
if: >-
211+
${{
212+
(github.ref == 'refs/heads/dev' && startsWith(github.ref, 'refs/tags/v')) ||
213+
(github.ref == 'refs/heads/main' && needs.semantic_release.outputs.released == 'true')
214+
}}
200215
runs-on: ubuntu-latest
201216
environment:
202217
name: testpypi
@@ -238,8 +253,8 @@ jobs:
238253
with:
239254
python-version: ${{ vars.MINIMAL_PYTHON_VERSION }}
240255

241-
- name: Pause for 60 seconds
242-
run: sleep 60
256+
- name: Pause for 120 seconds
257+
run: sleep 120
243258

244259
- name: Test install from Test PyPI
245260
if: ${{ matrix.os == 'macos-14' || matrix.os == 'ubuntu-24.04' }}
@@ -269,11 +284,14 @@ jobs:
269284
name: Upload to PyPI
270285
needs: [semantic_release, build_wheels, build_sdist, upload_testpypi, test_install]
271286
runs-on: ubuntu-latest
272-
if: |
273-
needs.semantic_release.outputs.released == 'true' &&
274-
needs.semantic_release.outputs.is_prerelease == 'false' &&
275-
needs.test_install.outputs.tested == 'true' &&
276-
needs.test_install.outputs.tested_windows == 'true'
287+
if: >-
288+
${{
289+
(github.ref == 'refs/heads/main' && needs.semantic_release.outputs.released == 'true') &&
290+
needs.semantic_release.outputs.released == 'true' &&
291+
needs.semantic_release.outputs.is_prerelease == 'false' &&
292+
needs.test_install.outputs.tested == 'true' &&
293+
needs.test_install.outputs.tested_windows == 'true'
294+
}}
277295
environment:
278296
name: pypi
279297
url: https://pypi.org/project/vIQA/
@@ -296,11 +314,14 @@ jobs:
296314
name: Upload to GitHub Releases
297315
needs: [semantic_release, build_wheels, build_sdist, test_install]
298316
runs-on: ubuntu-latest
299-
if: |
300-
needs.semantic_release.outputs.released == 'true' &&
301-
needs.semantic_release.outputs.is_prerelease == 'false' &&
302-
needs.test_install.outputs.tested == 'true' &&
303-
needs.test_install.outputs.tested_windows == 'true'
317+
if: >-
318+
${{
319+
(github.ref == 'refs/heads/main' && needs.semantic_release.outputs.released == 'true') &&
320+
needs.semantic_release.outputs.released == 'true' &&
321+
needs.semantic_release.outputs.is_prerelease == 'false' &&
322+
needs.test_install.outputs.tested == 'true' &&
323+
needs.test_install.outputs.tested_windows == 'true'
324+
}}
304325
permissions:
305326
id-token: write
306327
contents: write
@@ -328,24 +349,22 @@ jobs:
328349
./dist/*.whl
329350
330351
- name: Publish package distributions to GitHub Releases
331-
uses: python-semantic-release/publish-action@v9.12.0
352+
uses: python-semantic-release/publish-action@v9.21.0
332353
with:
333354
github_token: ${{ secrets.GITHUB_TOKEN }}
334355

335356
prepare_publish_input:
336357
name: Check if published
337358
runs-on: ubuntu-latest
338-
if: |
339-
(needs.changes.outputs.doc-changes == 'true' ||
340-
needs.changes.outputs.docker-changes == 'true') && always()
359+
if: ${{ !cancelled() }}
341360
outputs:
342361
docs_publish: ${{ steps.check_docs_publish.outputs.publish }}
343362
image_publish: ${{ steps.check_image_publish.outputs.publish }}
344363
needs: [changes, upload_github, upload_pypi]
345364
steps:
346365
- name: Check if documentation should be published
347366
id: check_docs_publish
348-
if: needs.changes.outputs.doc-changes == 'true'
367+
if: ${{ needs.changes.outputs.doc-changes == 'true' }}
349368
run: |
350369
# If either the PyPI or GitHub release was successful, publish the docs
351370
if ${{ needs.upload_github.result == 'success' }} || ${{ needs.upload_pypi.result == 'success' }}; then
@@ -360,10 +379,10 @@ jobs:
360379
fi
361380
- name: Check if Docker images should be published
362381
id: check_image_publish
363-
if: needs.changes.outputs.docker-changes == 'true'
382+
if: ${{ needs.changes.outputs.docker-changes == 'true' }}
364383
run: |
365384
# If either the PyPI or GitHub release was successful, publish the Docker images
366-
if ${{ needs.upload_github.result == 'success' }} || ${{ needs.upload_pypi.result == 'success' }}; then
385+
if ${{ needs.upload_github.result }} == 'success' || ${{ needs.upload_pypi.result }} == 'success'; then
367386
echo "publish=true" >> $GITHUB_OUTPUT
368387
else
369388
echo "publish=false" >> $GITHUB_OUTPUT
@@ -373,15 +392,15 @@ jobs:
373392
name: Build and deploy documentation
374393
uses: ./.github/workflows/documentation.yaml
375394
needs: [changes, prepare_publish_input]
376-
if: github.repository == '3dct/viqa' && needs.changes.outputs.doc-changes == 'true'
395+
if: ${{ github.repository == '3dct/viqa' && needs.changes.outputs.doc-changes == 'true' }}
377396
with:
378397
publish: ${{ needs.prepare_publish_input.outputs.docs_publish }}
379398

380399
build_and_push_docker_images:
381400
name: Build and push Docker Images
382401
uses: ./.github/workflows/build_and_push_docker_images.yaml
383402
needs: [changes, semantic_release, prepare_publish_input]
384-
if: github.repository == '3dct/viqa' && needs.changes.outputs.docker-changes == 'true'
403+
if: ${{ github.repository == '3dct/viqa' && needs.changes.outputs.docker-changes == 'true' }}
385404
with:
386405
version: ${{ needs.semantic_release.outputs.version }}
387406
publish: ${{ needs.prepare_publish_input.outputs.image_publish }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Install pre-commit hooks via
33
# pre-commit install
44
ci:
5-
autofix_prs: false
5+
autofix_prs: true
66
autoupdate_schedule: 'quarterly'
7-
autoupdate_commit_msg: 'chore: pre-commit autoupdate\n\nAutomatically generated by pre-commit.ci'
7+
autoupdate_commit_msg: 'chore: pre-commit autoupdate\\n\\nAutomatically generated by pre-commit.ci'
88
skip: ['build-docs', 'mypy']
99
submodules: true
1010
repos:

CHANGELOG.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,50 @@
22

33

44

5+
## v2.2.3 (2025-04-10)
6+
7+
### Bug fixes
8+
9+
* fix: fix using Class attribute rois when not using the same roi for all images in BatchMetrics ([`e98b15a`](https://github.com/3dct/vIQA/commit/e98b15a1de544022061c4643a95a84f8c9d5dc3e))
10+
11+
12+
## v2.2.2 (2025-04-09)
13+
14+
### Bug fixes
15+
16+
* fix: fix semantic release exclude commit pattern ([`b24070e`](https://github.com/3dct/vIQA/commit/b24070ec67f74d68d0915524d77bfa11a828bcc3))
17+
18+
* fix: fix rois in BatchMetrics.report when exporting images ([`88c8931`](https://github.com/3dct/vIQA/commit/88c89317ae9735685f16953a5b2338e72fe2a74c))
19+
20+
* fix: enable rois in BatchMetrics
21+
22+
closes #11 ([`c2b0ce5`](https://github.com/3dct/vIQA/commit/c2b0ce5102aec6ee9ce9434bfc9d3ea8eabdbc12))
23+
24+
* fix: add check for image dimensions during loading (#15)
25+
26+
* fix: add check for image dimensions during loading
27+
28+
closes #14
29+
30+
* [pre-commit.ci] auto fixes from pre-commit.com hooks
31+
32+
for more information, see https://pre-commit.ci
33+
34+
* refactor: refactor to comply with ruff
35+
36+
* docs(load_data): add Exception to function docstring
37+
38+
---------
39+
40+
Co-authored-by: Lukas Nepelius <p42940@fhooe.at>
41+
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
42+
Co-authored-by: lukasbehammer <lukas.behammer@fh-wels.at> ([`a120ade`](https://github.com/3dct/vIQA/commit/a120adea9a19fa1e19b4f82cbf95232482fa7be4))
43+
44+
### Documentation
45+
46+
* docs: refactor user guide ([`c423f57`](https://github.com/3dct/vIQA/commit/c423f573db92326e4e96f815690ce50866a59a01))
47+
48+
549
## v2.2.1 (2025-04-02)
650

751
### Bug fixes
@@ -109,12 +153,6 @@ fix csv delimiter sniffing, add support for tsv and txt files during loading of
109153

110154
## v2.0.0 (2024-10-22)
111155

112-
### Breaking
113-
114-
* refactor!: move utility modules to utils subpackage
115-
116-
BREAKING CHANGE: major refactoring of utility functions ([`d3945b4`](https://github.com/3dct/vIQA/commit/d3945b47b710c471973296c70c93c272cc0f9552))
117-
118156
### Bug fixes
119157

120158
* fix: convert rgb images to grayscale before binarization ([`f258f96`](https://github.com/3dct/vIQA/commit/f258f96d38efd6acc56fca9f1dcd823987703058))
@@ -169,6 +207,12 @@ update documentation, refactor definition of variable truncate ([`851521b`](http
169207

170208
make sure that an ImageArray is returned via numpy ufunc ([`31524fb`](https://github.com/3dct/vIQA/commit/31524fbff81ff0cf52c9be7dc2e22b116c7dd286))
171209

210+
### Refactoring
211+
212+
* refactor!: move utility modules to utils subpackage
213+
214+
BREAKING CHANGE: major refactoring of utility functions ([`d3945b4`](https://github.com/3dct/vIQA/commit/d3945b47b710c471973296c70c93c272cc0f9552))
215+
172216

173217
## v1.13.0 (2024-09-24)
174218

@@ -509,9 +553,8 @@ function writes custom parameters and package version to a .txt file ([`5b8e607`
509553

510554
## v1.0.0 (2024-08-05)
511555

512-
### Breaking
556+
### Features
513557

514558
* feat(ImageArray)!: add class for images
515559

516560
subclass of np.ndarray, calculates image statistics ([`40f0d02`](https://github.com/3dct/vIQA/commit/40f0d029ad416747135f79e8716de040335da592))
517-

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ docs = [
6868
"viqa[tests]",
6969
]
7070
cd = [
71-
"python-semantic-release ==9.12.0",
71+
"python-semantic-release ==9.21.0",
7272
"cibuildwheel ==2.19.2",
7373
]
7474
build = [
@@ -254,6 +254,8 @@ changelog_file = "CHANGELOG.md"
254254
exclude_commit_patterns = [
255255
".*\\n\\nAutomatically generated by python-semantic-release",
256256
"chore: pre-commit autoupdate\n\nAutomatically generated by pre-commit.ci",
257+
"chore: pre-commit autoupdate\\n\\nAutomatically generated by pre-commit.ci",
258+
"\\[pre-commit\\.ci\\].*",
257259
"chore(?:\\([^)]*?\\))?: .+",
258260
"ci(?:\\([^)]*?\\))?: .+",
259261
"refactor(?:\\([^)]*?\\))?: .+",

requirements/cd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Generated via tools/generate_requirements.py and pre-commit hook.
22
# Do not edit this file; modify pyproject.toml instead.
3-
python-semantic-release ==9.12.0
3+
python-semantic-release ==9.21.0
44
cibuildwheel ==2.19.2

src/viqa/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
It can be used for 2D and 3D images.
66
"""
77

8-
__version__ = "2.2.1"
8+
__version__ = "2.2.3"
99
__author__ = "Lukas Behammer"
1010
__all__ = [
1111
"FSIM",

0 commit comments

Comments
 (0)