-
Notifications
You must be signed in to change notification settings - Fork 6
Add interactive file tests for vtksz files with doc mode #227
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #227 +/- ##
==========================================
- Coverage 98.02% 96.56% -1.47%
==========================================
Files 4 4
Lines 659 844 +185
Branches 82 104 +22
==========================================
+ Hits 646 815 +169
- Misses 7 20 +13
- Partials 6 9 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was tested upstream with pyvista/pyvista#7878 Wondering if maybe @akaszynski can comment on this? I think it's useful to test the interactive images (there are many open issues about interactive plots not working), but perhaps it's not worth it if it adds so much overhead? Instead of generating |
Considering we've had a few bad interactive images, I see no issue with including this in our testing. Ideally we could get the time down to ~20 minutes using parallel testing. We have enough servers to support this testing, and I have two spares should this end up bogging down our CI. |
Thanks for the feedback. Let's keep this feature as part of |
Reduced to 17 mins by using a single browser context with 584da66, see the run here: https://github.com/pyvista/pyvista/actions/runs/17775690805/job/50522678419?pr=7878#step:13:51840 And I tried using |
17 minutes is more than good! Nice work. |
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.
Can remove these skips once #230 is merged
Ready for review |
return output_paths | ||
|
||
|
||
def _html_screenshots(html_files: list[Path], output_dir: Path, *, log: bool = True) -> list[Path]: |
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.
Logging is currently enabled by default and cannot be configured. For the PyVista repo, this will print more than 3000 lines for the 1500+ images.
This should be configurable, but I would prefer to do this in a separate PR.
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.
This should be configurable, but I would prefer to do this in a separate PR.
Agreed. Let's disable this.
batches = _split_batches(html_files, num_workers) | ||
with multiprocessing.Pool(processes=num_workers) as pool: | ||
results_nested = pool.starmap( | ||
_process_html_screenshots, | ||
[(batch, output_dir, log) for batch in batches], | ||
) |
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.
Nice work here!
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.
Impressed you got this working (and with multiprocessing
no less). Nice work, LGTM.
Resolve #220
--include_vtksz
flag to enable these tests