Skip to content

Commit

Permalink
Remove more Qt-dependent code, and also remove glue._deps which is no…
Browse files Browse the repository at this point in the history
… longer really needed (pip freeze or conda list are usually sufficient) and also remove most of glue.main which concerned the Qt application
  • Loading branch information
astrofrog committed Aug 10, 2023
1 parent 27576fb commit f90f5b5
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 772 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ glue/_githash.py
# Other
.pylintrc
*.ropeproject
glue/qt/glue_qt_resources.py
*.__junk*
*.orig
*~
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ python:
path: .
extra_requirements:
- docs
- qt
- all

formats: []
21 changes: 2 additions & 19 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
'astropy': ('https://docs.astropy.org/en/stable/', None),
'echo': ('https://echo.readthedocs.io/en/latest/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'PyQt5': ('https://www.riverbankcomputing.com/static/Docs/PyQt5/', None),
}

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -125,27 +124,11 @@
todo_include_todos = True
autoclass_content = 'both'

nitpick_ignore = [('py:obj', 'glue.viewers.common.qt.toolbar.BasicToolbar.insertAction'),
('py:obj', 'glue.viewers.common.qt.toolbar.BasicToolbar.setTabOrder'),
('py:class', 'glue.viewers.histogram.layer_artist.HistogramLayerBase'),
nitpick_ignore = [('py:class', 'glue.viewers.histogram.layer_artist.HistogramLayerBase'),
('py:class', 'glue.viewers.scatter.layer_artist.ScatterLayerBase'),
('py:class', 'glue.viewers.image.layer_artist.ImageLayerBase'),
('py:class', 'glue.viewers.image.layer_artist.RGBImageLayerBase'),
('py:class', 'glue.viewers.image.state.BaseImageLayerState'),
('py:class', 'glue.viewers.common.qt.toolbar.BasicToolbar'),
('py:class', 'glue.viewers.common.qt.base_widget.BaseQtViewerWidget'),
('py:class', 'sip.voidptr'),
('py:class', 'PyQt5.sip.voidptr'),
('py:class', 'PYQT_SLOT')]

nitpick_ignore_regex = [('py:class', r'PyQt5\.QtCore\.Q[A-Z][a-zA-Z]+'),
('py:class', r'PyQt5\.QtWidgets\.Q[A-Z][a-zA-Z]+'),
('py:class', r'PyQt6\.QtCore\.Q[A-Z][a-zA-Z]+'),
('py:class', r'PyQt6\.QtWidgets\.Q[A-Z][a-zA-Z]+'),
('py:class', r'Qt\.[A-Z][a-zA-Z]+'),
('py:class', r'QPalette\.[A-Z][a-zA-Z]+'),
('py:class', r'QWidget\.[A-Z][a-zA-Z]+'),
('py:class', r'Q[A-Z][a-zA-Z]+')]
('py:class', 'glue.viewers.image.state.BaseImageLayerState')]

viewcode_follow_imported_members = False

Expand Down
14 changes: 0 additions & 14 deletions glue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,3 @@ def test(no_optional_skip=False):

from glue._settings_helpers import load_settings
load_settings()


# In PyQt 5.5+, PyQt overrides the default exception catching and fatally
# crashes the Qt application without printing out any details about the error.
# Below we revert the exception hook to the original Python one. Note that we
# can't just do sys.excepthook = sys.__excepthook__ otherwise PyQt will detect
# the default excepthook is in place and override it.


def handle_exception(exc_type, exc_value, exc_traceback):
sys.__excepthook__(exc_type, exc_value, exc_traceback)


sys.excepthook = handle_exception
300 changes: 0 additions & 300 deletions glue/_deps.py

This file was deleted.

7 changes: 0 additions & 7 deletions glue/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ def pytest_configure(config):
load_plugins()


def pytest_report_header(config):
from glue import __version__
glue_version = "%20s:\t%s" % ("glue", __version__)
from glue._deps import get_status
return os.linesep + glue_version + os.linesep + os.linesep + get_status()


def pytest_unconfigure(config):

os.environ.pop('GLUE_TESTING')
Expand Down
Loading

0 comments on commit f90f5b5

Please sign in to comment.