-
Notifications
You must be signed in to change notification settings - Fork 33
MNT: adapt to qtapp-centralization in mne-tools/mne-python#10048 #30
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
b926cbc to
ca31ab0
Compare
|
When mne-tools/mne-python#10048 and this PR are merged, I would suggest bumping to a new version. @larsoner I can do it when you approved and merged mne-tools/mne-python#10048 |
mne_qt_browser/_pg_figure.py
Outdated
|
|
||
| from mne.viz import plot_sensors | ||
| from mne.viz.backends._utils import _init_qt_resources | ||
| from mne.viz.backends._utils import _init_mne_qtapp |
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 is going to be a problem for people on 0.24. We won't backport the _init_mne_qtapp since it's an enhancement, so you'll have to try/except it here for now.
One way to take care of this is to try to import, and if it fails, just have a copy-paste copy here for a couple of months until we release 1.0 (and 0.24 is thus no longer supported).
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.
Ah ok, I didn't know that backport-policy.
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.
Yeah we have to make sure that a new release of mne-qt-browser works for both people on stable MNE (currently 0.24) and latest dev MNE (1.0.dev0). Hopefully the CIs already have this setup, in theory they should catch this error!
mne_qt_browser/_pg_figure.py
Outdated
| # Reshape data to reasonable size for display | ||
| max_pixel_width = QApplication.desktop().screenGeometry().width() | ||
| if QApplication.desktop() is None: | ||
| max_pixel_width = 1920 # defaul=FHD |
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.
I know people who have had 4K for years, and I think it's more the standard nowadays...
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.
Ok, I wish I had one too... ;)
larsoner
left a comment
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, will merge once CIs come back happy. Thanks @marsipu !
Description
This PR adapts to the changes made in mne-tools/mne-python#10048 for the centralization of the Qt-Application intialization.
It should only be merged after the aforementioned PR is merged in the maintenance-branch of mne-python.