-
Notifications
You must be signed in to change notification settings - Fork 446
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
Update plots before scraping #5283
Conversation
Can you check if the
Not sure how to do that if anyone has a second. |
I ran this locally and it fixes my issue. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5283 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 134 134
Lines 22712 22700 -12
=======================================
- Hits 21850 21839 -11
+ Misses 862 861 -1 |
Thanks for your contribution. To pass test coverage, we need a sample for adding a test. Please provide us with a sample that you have run locally. |
I ran the sample linked in the issue but that involves MNE and is far too large but the gist is to set the camera before rendering and make sure that has taken effect. I implemented a minimal version in tinypages. Should be good to go now. |
pre-commit.ci autofix |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Sorry about not figuring out the pre-commit protocol, got it working now and it's very nice. I'm not sure if it's easiest to mark this to test it only on the CIs with the MNE dependencies. I'm not sure of a way to do that in this case though... |
Never mind. We are happy to show that our CI is excellent.
|
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.
Would you mind the output of the image to three pieces in order to keep the existing test intact?
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.
LGTM. Thanks!
I moved the tests to |
I got down a bit of a rabbit hole trying to add coverage for the dynamic scraper but it looks like it doesn't have any coverage in general so maybe not the PR to do it in. I was close to adding it, just with Should be good to go after implementing the change you asked for with a new test function without branching logic. |
Looks good to go by me |
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.
LGTM. Let's make a test of DynamicScraper
in the future.
Thanks for the help and review @tkoyama010 |
- name: Setup xvfb dependencies | ||
run: | | ||
git clone --depth=1 https://github.com/mne-tools/mne-python.git --branch main --single-branch | ||
./mne-python/tools/setup_xvfb.sh | ||
|
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.
Woah... why was this added here? This needs to be removed ASAP as this section of the tests is strictly non-graphics.
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.
Further I want to discourage the use of custom scripts from external projects in our core CI routines. We should keep any configuration and set up limited to well-established GitHub Actions or scripts managed by PyVista.
Adding and executing arbitrary shell scripts is a major red flag and security risk albeit this is from a well-trusted downstream project.
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.
That sounds reasonable. They were added for PyQtx.QWidgets.QApplication.process_events testing. Not sure there is a way to fake that for non-graphics tests, I just don't know there might be though. Otherwise since it was tested it could be no covered.
PyQt6!=6.6.1,<6.7.0 | ||
PyQt6-Qt6!=6.6.1,<6.7.0 | ||
pytest<7.5.0 | ||
pytest-cov<4.2.0 | ||
pytest-memprof<0.3.0 | ||
pytest-xdist<3.4.0 | ||
pytest_pyvista==0.1.8 | ||
qtpy<2.5.0 |
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.
We do not test Qt dependencies in PyVista. This was a part of the entire motivation for making PyVistaQt a separate repository
Apologies @alexrockhill and @tkoyama010 but these changes need to be reverted as they are too impactful and need to undergo a more thorough review |
This reverts commit f96feb4.
def __repr__(self): | ||
"""Return a stable representation of the class instance.""" | ||
return f"<{type(self).__name__} object>" | ||
|
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.
@alexrockhill, why was this needed? We do not intend for this class to be used or displayed to users as far as I understand?
Asking because I'm going to see if I can re-land this PR with less impact
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.
It was added when I was trying to add coverage of the dynamic scraper but then not removed when adding that coverage exposed a bug where the dynamic scraper failed to close plots and so that was punted to a future PR.
Fixes #5277