Closed adam2392 closed 3 years ago
If we want to follow MNE-Python logic, these should live in mne_connectivity/viz/tests
and not mne_connectivity/tests/viz
.
If we want to follow MNE-Python logic, these should live in
mne_connectivity/viz/tests
and notmne_connectivity/tests/viz
.
Done.
Not sure why the GH actions were not running to completion, so just restarted the jobs.
@larsoner actually it looks almost like the entire unit testing suite is stalling on the GH Ubuntu build. Is there anything special with the conftest that I'm missing?
My suspicion was perhaps the plots are not closing inside the GH actions, which makes them time out?
Oh yes you'll need the other viz fixture in MNE-Python that sets the backend to agg so that nothing blocks (the Qt backend, which is default on most OSes, will block):
https://github.com/mne-tools/mne-python/blob/main/mne/conftest.py#L170-L210
You shouldn't need the traits
stuff but the exception handling is useful
Hmmm the viz is still stalling now without the explicit plt.close()
?
@adam2392 FYI it's better practice to open PRs from your fork rather than the main repo
Tbh, I'm not sure why things are still stalling:
requirements.txt
file at :https://github.com/mne-tools/mne-python/blob/main/requirements.txttools/*.sh
files match what we have in this repo- run: ./tools/setup_xvfb.sh
in my GH action workflow.mne/conftest.py
that was relevant to plotting Did I miss something?
I think VTK 9.0.3 is the problem, we don't actually test it over in MNE-Python. For all builds we use conda except:
I pushed a commit that might fix it...
It's a bit annoying that the GH actions are taking forever, so I added auto-cancelling via concurrency (see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency)
pytest-timeout
to hopefully help with timeoutspytest_configure
to run matplotlib_config
automagicallysqrtm
call)@adam2392 can you see if this all makes sense to you?
Bumped to Python 3.7+ requirement (same as MNE) and got rid of 3.6 on CIs
Ah nice, was the issue then coming from the fact that it was Python3.6?, or that Python3.9 was too high for certain vtk versions?
Or was it that I didn't set the matplotlib_config correctly before?
The LOC makes sense, but jw for my own sake.
Or was it that I didn't set the matplotlib_config correctly before?
matplotlib_config
was not being called because it wasn't being set to being automatically used (now it is by pytest_configure
), and hence it was getting stuck when a matplotlib figure was created and shown.
The VTK stuff probably does not matter, I'll try setting that back.
Thanks @larsoner !
PR Description
Adds tests for viz that weren't added before.
Moved back
circular_layout
to mne.viz according to @larsoner comments.Merge checklist
Maintainer, please confirm the following before merging: