From c4954c496beec5fc0fcb680683a7a84439161241 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:33:42 -0500 Subject: [PATCH 1/7] Stop using _astropy_init.py --- astrowidgets/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/astrowidgets/__init__.py b/astrowidgets/__init__.py index bd7beee..9462aaf 100644 --- a/astrowidgets/__init__.py +++ b/astrowidgets/__init__.py @@ -1,9 +1,7 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst - -# Packages may add whatever they like to this file, but -# should keep this content at the top. -# ---------------------------------------------------------------------------- -from ._astropy_init import * # noqa -# ---------------------------------------------------------------------------- +try: + from .version import version as __version__ +except ImportError: + __version__ = '' from .ginga import * # noqa From 6b653494eed3845e972818a8e6e637dd98dcdce5 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:33:57 -0500 Subject: [PATCH 2/7] Delete astrowidgets/_astropy_init.py --- astrowidgets/_astropy_init.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 astrowidgets/_astropy_init.py diff --git a/astrowidgets/_astropy_init.py b/astrowidgets/_astropy_init.py deleted file mode 100644 index ce06f8d..0000000 --- a/astrowidgets/_astropy_init.py +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -__all__ = ['__version__'] - - -try: - from .version import version as __version__ -except ImportError: - __version__ = '' - -import os - -# Create the test function for self test -from astropy.tests.runner import TestRunner -test = TestRunner.make_test_runner_in(os.path.dirname(__file__)) -test.__test__ = False -__all__ += ['test'] From d893ae67e2e5e40453f53607b99b1d3a07230fd5 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:34:59 -0500 Subject: [PATCH 3/7] Delete astrowidgets/conftest.py because we do not use astropy test runner, so root level copy is enough --- astrowidgets/conftest.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 astrowidgets/conftest.py diff --git a/astrowidgets/conftest.py b/astrowidgets/conftest.py deleted file mode 100644 index 8446f5f..0000000 --- a/astrowidgets/conftest.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file is used to configure the behavior of pytest when using the Astropy -# test infrastructure. -try: - from pytest_astropy_header.display import (PYTEST_HEADER_MODULES, - TESTED_VERSIONS) -except ImportError: - PYTEST_HEADER_MODULES = {} - TESTED_VERSIONS = {} - -# Uncomment and customize the following lines to add/remove entries from -# the list of packages for which version numbers are displayed when running -# the tests. Making it pass for KeyError is essential in some cases when -# the package uses other astropy affiliated packages. -PYTEST_HEADER_MODULES['Astropy'] = 'astropy' -PYTEST_HEADER_MODULES['Ginga'] = 'ginga' -PYTEST_HEADER_MODULES.pop('h5py', None) -PYTEST_HEADER_MODULES.pop('Pandas', None) - -# Uncomment the following lines to display the version number of the -# package rather than the version number of Astropy in the top line when -# running the tests. -try: - from astrowidgets import __version__ as version -except ImportError: - version = 'unknown' -TESTED_VERSIONS['astrowidgets'] = version From ef98f2914642785edc35fdb38a02dcc012f88d37 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:38:03 -0500 Subject: [PATCH 4/7] Update setup.cfg --- setup.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 37bc91a..e5fd06b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -56,8 +56,6 @@ docs = [coverage:run] source = astrowidgets omit = - astrowidgets/_astropy_init* - astrowidgets/conftest* astrowidgets/cython_version* astrowidgets/setup_package* astrowidgets/*/setup_package* @@ -66,8 +64,6 @@ omit = astrowidgets/*/tests/* astrowidgets/*/*/tests/* astrowidgets/version* - */astrowidgets/_astropy_init* - */astrowidgets/conftest* */astrowidgets/cython_version* */astrowidgets/setup_package* */astrowidgets/*/setup_package* From c98564fd2c84563e87ebf130a581b8f8339d9741 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:39:29 -0500 Subject: [PATCH 5/7] Update tox.ini --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 9f0b5d9..7d2f035 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311}-test{,-devdeps,-predeps} + py{310,311,312,313}-test{,-devdeps,-predeps} requires = setuptools >= 30.3.0 pip >= 19.3.1 @@ -9,6 +9,7 @@ requires = setenv = MPLBACKEND=agg JUPYTER_PLATFORM_DIRS=1 + devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple extras = test @@ -16,7 +17,7 @@ changedir = test: .tmp/{envname} deps = - devdeps: git+https://github.com/astropy/astropy.git#egg=astropy + devdeps: astropy>=0.0.dev0 devdeps: git+https://github.com/ejeschke/ginga.git#egg=ginga commands = From 989dcd6414209f2beab2b3382e570fea5d664a96 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:48:22 -0500 Subject: [PATCH 6/7] TST: Bump Python versions --- .github/workflows/ci_workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 8d61509..f97886d 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: - python-version: '3.10' + python-version: '3.11' - name: Install and build run: python -m pip install tox --upgrade - name: Run tests @@ -56,7 +56,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: - python-version: '3.11' + python-version: '3.13' - name: Install and build run: python -m pip install tox --upgrade - name: Run tests From 41a19c6e3fbc12cc8f54d28462a11e33379e86b1 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:49:38 -0500 Subject: [PATCH 7/7] Update ci_workflows.yml --- .github/workflows/ci_workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index f97886d..6a5df31 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -46,7 +46,7 @@ jobs: - name: Install and build run: python -m pip install tox --upgrade - name: Run tests - run: tox -e py310-test + run: tox -e py311-test devtests: runs-on: ubuntu-latest @@ -60,4 +60,4 @@ jobs: - name: Install and build run: python -m pip install tox --upgrade - name: Run tests - run: tox -e py311-test-devdeps + run: tox -e py313-test-devdeps