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

admin/prepare-bioformats_reader-to-work-with-new-bioformats_jar-based-on-scyjava #402

Merged
merged 13 commits into from May 26, 2022

Conversation

tlambert03
Copy link
Collaborator

@tlambert03 tlambert03 commented May 23, 2022

Description

This PR prepares the bioformats reader to work with the scyjava-based bioformats_jar update coming in tlambert03/bioformats_jar#4. Mostly this just means updating the error messages and readme a bit.

With this PR, aicsimageio should work both with the current version of bioformats_jar and the new one after that is released

Pull request recommendations:

  • Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
  • Link to any relevant issue in the PR description. Ex: Resolves [gh-], adds tiff file format support
  • Provide relevant tests for your feature or bug fix.
  • Provide or update documentation for any feature added by your pull request.

Thanks for contributing!

@tlambert03 tlambert03 changed the title Prepare bioformats_reader to work with new bioformats_jar based on scyjava admin/prepare-bioformats_reader-to-work-with-new-bioformats_jar-based-on-scyjava May 23, 2022
@tlambert03
Copy link
Collaborator Author

@JacksonMaxfield, are these Credentials could not be loaded errors something I need to fix?

@evamaxfield
Copy link
Collaborator

Uhhhhh yea I will investigate the credentials. Wonder if someone on DevOps rolled the creds without telling us

Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't comment much on the creds issue, but here's a few thoughts!

README.md Outdated Show resolved Hide resolved
"Install with `pip install bioformats_jar`"
)
"Install with `pip install bioformats_jar` or `conda install bioformats_jar`"
) from e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 love this!

Comment on lines +639 to +641
raise RuntimeError(MAVEN_ERROR_MSG) from e
except jpype.JVMNotFoundException as e:
raise RuntimeError(JAVA_ERROR_MSG) from e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These verbose error messages are fantastic!

@@ -29,6 +29,7 @@ xfail_strict = true
filterwarnings =
ignore::UserWarning
ignore::FutureWarning
ignore:distutils Version classes are deprecated:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What code is bringing about this warning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both xarray and setuptools:

================================================================= warnings summary =================================================================
../../../../miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pycompat.py:22
aicsimageio/tests/readers/extra_readers/test_bioformats_reader.py::test_bioformats_reader[DICOM_samples_MR-MONO2-8-16x-heart.dcm-PRIMARY-expected_scenes16-expected_shape16-uint8-TCZYX-expected_channel_names16-expected_physical_pixel_sizes16-LOCAL]
aicsimageio/tests/readers/extra_readers/test_bioformats_reader.py::test_bioformats_reader[DICOM_samples_MR-MONO2-8-16x-heart.dcm-PRIMARY-expected_scenes16-expected_shape16-uint8-TCZYX-expected_channel_names16-expected_physical_pixel_sizes16-LOCAL]
aicsimageio/tests/readers/extra_readers/test_bioformats_reader.py::test_bioformats_reader[DICOM_samples_MR-MONO2-8-16x-heart.dcm-PRIMARY-expected_scenes16-expected_shape16-uint8-TCZYX-expected_channel_names16-expected_physical_pixel_sizes16-LOCAL]
  /Users/talley/miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pycompat.py:22: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    duck_array_version = LooseVersion(duck_array_module.__version__)

../../../../miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pycompat.py:37
../../../../miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pycompat.py:37
  /Users/talley/miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pycompat.py:37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    duck_array_version = LooseVersion("0.0.0")

../../../../miniconda3/envs/aics/lib/python3.9/site-packages/setuptools/_distutils/version.py:351
../../../../miniconda3/envs/aics/lib/python3.9/site-packages/setuptools/_distutils/version.py:351
../../../../miniconda3/envs/aics/lib/python3.9/site-packages/setuptools/_distutils/version.py:351
../../../../miniconda3/envs/aics/lib/python3.9/site-packages/setuptools/_distutils/version.py:351
  /Users/talley/miniconda3/envs/aics/lib/python3.9/site-packages/setuptools/_distutils/version.py:351: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    other = LooseVersion(other)

../../../../miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/npcompat.py:82
  /Users/talley/miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/npcompat.py:82: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(np.__version__) >= "1.20.0":

../../../../miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pdcompat.py:45
  /Users/talley/miniconda3/envs/aics/lib/python3.9/site-packages/xarray/core/pdcompat.py:45: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(pd.__version__) < "0.25.0":

-- Docs: https://docs.pytest.org/en/stable/warnings.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh gotcha. I've been getting a lot of those LooseVersion warnings on other projects. Good to know I can borrow this ignoration 😁

@evamaxfield
Copy link
Collaborator

i have asked AICS devops team to look into what is going on with credentials 🤷‍♀️

@evamaxfield
Copy link
Collaborator

No idea if it will work but @tlambert03 could you try adding this to the test-and-lint.yml?

aws-actions/configure-aws-credentials#271 (comment)

@evamaxfield
Copy link
Collaborator

Hey @tlambert03 could you switch from install the branch of bioformats_jar with git + ssh to git + https? I don't think this is the reason for all the other build failures because we have fail-fast turned off but 🤷‍♀️ who knows

@tlambert03
Copy link
Collaborator Author

whoops... fixed. But yeah, it was failing before even when using the one from pypi

@tlambert03
Copy link
Collaborator Author

updated test-and-lint

@tlambert03
Copy link
Collaborator Author

Still no :/

@evamaxfield
Copy link
Collaborator

I am trying to change the permissions and see what happens -- I just don't understand what is happening. No logs for the issue is really weird

@evamaxfield
Copy link
Collaborator

how timely that github adds a feature to enable debug logging on failed jobs. Rerunning and seeing if there is any new info...

  • my prs are running / build is completing on main which means AWS creds are still valid
  • your prs are failing but at AWS creds step seems to indicate secrets access / permissions
  • nothing has changed at least on the repo side of things...

@evamaxfield
Copy link
Collaborator

evamaxfield commented May 25, 2022

@tlambert03 sorry to bother for time again, can you try removing the aws setup credentials task for the tests? I dont know if we even need creds to read the data....

Scratch that, I will try it.

@tlambert03
Copy link
Collaborator Author

here if you need me to try something!

@evamaxfield
Copy link
Collaborator

@tlambert03 the credentials bugfix / feature / admin PR has been merged. Can you merge main?

@tlambert03
Copy link
Collaborator Author

maybe encouraging? Note: don't merge this until I change back the bit in setup.py (just want to temporarily test the new bioformats_jar main before releasing it to pypi

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2022

Codecov Report

Merging #402 (4416594) into main (dca7a41) will decrease coverage by 0.08%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
- Coverage   94.65%   94.56%   -0.09%     
==========================================
  Files          45       45              
  Lines        3741     3756      +15     
==========================================
+ Hits         3541     3552      +11     
- Misses        200      204       +4     
Impacted Files Coverage Δ
...ts/readers/extra_readers/test_bioformats_reader.py 96.72% <66.66%> (-3.28%) ⬇️
aicsimageio/readers/bioformats_reader.py 85.30% <72.72%> (-0.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dca7a41...4416594. Read the comment docs.

@evamaxfield
Copy link
Collaborator

evamaxfield commented May 26, 2022

@tlambert03 i unfortunately think you will see failing bioformats tests because you haven't added the pip install from git to the tox config: https://github.com/AllenCellModeling/aicsimageio/blob/main/tox.ini#L11

-- or rather, they will just be using the old version (current release) of bioformats

Sorry for the doubly added dependencies... if you know of a better way to manage such a giant test suite I am all ears and can get to it next week.

@tlambert03
Copy link
Collaborator Author

hah. ok, well, they're passing with the current release of bioformats_jar. so that's good. Lemme test with the new one.

if you know of a better way to manage such a giant test suite I am all ears and can get to it next week.

well, I would have said just declare the additional extras (rather than setting them as deps)... But because we don't actually provide an extra .... 😒 this is fine :)

@evamaxfield
Copy link
Collaborator

well, I would have said just declare the additional extras (rather than setting them as deps)... But because we don't actually provide an extra ....

If only....

@tlambert03
Copy link
Collaborator Author

ok! caught one more (simple) issue with the new bioformats_jar and our tests here. It's now fixed, and the tox.ini change is reverted. Assuming stuff passes here, this is good to go. Only after it is merged and released will I cut the new bioformats_jar release

Copy link
Collaborator

@evamaxfield evamaxfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me!

@evamaxfield
Copy link
Collaborator

Once tests finish up I will merge and release. Thanks @tlambert03

@evamaxfield evamaxfield added documentation Improvements or additions to documentation enhancement New feature or request admin Various administrative tasks for the package labels May 26, 2022
@evamaxfield
Copy link
Collaborator

Disregard the failing checks -- they are all codecov upload errors. I don't think codecov is built to handle a test matrix like this.

@evamaxfield evamaxfield merged commit 5df9060 into AllenCellModeling:main May 26, 2022
@tlambert03
Copy link
Collaborator Author

btw, I'm seeing a lot of macos codecov errors too. there's an open issue: codecov/codecov-action#745

@tlambert03 tlambert03 deleted the update-bioformats branch May 26, 2022 21:24
@evamaxfield
Copy link
Collaborator

Released 4.8.0, feel free to release a new bioformats_jar whenever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Various administrative tasks for the package documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants