From ecd828a1bec430b610160788a082a40f795cb6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Fri, 22 Oct 2021 17:15:12 -0700 Subject: [PATCH 1/9] [MNT] Adding python 3.10 testing to CI --- .github/workflows/ci_tests.yml | 6 +++--- tox.ini | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 0a80a686c0..43f1bba5d9 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -29,7 +29,7 @@ jobs: - name: docs build os: ubuntu-latest - python: 3.8 + python: 3.9 toxenv: build_docs toxargs: -v @@ -41,8 +41,8 @@ jobs: - name: astropy dev with all dependencies with coverage os: ubuntu-latest - python: 3.9 - toxenv: py39-test-alldeps-devastropy-cov + python: 3.10 + toxenv: py310-test-alldeps-devastropy-cov toxargs: -v - name: Python 3.7 with all optional dependencies (MacOS X) diff --git a/tox.ini b/tox.ini index 461dc4aae8..a66060fd2c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{37,38,39}-test{,-alldeps,-oldestdeps}{,-devastropy}{,-cov} + py{37,38,39,310}-test{,-alldeps,-oldestdeps}{,-devastropy}{,-cov} codestyle build_docs requires = @@ -41,8 +41,8 @@ deps = extras = test - !py39-alldeps: all_lt_39 - py39-alldeps: all + !py{37,38}-alldeps: all_lt_39 + py{39,310}-alldeps: all commands = pip freeze From 7af45423027386174af4d07788a2c75d2c41884c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Mon, 1 Nov 2021 16:31:56 -0700 Subject: [PATCH 2/9] Fix YAML parsing issue --- .github/workflows/ci_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 43f1bba5d9..edf1adf0b8 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -41,7 +41,7 @@ jobs: - name: astropy dev with all dependencies with coverage os: ubuntu-latest - python: 3.10 + python: '3.10' toxenv: py310-test-alldeps-devastropy-cov toxargs: -v From d9a31e6e7ea161448d198b91dfdd398b9ccec517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 2 Nov 2021 00:48:19 -0700 Subject: [PATCH 3/9] Can't use mocpy for 3.10 just yet, but all else should work --- setup.cfg | 5 +++++ tox.ini | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 71f8016780..cf00bec63b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -168,6 +168,11 @@ docs= sphinx-astropy>=1.5 scipy all= +# mocpy's dependency cdshealpix doesn't compile with 3.10 yet + astropy-healpix + boto3 + regions +all_lt_310= mocpy>=0.5.2 astropy-healpix boto3 diff --git a/tox.ini b/tox.ini index a66060fd2c..9c9a64fd59 100644 --- a/tox.ini +++ b/tox.ini @@ -41,8 +41,9 @@ deps = extras = test - !py{37,38}-alldeps: all_lt_39 - py{39,310}-alldeps: all + py{37,38}-alldeps: all_lt_39 + py39-alldeps: all_lt_310 + py310-alldeps: all commands = pip freeze From 6d1dd20fc71d0c2daddf1f012be8f4d08371ba50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 11 Nov 2021 16:45:27 -0800 Subject: [PATCH 4/9] Ignoring deprecation coming from astropy <5 --- setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.cfg b/setup.cfg index cf00bec63b..a7500db5f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,6 +57,8 @@ filterwarnings = # Upstream, remove when fixed, PRs have been opened ignore::DeprecationWarning:pyvo ignore::DeprecationWarning:regions +# Should ignore these for astropy<5.0 + ignore:getName|currentThread:DeprecationWarning:astropy # This should be cleared once we requre astropy>=4.1 ignore:tostring\(\) is deprecated. Use tobytes:DeprecationWarning:astropy markers = From d3d39c2630666a7c2210d6d5d98e870a4937dd3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 23 Dec 2021 12:13:47 -0800 Subject: [PATCH 5/9] dependencies are now python 3.10 compatible. But they may not be cross compatible, address that in a new commit (e.g. aplpy with astropy 5.0) --- setup.cfg | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/setup.cfg b/setup.cfg index a7500db5f6..71bd1ce2fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -170,21 +170,9 @@ docs= sphinx-astropy>=1.5 scipy all= -# mocpy's dependency cdshealpix doesn't compile with 3.10 yet - astropy-healpix - boto3 - regions -all_lt_310= mocpy>=0.5.2 astropy-healpix boto3 regions -# aplpy is not py39 compatible (it requires shapely that doesn't compile -# pyregion is not py39 compatible -all_lt_39= - mocpy>=0.5.2 - regions pyregion - astropy-healpix aplpy - boto3 From 0b02ddc02a4e63ed117379aeeee89388cd52733a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 23 Dec 2021 15:19:26 -0800 Subject: [PATCH 6/9] Adding top level conftest to make the test header work with tox --- conftest.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000000..50518c70a7 --- /dev/null +++ b/conftest.py @@ -0,0 +1,32 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst + +from pytest_astropy_header.display import (PYTEST_HEADER_MODULES, + TESTED_VERSIONS) + + +def pytest_configure(config): + config.option.astropy_header = True + + PYTEST_HEADER_MODULES['Astropy'] = 'astropy' + PYTEST_HEADER_MODULES['APLpy'] = 'aplpy' + PYTEST_HEADER_MODULES['pyregion'] = 'pyregion' + PYTEST_HEADER_MODULES['regions'] = 'regions' + PYTEST_HEADER_MODULES['pyVO'] = 'pyvo' + PYTEST_HEADER_MODULES['mocpy'] = 'mocpy' + PYTEST_HEADER_MODULES['astropy-healpix'] = 'astropy_healpix' + PYTEST_HEADER_MODULES['vamdclib'] = 'vamdclib' + + # keyring doesn't provide __version__ any more + # PYTEST_HEADER_MODULES['keyring'] = 'keyring' + + del PYTEST_HEADER_MODULES['h5py'] + del PYTEST_HEADER_MODULES['Scipy'] + del PYTEST_HEADER_MODULES['Pandas'] + + # add '_testrun' to the version name so that the user-agent indicates that + # it's being run in a test + from astroquery import version + version.version += '_testrun' + + TESTED_VERSIONS['astroquery'] = version.version + TESTED_VERSIONS['astropy_helpers'] = version.astropy_helpers_version From fd6b7fd4705e3b4b1163983c36acfac1fda3beaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Fri, 24 Dec 2021 22:06:33 -0800 Subject: [PATCH 7/9] Updating version in GHA and remove docs build in favour of RTD --- .github/workflows/ci_tests.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index edf1adf0b8..a1f97b9dbe 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -27,12 +27,6 @@ jobs: python: 3.x toxenv: codestyle - - name: docs build - os: ubuntu-latest - python: 3.9 - toxenv: build_docs - toxargs: -v - - name: oldest dependencies os: ubuntu-latest python: 3.7 @@ -45,16 +39,16 @@ jobs: toxenv: py310-test-alldeps-devastropy-cov toxargs: -v - - name: Python 3.7 with all optional dependencies (MacOS X) + - name: Python 3.8 with all optional dependencies (MacOS X) os: macos-latest - python: 3.7 - toxenv: py37-test-alldeps + python: 3.8 + toxenv: py38-test-alldeps toxargs: -v - - name: Python 3.8 with mandatory dependencies (Windows) + - name: Python 3.9 with mandatory dependencies (Windows) os: windows-latest - python: 3.8 - toxenv: py38-test + python: 3.9 + toxenv: py39-test toxargs: -v steps: From 482144b7d5ae67ca7c9c3c7c1e9f200dea0a9d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Fri, 24 Dec 2021 22:12:36 -0800 Subject: [PATCH 8/9] Updating the RTD dependencies, too --- .readthedocs.yaml | 2 +- tox.ini | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a99592c422..f953c613c6 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ python: path: . extra_requirements: - docs - - all_lt_39 + - all sphinx: fail_on_warning: true diff --git a/tox.ini b/tox.ini index 9c9a64fd59..5ca194cb7b 100644 --- a/tox.ini +++ b/tox.ini @@ -41,9 +41,8 @@ deps = extras = test - py{37,38}-alldeps: all_lt_39 - py39-alldeps: all_lt_310 - py310-alldeps: all + alldeps: all + commands = pip freeze From 3667dac603360e58c0635db00cce9d9dd29419dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Fri, 24 Dec 2021 22:20:06 -0800 Subject: [PATCH 9/9] Fix conftest --- conftest.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/conftest.py b/conftest.py index 50518c70a7..1485a0c781 100644 --- a/conftest.py +++ b/conftest.py @@ -19,10 +19,6 @@ def pytest_configure(config): # keyring doesn't provide __version__ any more # PYTEST_HEADER_MODULES['keyring'] = 'keyring' - del PYTEST_HEADER_MODULES['h5py'] - del PYTEST_HEADER_MODULES['Scipy'] - del PYTEST_HEADER_MODULES['Pandas'] - # add '_testrun' to the version name so that the user-agent indicates that # it's being run in a test from astroquery import version