Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

user27182
Copy link
Contributor

Overview

pytest-xdist is included in the test dependencies, but it's not currently used. This PR enables its use.

@pyvista-bot pyvista-bot added the maintenance Low-impact maintenance activity label Jun 17, 2025
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.42%. Comparing base (5b73953) to head (4e92490).
⚠️ Report is 102 commits behind head on main.

❌ Your project check has failed because the head coverage (41.42%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (5b73953) and HEAD (4e92490). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (5b73953) HEAD (4e92490)
14 7
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7624       +/-   ##
===========================================
- Coverage   96.35%   41.42%   -54.94%     
===========================================
  Files         150      152        +2     
  Lines       32317    32565      +248     
  Branches     4080     4146       +66     
===========================================
- Hits        31139    13489    -17650     
- Misses        571    18276    +17705     
- Partials      607      800      +193     

@pyvista-bot
Copy link
Contributor

pyvista-bot commented Jun 17, 2025

@pyvista-bot pyvista-bot temporarily deployed to pull request June 17, 2025 09:05 Inactive
@pyvista-bot pyvista-bot temporarily deployed to pull request June 18, 2025 17:53 Inactive
@MatthewFlamm
Copy link
Contributor

MatthewFlamm commented Jun 18, 2025

Looks like there are problems with trying to simultaneously handle the same file when downloading it or transferring it from the local vtk-data repo clone. We could consider using --dist loadgroup and manually marking all tests that use download data to be in the same group (or split them up into multiple groups). Could be annoying to maintain, but the speedups look promising.

Also getting errors about the naming/ordering of tests being consistent in some cases.

@user27182
Copy link
Contributor Author

Looks like there are problems with trying to simultaneously handle the same file when downloading it or transferring it from the local vtk-data repo clone. We could consider using --dist loadgroup and manually marking all tests that use download data to be in the same group (or split them up into multiple groups). Could be annoying to maintain, but the speedups look promising.

The speedups do look promising. We could also try directly adding a hook to the dataset loader class, and always make a temp copy of the files before loading and use a CI-specific flag to control this.

Also getting errors about the naming/ordering of tests being consistent in some cases.

In the docs I did see that using parametrize with sets can be problematic, might need to look over some of these and use lists instead

@user27182
Copy link
Contributor Author

We're getting some mysterious crashes:
https://github.com/pyvista/pyvista/actions/runs/15746300270/job/44383463654?pr=7624#step:15:3765

[gw0] linux -- Python 3.9.22 /opt/hostedtoolcache/Python/3.9.22/x64/bin/python
worker 'gw0' crashed while running 'tests/plotting/jupyter/test_trame.py::test_trame_plotter_ui[vue2]'

https://github.com/pyvista/pyvista/actions/runs/15746300270/job/44383463660?pr=7624#step:15:3807

[gw0] linux -- Python 3.9.22 /opt/hostedtoolcache/Python/3.9.22/x64/bin/python
worker 'gw0' crashed while running 'tests/plotting/test_plotting.py::test_plot_depth_peeling'

Not sure if these are flaky or what the cause is. test_plot_depth_peeling uses download_airplane but test_trame_plotter_ui[vue2] does not appear to download anything

@pyvista-bot pyvista-bot temporarily deployed to pull request June 19, 2025 01:40 Inactive
@user27182
Copy link
Contributor Author

Not sure if these are flaky or what the cause is. test_plot_depth_peeling uses download_airplane but test_trame_plotter_ui[vue2] does not appear to download anything

These are flaky, tests pass after restarting. Will try --dist loadgroup for some test modules.

@pyvista-bot pyvista-bot temporarily deployed to pull request June 19, 2025 06:07 Inactive
@pyvista-bot pyvista-bot temporarily deployed to pull request June 19, 2025 19:07 Inactive
@user27182
Copy link
Contributor Author

Plotting tests seem to be working now without issue... will enable core tests and add xdist groups

@pyvista-bot pyvista-bot temporarily deployed to pull request June 20, 2025 00:05 Inactive
@pyvista-bot pyvista-bot temporarily deployed to pull request June 20, 2025 02:23 Inactive
@pyvista-bot pyvista-bot temporarily deployed to pull request June 20, 2025 07:47 Inactive
@pyvista-bot pyvista-bot temporarily deployed to pull request June 20, 2025 13:25 Inactive
@user27182
Copy link
Contributor Author

To use pytest-xdist, it seems we'll need to refactor the test fixtures, e.g. #7633. If there is limited appetite or availability to support making these kinds of changes then we can probably close this PR.

@pyvista-bot pyvista-bot temporarily deployed to pull request July 7, 2025 22:57 Inactive
@user27182 user27182 mentioned this pull request Aug 13, 2025
4 tasks
@beroda beroda mentioned this pull request Aug 31, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants