Skip to content

Commit 5057cbc

Browse files
authored
Merge pull request #2627 from bsipocz/CI_adding_python_311_tests
MAINT: adding py311 testing
2 parents ae3e06f + e480901 commit 5057cbc

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

.github/workflows/ci_crontests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
include:
25-
- name: py3.10 all dev deps online
25+
- name: py3.11 all dev deps online
2626
os: ubuntu-latest
27-
python: '3.10'
28-
toxenv: py310-test-alldeps-devdeps-online
27+
python: '3.11'
28+
toxenv: py311-test-alldeps-devdeps-online
2929
toxargs: -v
3030
toxposargs: -v --durations=50
3131

@@ -36,10 +36,10 @@ jobs:
3636
toxargs: -v
3737
toxposargs: -v --durations=50
3838

39-
- name: py3.10 pre-release all deps
39+
- name: py3.11 pre-release all deps
4040
os: ubuntu-latest
41-
python: '3.10'
42-
toxenv: py310-test-alldeps-predeps
41+
python: '3.11'
42+
toxenv: py311-test-alldeps-predeps
4343
toxargs: -v
4444
toxposargs: -v
4545

.github/workflows/ci_devtests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
include:
3333
- name: dev dependencies with all dependencies with coverage
3434
os: ubuntu-latest
35-
python: '3.10'
36-
toxenv: py310-test-alldeps-devdeps-cov
35+
python: '3.11'
36+
toxenv: py311-test-alldeps-devdeps-cov
3737
toxargs: -v
3838

3939
steps:

astroquery/esa/hubble/tests/test_esa_hubble_remote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
import tempfile
1313

1414
import os
15+
import numpy as np
1516

1617
import pytest
1718
from astroquery.esa.hubble import ESAHubble
1819
from astropy import coordinates
19-
import random
2020

2121
esa_hubble = ESAHubble()
2222

@@ -58,7 +58,7 @@ def test_query_tap_async(self):
5858

5959
def test_download_product(self):
6060
result = esa_hubble.query_tap(query=self.hst_query)
61-
observation_id = random.choice(result['observation_id'])
61+
observation_id = np.random.choice((result['observation_id']))
6262
temp_file = self.temp_folder.name + "/" + observation_id + ".tar"
6363
esa_hubble.download_product(observation_id=observation_id,
6464
filename=temp_file)
@@ -67,7 +67,7 @@ def test_download_product(self):
6767
def test_get_artifact(self):
6868
result = esa_hubble.query_tap(query=self.top_artifact_query)
6969
assert "artifact_id" in result.keys()
70-
artifact_id = random.choice(result["artifact_id"])
70+
artifact_id = np.random.choice(result["artifact_id"])
7171
temp_file = self.temp_folder.name + "/" + artifact_id + ".gz"
7272
esa_hubble.get_artifact(artifact_id=artifact_id, filename=temp_file)
7373
assert os.path.exists(temp_file)

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ filterwarnings =
3939
# These are temporary measures, all of these should be fixed:
4040
# -----------------------------------------------------------
4141
ignore:distutils Version classes are deprecated:DeprecationWarning
42+
# Remove along with astropy-helpers, once we switch to a new versioning scheme
43+
ignore:Use setlocale:DeprecationWarning
44+
# Remove with fix for https://github.com/astropy/astroquery/issues/2628
45+
ignore:\'cgi\' is deprecated and:DeprecationWarning
4246
# Upstream issues in many packages, not clear whether we can do anything about these in astroquery
4347
ignore:unclosed <socket.socket:ResourceWarning
4448
ignore:unclosed <ssl.SSLSocket:ResourceWarning

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{37,38,39,310}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-online}{,-cov}
3+
py{37,38,39,310,311}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-online}{,-cov}
44
codestyle
55
linkcheck
66
build_docs

0 commit comments

Comments
 (0)