-
Notifications
You must be signed in to change notification settings - Fork 2k
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
media-gfx/img2pdf: Version bump to 0.5.1 #36678
Conversation
Pull Request assignmentSubmitter: @gringus media-gfx/img2pdf: @gentoo/proxy-maint (maintainer needed) Linked bugsBugs linked: 921240 In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
Pull request CI reportReport generated at: 2024-05-14 19:10 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
7ec277f
to
6a6b583
Compare
Pull request CI reportReport generated at: 2024-05-31 23:30 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Pull request CI reportReport generated at: 2024-06-01 07:31 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Pull request CI reportReport generated at: 2024-06-01 08:40 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting more test failures:
FAILED src/img2pdf_test.py::test_miff_cmyk16[internal] - assert 6.35075 > 50
FAILED src/img2pdf_test.py::test_miff_cmyk16[pikepdf] - assert 6.35075 > 50
Do these two pass for you?
Yes, all pass.. interesting... |
All passed here too: |
Do these tests run at all for you? I don't have a single skip, so I'm guessing they could be skipped for you because of missing deps:
Logs for failures: _____________________________________________________ test_miff_cmyk16[internal] ______________________________________________________
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>, _basetemp=PosixP.../tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0')
, _retention_count=0, _retention_policy='failed')
miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf0/out.pdf')
@pytest.mark.skipif(
sys.platform in ["win32"],
reason="test utilities not available on Windows and MacOS",
)
def test_miff_cmyk16(
tmp_path_factory, miff_cmyk16_img, tiff_cmyk16_img, miff_cmyk16_pdf
):
tmpdir = tmp_path_factory.mktemp("miff_cmyk16")
> compare_ghostscript(
tmpdir, tiff_cmyk16_img, miff_cmyk16_pdf, gsdevice="tiff32nc", exact=False
)
miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf0/out.pdf')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
tmp_path_factory = TempPathFactory(_given_basetemp=None,
_trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>,
_basetemp=PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0'),
_retention_count=0,
_retention_policy='failed')
tmpdir = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161')
src/img2pdf_test.py:6422:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/img2pdf_test.py:418: in compare_ghostscript
compare(str(img), str(tmpdir / "gs-1.") + ext, exact, icc, False)
exact = False
ext = 'tiff'
gsdevice = 'tiff32nc'
icc = False
img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf0/out.pdf')
tmpdir = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
im1 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161/gs-1.tiff', exact = False, icc = False
cmyk = False
def compare(im1, im2, exact, icc, cmyk):
if exact:
if cmyk and not HAVE_EXACT_CMYK8:
raise Exception("cmyk cannot be exact before ImageMagick 7.1.0-48")
elif icc:
raise Exception("icc cannot be exact")
else:
subprocess.check_call(
COMPARE
+ [
"-metric",
"AE",
"-alpha",
"off",
im1,
im2,
"null:",
]
)
else:
iccargs = []
if icc:
if ICC_PROFILE is None:
pytest.skip("Could not locate an ICC profile")
iccargs = ["-profile", ICC_PROFILE]
psnr = subprocess.run(
COMPARE
+ iccargs
+ [
"-metric",
"PSNR",
im1,
im2,
"null:",
],
check=False,
stderr=subprocess.PIPE,
).stderr
assert psnr != b"0"
assert psnr != b"0 (0)"
assert psnr_re.fullmatch(psnr) is not None, psnr
psnr = psnr_re.fullmatch(psnr).group(1)
psnr = float(psnr)
assert psnr != 0 # or otherwise we would use the exact variant
> assert psnr > 50
E assert 6.35075 > 50
cmyk = False
exact = False
icc = False
iccargs = []
im1 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161/gs-1.tiff'
psnr = 6.35075
src/img2pdf_test.py:396: AssertionError
______________________________________________________ test_miff_cmyk16[pikepdf] ______________________________________________________
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>, _basetemp=PosixP.../tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0')
, _retention_count=0, _retention_policy='failed')
miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf1/out.pdf')
@pytest.mark.skipif(
sys.platform in ["win32"],
reason="test utilities not available on Windows and MacOS",
)
def test_miff_cmyk16(
tmp_path_factory, miff_cmyk16_img, tiff_cmyk16_img, miff_cmyk16_pdf
):
tmpdir = tmp_path_factory.mktemp("miff_cmyk16")
> compare_ghostscript(
tmpdir, tiff_cmyk16_img, miff_cmyk16_pdf, gsdevice="tiff32nc", exact=False
)
miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf1/out.pdf')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
tmp_path_factory = TempPathFactory(_given_basetemp=None,
_trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>,
_basetemp=PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0'),
_retention_count=0,
_retention_policy='failed')
tmpdir = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162')
src/img2pdf_test.py:6422:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/img2pdf_test.py:418: in compare_ghostscript
compare(str(img), str(tmpdir / "gs-1.") + ext, exact, icc, False)
exact = False
ext = 'tiff'
gsdevice = 'tiff32nc'
icc = False
img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf1/out.pdf')
tmpdir = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
im1 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162/gs-1.tiff', exact = False, icc = False
cmyk = False
def compare(im1, im2, exact, icc, cmyk):
if exact:
if cmyk and not HAVE_EXACT_CMYK8:
raise Exception("cmyk cannot be exact before ImageMagick 7.1.0-48")
elif icc:
raise Exception("icc cannot be exact")
else:
subprocess.check_call(
COMPARE
+ [
"-metric",
"AE",
"-alpha",
"off",
im1,
im2,
"null:",
]
)
else:
iccargs = []
if icc:
if ICC_PROFILE is None:
pytest.skip("Could not locate an ICC profile")
iccargs = ["-profile", ICC_PROFILE]
psnr = subprocess.run(
COMPARE
+ iccargs
+ [
"-metric",
"PSNR",
im1,
im2,
"null:",
],
check=False,
stderr=subprocess.PIPE,
).stderr
assert psnr != b"0"
assert psnr != b"0 (0)"
assert psnr_re.fullmatch(psnr) is not None, psnr
psnr = psnr_re.fullmatch(psnr).group(1)
psnr = float(psnr)
assert psnr != 0 # or otherwise we would use the exact variant
> assert psnr > 50
E assert 6.35075 > 50
cmyk = False
exact = False
icc = False
iccargs = []
im1 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162/gs-1.tiff'
psnr = 6.35075
src/img2pdf_test.py:396: AssertionError
|
I get |
Pkease try the patch from https://gitlab.mister-muffin.de/josch/img2pdf/issues/178 and see if that helps. |
The NixOS patch? It's for cmyk8 cases only. The author even notes that cmyk16 cases still fail for them after applying it. Perhaps it's ImageMagick flags? I've got 7.1.1.25, |
If I limit the flags to absolute minimum, the tests pass. I'm going to try different flag combinations to figure out which one causes the problem. |
Ok, it's |
Signed-off-by: Marcin Deranek <marcin.deranek@slonko.net> Co-authored-by: Michał Górny <mgorny@gentoo.org> Closes: https://bugs.gentoo.org/921240 Closes: https://bugs.gentoo.org/929621
Pull request CI reportReport generated at: 2024-06-03 22:10 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'm going to add xdist back, because the tests are slow, then push and open rekeywording.
Do you want to maintain it going forward, by the way? |
Not really. I removed |
Version bump to
0.5.1
formedia-gfx/img2pdf
Dropped
ppc64
arch due to dependency onmedia-libs/icc-profiles-openicc
which is not supported onppc64
Please check all the boxes that apply:
Signed-off-by
line to every commit in the pull request.pkgcheck scan --commits --net
to check for issues with my commits.Please note that all boxes must be checked for the pull request to be merged.