diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 35e9fdc..9245a2c 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -44,7 +44,7 @@ jobs: with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' - name: Lint with flake8 @@ -70,9 +70,9 @@ jobs: with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.11' - name: Install and build run: | python -m pip install --upgrade pip setuptools wheel @@ -89,7 +89,7 @@ jobs: with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install and build @@ -109,7 +109,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install and build diff --git a/.github/workflows/predeps_workflow.yml b/.github/workflows/predeps_workflow.yml index 6ba514a..5310a99 100644 --- a/.github/workflows/predeps_workflow.yml +++ b/.github/workflows/predeps_workflow.yml @@ -23,7 +23,7 @@ jobs: with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install and build diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 7a37ec6..1733e7c 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -25,7 +25,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' diff --git a/CHANGES.rst b/CHANGES.rst index 67083c0..23cd420 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,15 @@ 1.5 (unreleased) ---------------- +Other Changes and Additions +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Compatibility with Ginga 5. [#234] + +- This version requires Python 3.9 or later. + Also bumped minimum versions of other dependencies to + ``astropy>=5``, ``ginga>=4.1``, and ``scipy>=1``. [#234] + 1.4 (2023-11-28) ---------------- diff --git a/docs/stginga/install.rst b/docs/stginga/install.rst index 8bf95a3..b6c7635 100644 --- a/docs/stginga/install.rst +++ b/docs/stginga/install.rst @@ -5,7 +5,7 @@ Installation ``stginga`` requires: -* Python 3.8 or later +* Python 3.9 or later * Astropy * SciPy * Ginga, see `Ginga's documentation `_ diff --git a/setup.cfg b/setup.cfg index fbe3aca..5dc0a46 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,10 +35,10 @@ packages = find: zip_safe = False install_requires = numpy - astropy>=3 - ginga>=2.7 - scipy>=0.18 -python_requires = >=3.8 + astropy>=5 + ginga>=4.1 + scipy>=1 +python_requires = >=3.9 [options.extras_require] test = diff --git a/stginga/plugins/local_plugin_mixin.py b/stginga/plugins/local_plugin_mixin.py index a5aabc9..b3aaaad 100644 --- a/stginga/plugins/local_plugin_mixin.py +++ b/stginga/plugins/local_plugin_mixin.py @@ -26,20 +26,14 @@ class HelpMixin(object): def help(self): """Display online help for the plugin.""" - if not self.fv.gpmon.has_plugin('WBrowser'): - self._help_docstring() + if not hasattr(self.fv, 'help_plugin'): + # ginga < v5.x, open in external browser + import webbrowser + webbrowser.open(self.help_url) return - self.fv.start_global_plugin('WBrowser') - - # need to let GUI finish processing, it seems - self.fv.update_pending() - - obj = self.fv.gpmon.get_plugin('WBrowser') - - # Unlike Ginga, we do not attempt to download offline doc - # but just point to online doc directly. - obj.browse(self.help_url) + # ginga v5.x + self.fv.help_plugin(self, url=self.help_url) class MEFMixin(object):