Skip to content

Commit 9915fac

Browse files
authored
Merge pull request #1925 from bsipocz/ci_switch_to_actions
Switch CI to actions
2 parents 006768e + 7cbac80 commit 9915fac

File tree

17 files changed

+248
-316
lines changed

17 files changed

+248
-316
lines changed

.github/workflows/ci_tests.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
# run every Monday at 5am UTC
8+
- cron: '0 5 * * 1'
9+
10+
env:
11+
TOXARGS: '-v'
12+
13+
jobs:
14+
tests:
15+
name: ${{ matrix.name }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: true
19+
matrix:
20+
include:
21+
22+
- name: Code style checks
23+
os: ubuntu-latest
24+
python: 3.x
25+
toxenv: codestyle
26+
27+
- name: docs build
28+
os: ubuntu-latest
29+
python: 3.8
30+
toxenv: build_docs
31+
32+
- name: oldest dependencies
33+
os: ubuntu-latest
34+
python: 3.6
35+
toxenv: py36-test-oldestdeps
36+
37+
- name: astropy dev with all dependencies with coverage
38+
os: ubuntu-latest
39+
python: 3.9
40+
toxenv: py39-test-alldeps-devastropy-cov
41+
42+
- name: Python 3.7 with all optional dependencies (MacOS X)
43+
os: macos-latest
44+
python: 3.7
45+
toxenv: py37-test-alldeps
46+
47+
- name: Python 3.8 with mandatory dependencies (Windows)
48+
os: windows-latest
49+
python: 3.8
50+
toxenv: py38-test
51+
52+
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@v2
55+
with:
56+
fetch-depth: 0
57+
- name: Set up Python
58+
uses: actions/setup-python@v2
59+
with:
60+
python-version: ${{ matrix.python }}
61+
- name: Install Python dependencies
62+
run: python -m pip install --upgrade tox codecov
63+
- name: Run tests
64+
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }}
65+
- name: Upload coverage to codecov
66+
if: ${{ contains(matrix.toxenv,'-cov') }}
67+
uses: codecov/codecov-action@v1
68+
with:
69+
file: ./coverage.xml
70+
71+
72+
egg_info:
73+
name: egg_info with Python 3.7
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Checkout code
77+
uses: actions/checkout@v2
78+
with:
79+
fetch-depth: 0
80+
- name: Set up Python
81+
uses: actions/setup-python@v2
82+
with:
83+
python-version: 3.7
84+
- name: Run egg_info
85+
run: python setup.py egg_info

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ distribute-*.tar.gz
6464
.*.sw[op]
6565
*~
6666
.svn
67+
.tmp
6768

6869
# Mac OSX
6970
.DS_Store

.travis.yml

Lines changed: 0 additions & 170 deletions
This file was deleted.

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ include astroquery/CITATION
66
include astroquery/splatalogue/data/*
77

88
include ah_bootstrap.py
9+
include setup.py
910
include setup.cfg
11+
include pyproject.toml
1012

1113
recursive-include astroquery *.py
1214
recursive-include docs *

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Installation and Requirements
3939
-----------------------------
4040

4141
Astroquery works with Python 3.6 or later.
42-
As an `astropy`_ affiliate, astroquery requires `astropy`_ version 3.1 or later.
42+
As an `astropy`_ affiliate, astroquery requires `astropy`_ version 3.1.2 or later.
4343

4444
astroquery uses the `requests <http://docs.python-requests.org/en/latest/>`_
4545
module to communicate with the internet. `BeautifulSoup

astroquery/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,15 @@ def _get_bibtex():
2727

2828

2929
__citation__ = __bibtex__ = _get_bibtex()
30+
31+
32+
try:
33+
from .version import version as __version__
34+
except ImportError:
35+
# TODO: Issue a warning using the logging framework
36+
__version__ = ''
37+
try:
38+
from .version import githash as __githash__
39+
except ImportError:
40+
# TODO: Issue a warning using the logging framework
41+
__githash__ = ''

astroquery/alma/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ def _get_dataarchive_url(self):
453453
response.raise_for_status()
454454
# Jan 2017: we have to force https because the archive doesn't
455455
# tell us it needs https.
456-
self.dataarchive_url = response.url.replace("/asax/","").replace("/aq/","").replace("http://", "https://")
456+
self.dataarchive_url = response.url.replace(
457+
"/asax/", "").replace("/aq/", "").replace("http://", "https://")
457458
else:
458459
self.dataarchive_url = self.archive_url
459460
elif self.dataarchive_url in ('http://almascience.org',

astroquery/mast/cutouts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def _parse_cutout_size(size):
9191

9292
return {"x": x, "y": y, "units": units}
9393

94+
9495
class TesscutClass(MastQueryWithLogin):
9596
"""
9697
MAST TESS FFI cutout query class.

astroquery/tests/setup_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
def get_package_data():
55
return {
6-
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc']}
6+
'astroquery.tests': ['coveragerc']}

astroquery/vo_conesearch/validator/tests/test_inpect.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55
import os
66

77
# ASTROPY
8-
from astropy.utils.data import _find_pkg_data_path, get_pkg_data_filename
8+
import astropy
9+
from astropy.utils.data import get_pkg_data_filename
10+
from astropy.utils.introspection import minversion
11+
12+
ASTROPY_LT_4_3 = not minversion(astropy, '4.3')
13+
14+
if ASTROPY_LT_4_3:
15+
from astropy.utils.data import _find_pkg_data_path as get_pkg_data_path
16+
else:
17+
from astropy.utils.data import get_pkg_data_path
918

1019
# LOCAL
1120
from .. import inspect
@@ -18,7 +27,7 @@ class TestConeSearchResults:
1827
"""Inspection of ``TestConeSearchValidation`` results."""
1928
def setup_class(self):
2029
self.datadir = 'data'
21-
test_vos_path = _find_pkg_data_path(self.datadir) + os.sep
30+
test_vos_path = get_pkg_data_path(self.datadir) + os.sep
2231

2332
# Convert to a proper file:// URL--on *NIXen this is not necessary but
2433
# Windows paths will blow up if we don't do this.

0 commit comments

Comments
 (0)