Adding a test framework for sphinx-simplepdf#121
Conversation
|
Currently there is no github action to perform tests, nor are lint tests etc working. The only tests working are e.g. |
|
for #120 and sphinx 7.4 the tests fails cause the links associcated with |
|
@ubmarco any suggestions? |
|
This is related to #119, also introducing a pyproject.toml file. |
|
The PR #119 got merged, please rebase this |
|
This branch / pull request needs a review by a real python developer. I tried to merge by best knowledge, but due to my main scope (c++) i am not sure how to handle all the stuff in pyproject.toml. |
|
The relations between the demo project and the doc projects seems to be covered now, but i have no idea thats the difference between the Some targets now work, e.g. |
|
❗ should not be merged until windows tests are also successfull. currently disabled but on work.... |
|
Looking at the main branch, i see that weasyprint also does not work there. |
|
Yeah, 😀 , this was hard work 💪 but glad to finish it at the end with success 🎉 @ubmarco , @danwos : This is just a beginning if you see our discussions at #83, but you see how important even for simple tests of the extension it is helpful. PDF Generation out of the requirement documents is not just a gimmick, from our customers’ and managers’ perspective, this is a must-have acceptance criterion ❗ |
Very true, internally, i have, a 3 digit number of tests covering PDF generation. |
We do the same, currently we use libpdf for this in our test environment for the pdfs. If you want it could be helpful to share your experience in #83 with tips and suggestions about what and how you test |
patdhlk
left a comment
There was a problem hiding this comment.
Tests are green, framework looks solid. Approving to merge now — follow-up issues will be filed for items that need attention before release.
|
pyproject.toml — dev tools in production dependencies
Additionally, |
|
pyproject.toml — weasyprint hard pin
Is there a specific reason for the hard pin? If so, could you document it? Otherwise a bounded range like |
|
simplepdf.py — logger.warning demoted to logger.info WeasyPrint retry messages ( A timeout or crash during a retry is something users should see without needing verbose mode, and builds using |
|
simplepdf.py — heading class rework is a breaking change The heading logic removes This should get a changelog entry and a migration note so users know what to update in their custom stylesheets. |
|
_fonts.scss — @font-face comma syntax is broken The Additionally, the first declaration uses The correct approach would be to use a consistent quoted name across all three @font-face {
font-family: "Fira Mono";
src: url(fonts/FiraMono-Regular.ttf);
}
@font-face {
font-family: "Fira Mono";
font-weight: 500;
src: url(fonts/FiraMono-Medium.ttf);
}
@font-face {
font-family: "Fira Mono";
font-weight: bold;
src: url(fonts/FiraMono-Bold.ttf);
}Then reference it with a fallback in regular style rules: |
|
tests/ — German comments should be translated Several comments and docstrings are in German: |
|
tests/ — commented-out assertion and unconditionally skipped test
|
Review SummaryThanks for the contribution — having a test framework for this project is a big step forward. The A few items that should be addressed before release (see individual comments above): Bugs:
Breaking changes needing documentation:
Dependency issues:
Minor cleanup:
|
|
Thanks for the merge. I just wondered why we didn't fix the issues BEFORE the merge was done. But ok. |
First implementation of a tox based test framework, trying to handle issues #112 and #120 in current versions