-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
STY: Add two abbreviations for an inline image object #3048
base: main
Are you sure you want to change the base?
Conversation
CCF and DCT appended to function decode_stream_data.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3048 +/- ##
=======================================
Coverage 96.36% 96.36%
=======================================
Files 52 52
Lines 8770 8770
Branches 1596 1596
=======================================
Hits 8451 8451
Misses 191 191
Partials 128 128 ☔ View full report in Codecov by Sentry. |
This apparently is not covered by any tests. Are you able to add corresponding ones? |
Short term maybe not. Could raise as an issue? |
We usually have the policy to only merge changes which received proper testing, thus merging it now and adding the tests later is not really the way to go. The easiest solution would be to identify the existing relevant test files and run them through the corresponding test after doing a search-and-replace run for the filter name. |
Fair. Okay I think you are saying find the tests for CCITT_FAX_DECODE and DCT_DECODE, then find the associated files containing /CCITTFaxDecode and /DCTDecode, and then change these to /CCF and /DCT? |
Yes. |
The abbreviations are mainly (always? I need to read the specification!) for the inline images, but this would work. Ideally the same PDF used for the /CCITTFaxDecode test could have a /CCF in a different stream (same for /DCTDecode and /DCT) to avoid proliferation of files. |
We can use the same PDF if we replace the offending specifiers on the fly. Alternatively, we might be able to construct a dummy example to just have an unit test of the corresponding function instead of a full-blown integration test, but both cases require further research/preparation. |
In filters.py some filters that do not have parameters have a |
No, this should not be removed to have a consistent interface. |
The consistency of the interfaces is unused. This would be for a future use case? |
Not in our code, but its public API, so someone might use it in a way that such a parameter is always passed (although unused internally). To keep it simple and consistent, I am against removing them - regardless of whether they are needed or not. |
We have the I think the filters code (including _xobj_image_helpers.py) could be simpler. The docstring of |
The discussions tend to get more and more out of scope for this PR. Please keep on topic for the actual changes to keep the overview. |
CCF and DCT appended to function decode_stream_data.