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

Test viz png #551

Merged
merged 7 commits into from
Feb 22, 2024
Merged

Test viz png #551

merged 7 commits into from
Feb 22, 2024

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Feb 21, 2024

See if installing libpng beforehand helps

@cookpa
Copy link
Member Author

cookpa commented Feb 21, 2024

Foiled again. Somehow it is building with some older libpng

libpng warning: Application built with libpng-1.4.12 but running with 1.6.42
E.
======================================================================
ERROR: test_example (__main__.TestModule_create_tiled_mosaic)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/ANTsPy/ANTsPy/tests/test_viz.py", line 51, in test_example
    p = ants.create_tiled_mosaic(img, output=outfile)
  File "/Users/runner/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/ants/viz/create_tiled_mosaic.py", line 133, in create_tiled_mosaic
    libfn(processed_args)
RuntimeError: /Users/runner/work/ANTsPy/ANTsPy/itksource/Modules/IO/PNG/src/itkPNGImageIO.cxx:550:
ITK ERROR: PNGImageIO(0x7fc4ef40bdf0): Unable to write PNG file! png_create_write_struct failed.

@ncullen93
Copy link
Member

I think it's only the create_tiled_mosaic function which is failing, right, and that's using ITK. We should really only focus on matplotlib to allow full user flexibility, so I think best is to remove that failing test but keep the plot test. The plot.py code is 3000 lines so that's what I care most about re: coverage.

@cookpa
Copy link
Member Author

cookpa commented Feb 21, 2024

Sounds good. It actually works on my Mac, though I get a warning:

unclosed file <_io.BufferedReader name='/var/folders/zd/9qflmdq95ks8q89wwk9461l80000gn/T/tmpfhsq59qd.png'>

/opt/miniconda3/envs/antspydevel/lib/python3.9/unittest/case.py:550: ResourceWarning:

unclosed file <_io.BufferedReader name='/var/folders/zd/9qflmdq95ks8q89wwk9461l80000gn/T/tmpfhsq59qd.png'>

Something odd going on as the file looks correct.

@ncullen93 ncullen93 merged commit c8b8039 into master Feb 22, 2024
15 checks passed
@ncullen93 ncullen93 deleted the test-viz-png branch May 8, 2024 07:43
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