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

Add image verification support to CI #117

Merged
merged 13 commits into from
Mar 18, 2024
Merged

Conversation

kostrykin
Copy link
Member

For the contributor:


This PR adds the image verification support from galaxyproject/galaxy#17581 and galaxyproject/galaxy#17556, until the new features become available in a recent Galaxy release.

This temporary change to the CI essentially adds the instructions

python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/util
python -m pip install git+https://[email protected]/galaxyproject/galaxy.git@5c1d045ce7b1e45f85608346baed5455324ee967#subdirectory=packages/tool_util

before linting and testing, and, in addition,

python -m pip install pillow

before testing.

The commit hash 5c1d045ce7b1e45f85608346baed5455324ee967 corresponds to the latest merged bug fix.

@bgruening
Copy link
Collaborator

Go for it!

@kostrykin
Copy link
Member Author

There is something wrong with either this PR or another bug, I'll try to hunt this down before merging this

@kostrykin
Copy link
Member Author

kostrykin commented Mar 16, 2024

7154d16 is the same test as https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/image_diff.xml and it passes when run in Galaxy using ./run_tests.sh -framework -id image_diff. But the same test fails when run on in this branch, both locally and in CI:

https://github.com/BMCV/galaxy-image-analysis/actions/runs/8310797509?pr=117#summary-22743770060

The reason for failure is that the attribute values for eps and metric are not there in attributes in files_image_diff so the defaults are used. The values are not passed through to files_image_diff from XML.

But there is no difference between the tool_util/parser/xml.py file used in the test on this branch (installed via pip install, where the test fails) and the one in the Galaxy repo (where the test passes).

Any idea? @bgruening


Update 1: Turns out, the new attributes eps and metric are already missing in the response of the tool test API received in GalaxyInteractorApi.get_tool_tests in tool_util/verify/interactor.py. So it looks like the new attributes get stripped off by the tool test API server.

Update 2: Yup, the attributes are there in GalaxyEngine._run_test_cases in planemo/engine/galaxy.py. Then, interactor.verify_tool() is called, but the attributes are not passed along. Instead, the .verify_tool() method uses .get_tool_tests() on an GalaxyInteractorApi object to request the tests from API.

This request seems to be answered by test_data() in webapps/galaxy/api/tools.py, however, there seems to be no webapps/galaxy/api/tools.py on my filesystem. I did a full system search for api/tools.py and there was nothing. So how is this API request handled when running planemo test?

@kostrykin
Copy link
Member Author

Do you have any security concerns because of dba0717? @bgruening

@bgruening
Copy link
Collaborator

No not at all. We all trust you!

@kostrykin kostrykin merged commit 4ce5211 into BMCV:master Mar 18, 2024
kostrykin added a commit to kostrykin/galaxy-image-analysis that referenced this pull request Mar 21, 2024
* Rename tools

Change the `Performs` in the name of the two tools

- `Performs projective transformation with/without labels`
- `Performs projective transformation`

to `Perform`, which is more consistent with the name of the other tools (imperative form).

* Update projective_transformation.xml

* Update projective_transformation_points.xml

* Add CONVENTIONS.md

* wip

* wip

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Remove help section

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update

* Update test data

* Add content assertions

* Update pr.yaml

* Update

* Update pr.yaml

* Add `pip install pillow`

* Merge CONVENTIONS.md into CONTRIBUTING.md

* Temporarilly fix CI

* Update `2d_feature_extraction` tool

* Update `2d_auto_threshold` tool

* Fix `2d_feature_extraction` tests

* Fix test data

* Fix tool

* Start refactoring `2d_simple_filter` tool

* Fix `2d_simple_filter` tool

* Add more tests

* Fix tests

* Update

* Fix

* Update CONTRIBUTING.md

* Fix bugs

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Fix linting issues

* Update CONTRIBUTING.md

* Refactor tests using macros

* Update tests

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update pr.yaml

* Update `anisotropic_diffusion` tool

* Fix spelling (was BE, using AE is more consistent)

* Update `2d_histogram_equalization` tool

* Update `colorize_labels` tool

* Update `bf2raw` tool

* Add `macros/creators.xml`

* Update `rfove` tool

* Fix `bioformats2raw` and `voronoi_tessellation` tools

* Fix labels

* Fix `rfove` tool

* Update `overlay_images` tool

* Add RGB test for `overlay_images`

* Update `overlay_images` help

* Add image verification support to CI (BMCV#117)

* Update pr.yaml

* Update

* Update pr.yaml

* Add `pip install pillow`

* Temporarilly fix CI

* Update pr.yaml

* Update ci.yaml

* Add test tool from `/test/functional/tools/image_diff.xml`

* Update pr.yaml

* Add .shed.yml

* Add missing test files

* Switch CI to galaxy fork `kostrykin/galaxy` branch `galaxy-image-analysis`

This is a temporary change to enable the features from:

 - galaxyproject/galaxy#17556
 - galaxyproject/galaxy#17581

* Remove `test` tool

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update test data

* Add RGB test for `overlay_images`

* Update `anisotropic_diffusion` to medpy 0.4.0

* Update PULL_REQUEST_TEMPLATE.md

* Update `projective_transformation_points` tool

* Update PULL_REQUEST_TEMPLATE.md

* Update `bioformats2raw`

* Update `projective_transformation` tool

* Update `bfconvert` tool (tests failing)

* Update CONTRIBUTING.md

* Fix `bfconvert` tests

* Fix test data size

* Update `projective_transformation_points` tool

* Remove spurious files

* Update requirements using `@TOOL_VERSION@` macro

* Update `segmetrics` tool

* Remove spurious sym links

* Update `superdsm` tool

* Update `scale_image` tool (not finished yet)

* Fix tests

* Fix `scale_image` tool

* Refactor

* Fix linting issues

* Update tests and help of `2d_simple_filter` tool

* Update `scale_image` help

* Update CI to use latest version of `galaxy` fork

* Fix tests for float TIFF in `scale_image` tool

* Add tifffile to CI workflows

* Fix tests of `bfconvert` tool

* Update `2d_filter_segmentation_by_features` tool

* Update `image_math` tool

* Update `orientationpy` tool

* Update `morphological_operations` tool

* Update `split_labelmap` tool

* Add float TIFF test for `2d_simple_filter`

* Update `slice_image` tool

* Add missing macros

* Update help of `2d_filter_segmentation_by_features` tool

* Update `concat_images` tool

* Fix linting issues

* Fix file sizes

* Fix missing `profile`
kostrykin added a commit that referenced this pull request Apr 4, 2024
Update 23 tools and macros

* Update 23 tools

* Rename tools

Change the `Performs` in the name of the two tools

- `Performs projective transformation with/without labels`
- `Performs projective transformation`

to `Perform`, which is more consistent with the name of the other tools (imperative form).

* Update projective_transformation.xml

* Update projective_transformation_points.xml

* Add CONVENTIONS.md

* wip

* wip

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Remove help section

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update CONVENTIONS.md

* Update

* Update test data

* Add content assertions

* Update pr.yaml

* Update

* Update pr.yaml

* Add `pip install pillow`

* Merge CONVENTIONS.md into CONTRIBUTING.md

* Temporarilly fix CI

* Update `2d_feature_extraction` tool

* Update `2d_auto_threshold` tool

* Fix `2d_feature_extraction` tests

* Fix test data

* Fix tool

* Start refactoring `2d_simple_filter` tool

* Fix `2d_simple_filter` tool

* Add more tests

* Fix tests

* Update

* Fix

* Update CONTRIBUTING.md

* Fix bugs

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Fix linting issues

* Update CONTRIBUTING.md

* Refactor tests using macros

* Update tests

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update pr.yaml

* Update `anisotropic_diffusion` tool

* Fix spelling (was BE, using AE is more consistent)

* Update `2d_histogram_equalization` tool

* Update `colorize_labels` tool

* Update `bf2raw` tool

* Add `macros/creators.xml`

* Update `rfove` tool

* Fix `bioformats2raw` and `voronoi_tessellation` tools

* Fix labels

* Fix `rfove` tool

* Update `overlay_images` tool

* Add RGB test for `overlay_images`

* Update `overlay_images` help

* Add image verification support to CI (#117)

* Update pr.yaml

* Update

* Update pr.yaml

* Add `pip install pillow`

* Temporarilly fix CI

* Update pr.yaml

* Update ci.yaml

* Add test tool from `/test/functional/tools/image_diff.xml`

* Update pr.yaml

* Add .shed.yml

* Add missing test files

* Switch CI to galaxy fork `kostrykin/galaxy` branch `galaxy-image-analysis`

This is a temporary change to enable the features from:

 - galaxyproject/galaxy#17556
 - galaxyproject/galaxy#17581

* Remove `test` tool

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update test data

* Add RGB test for `overlay_images`

* Update `anisotropic_diffusion` to medpy 0.4.0

* Update PULL_REQUEST_TEMPLATE.md

* Update `projective_transformation_points` tool

* Update PULL_REQUEST_TEMPLATE.md

* Update `bioformats2raw`

* Update `projective_transformation` tool

* Update `bfconvert` tool (tests failing)

* Update CONTRIBUTING.md

* Fix `bfconvert` tests

* Fix test data size

* Update `projective_transformation_points` tool

* Remove spurious files

* Update requirements using `@TOOL_VERSION@` macro

* Update `segmetrics` tool

* Remove spurious sym links

* Update `superdsm` tool

* Update `scale_image` tool (not finished yet)

* Fix tests

* Fix `scale_image` tool

* Refactor

* Fix linting issues

* Update tests and help of `2d_simple_filter` tool

* Update `scale_image` help

* Update CI to use latest version of `galaxy` fork

* Fix tests for float TIFF in `scale_image` tool

* Add tifffile to CI workflows

* Fix tests of `bfconvert` tool

* Update `2d_filter_segmentation_by_features` tool

* Update `image_math` tool

* Update `orientationpy` tool

* Update `morphological_operations` tool

* Update `split_labelmap` tool

* Add float TIFF test for `2d_simple_filter`

* Update `slice_image` tool

* Add missing macros

* Update help of `2d_filter_segmentation_by_features` tool

* Update `concat_images` tool

* Fix linting issues

* Fix file sizes

* Fix missing `profile`

* Update test macros
@kostrykin kostrykin deleted the update_ci branch September 24, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants