Skip to content

Commit 5a03412

Browse files
author
andamian
authored
Merge 4ba3465 into af5ebec
2 parents af5ebec + 4ba3465 commit 5a03412

6 files changed

Lines changed: 130 additions & 47 deletions

File tree

‎.github/workflows/cibuild.yml‎

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI
33
on:
44
push:
55
pull_request:
6+
schedule:
7+
- cron: "0 3 * * *"
68

79
jobs:
810
egginfo:
@@ -19,12 +21,13 @@ jobs:
1921
run: tox -e egg_info
2022
tests:
2123
needs: egginfo
22-
runs-on: ${{ matrix.os }}
24+
runs-on: ubuntu-latest
25+
name: ${{ matrix.python-version }} with ${{ matrix.astropy-version }}
2326
strategy:
2427
fail-fast: true
2528
matrix:
26-
os: [ubuntu-latest, windows-latest, macos-latest]
2729
python-version: [3.7, 3.8, 3.9]
30+
astropy-version: [latest ,astropy40, astropy41]
2831
steps:
2932
- name: Checkout code
3033
uses: actions/checkout@v2
@@ -36,29 +39,33 @@ jobs:
3639
python-version: ${{ matrix.python-version }}
3740
- name: Install tox
3841
run: python -m pip install --upgrade tox
39-
- name: Python 3.7 with latest astropy
40-
if: matrix.python-version == 3.7
41-
run: tox -e py37-test
42-
- name: Python 3.7 with astropy30
43-
if: matrix.python-version == 3.7
44-
run: tox -e py37-test-astropy30
45-
- name: Python 3.7 with astropy31
46-
if: matrix.python-version == 3.7
47-
run: tox -e py37-test-astropy31
48-
- name: Python 3.7 with astropy32
49-
if: matrix.python-version == 3.7
50-
run: tox -e py37-test-astropy32
42+
- name: Python ${{ matrix.python-version }} with astropy
43+
run: tox -e py${{ matrix.python-version }}-${{ matrix.astropy-version }}
44+
45+
46+
mac_windows:
47+
runs-on: ${{ matrix.os }}
48+
needs: tests
49+
strategy:
50+
fail-fast: true
51+
matrix:
52+
os: [macos-latest, windows-latest]
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v2
56+
with:
57+
fetch-depth: 0
58+
- name: Set up Python
59+
uses: actions/setup-python@v2
60+
with:
61+
python-version: 3.8
62+
- name: Install tox
63+
run: python -m pip install --upgrade tox
5164
- name: Python 3.8 with latest astropy
52-
if: matrix.python-version == 3.8
53-
run: tox -e py38-test
54-
- name: Python 3.8 with astropy32
55-
if: matrix.python-version == 3.8
56-
run: tox -e py38-test-astropy32
57-
- name: Python 3.9 with latest astropy
58-
if: matrix.python-version == 3.9
59-
run: tox -e py39-test
60-
61-
style_docs_coverage:
65+
run: tox -e py3.8-latest
66+
67+
68+
style_coverage:
6269
runs-on: ubuntu-latest
6370
needs: tests
6471
steps:
@@ -73,15 +80,13 @@ jobs:
7380
run: python -m pip install --upgrade tox
7481
- name: Check codestyle
7582
run: tox -e codestyle
76-
- name: Check docs
77-
run: tox -e docs
7883
- name: Check coverage
7984
run: tox -e cov
8085
- name: Upload coverage to codecov
8186
uses: codecov/codecov-action@v1
8287
with:
8388
file: ./coverage.xml
84-
89+
8590
astropydev:
8691
# TODO: this job should be allowed to fail except that the functionality
8792
# is not available in actions yet.
@@ -96,7 +101,7 @@ jobs:
96101
- name: Install tox
97102
run: python -m pip install --upgrade tox
98103
- name: Run tests against astropy dev
99-
run: tox -e astropydev
104+
run: tox -e py3.8-astropydev
100105

101106
#publish:
102107
#needs: coverage

‎.readthedocs.yml‎

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1+
version: 2
2+
3+
build:
4+
image: latest
5+
6+
sphinx:
7+
builder: html
8+
configuration: docs/conf.py
9+
fail_on_warning: true
10+
11+
# Install regular dependencies.
12+
# Then, install special pinning for RTD.
113
python:
2-
version: 3.5
3-
pip_install: true
14+
version: 3.8
15+
system_packages: false
16+
install:
17+
- requirements: docs/requirements.txt
18+
- method: pip
19+
path: .
20+
extra_requirements:
21+
- docs
22+
- all
423

524
# Don't build any extra formats
6-
# formats: []
7-
8-
requirements_file: docs/requirements.txt
25+
formats: []

‎README.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ PyVO
55
:target: http://www.astropy.org
66
:alt: Powered by Astropy Badge
77

8-
.. image:: https://travis-ci.org/astropy/pyvo.svg
9-
:target: https://travis-ci.org/astropy/pyvo
10-
:alt: Travis Status
8+
.. image:: https://github.com/astropy/pyvo/workflows/CI/badge.svg?branch=master
9+
:target: https://github.com/astropy/pyvo/workflows/CI/badge.svg?branch=master
10+
:alt: CI Status
1111

1212
.. image:: https://coveralls.io/repos/github/pyvirtobs/pyvo/badge.svg?branch=master
1313
:target: https://coveralls.io/github/pyvirtobs/pyvo?branch=master

‎conftest.py‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
# This file is the main file used when running tests with pytest directly,
4+
# in particular if running e.g. ``pytest docs/``.
5+
6+
import os
7+
import tempfile
8+
9+
try:
10+
from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
11+
except ImportError:
12+
PYTEST_HEADER_MODULES = {}
13+
TESTED_VERSIONS = {}
14+
15+
try:
16+
from pyvo import __version__ as version
17+
except ImportError:
18+
version = 'unknown'
19+
20+
TESTED_VERSIONS['pyvo'] = version
21+
22+
# Make sure we use temporary directories for the config and cache
23+
# so that the tests are insensitive to local configuration.
24+
25+
os.environ['XDG_CONFIG_HOME'] = tempfile.mkdtemp('astropy_config')
26+
os.environ['XDG_CACHE_HOME'] = tempfile.mkdtemp('astropy_cache')
27+
28+
os.mkdir(os.path.join(os.environ['XDG_CONFIG_HOME'], 'astropy'))
29+
os.mkdir(os.path.join(os.environ['XDG_CACHE_HOME'], 'astropy'))
30+
31+
# Note that we don't need to change the environment variables back or remove
32+
# them after testing, because they are only changed for the duration of the
33+
# Python process, and this configuration only matters if running pytest
34+
# directly, not from e.g. an IPython session.

‎setup.cfg‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,31 @@ install_requires = astropy requests mimeparse
4444
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440)
4545
version = 1.2.dev
4646

47+
[coverage:run]
48+
omit =
49+
pyvo/__init__*
50+
pyvo/conftest.py
51+
pyvo/*setup*
52+
pyvo/*/tests/*
53+
*/pyvo/__init__*
54+
*/pyvo/conftest.py
55+
*/pyvo/*setup*
56+
*/pyvo/*/tests/*
57+
58+
[coverage:report]
59+
exclude_lines =
60+
# Have to re-enable the standard pragma
61+
pragma: no cover
62+
# Don't complain about packages we have installed
63+
except ImportError
64+
# Don't complain if tests don't hit assertions
65+
raise AssertionError
66+
raise NotImplementedError
67+
# Don't complain about script hooks
68+
def main\(.*\):
69+
# Ignore branches that don't pertain to this version of Python
70+
pragma: py{ignore_python_version}
71+
# Don't complain about IPython completion helper
72+
def _ipython_key_completions_
73+
4774
[entry_points]

‎tox.ini‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[tox]
22
envlist =
3-
py37-test{,-astropy30, -astropy31, -astropy32}
4-
py38-test{,-astropy32}
5-
py39-test
3+
py{3.7,3.8,3.9}-{latest,astropy40,astropy41}
4+
py3.8-astropydev
65
requires =
76
setuptools >= 30.3.0
87
pip >= 19.3.1
@@ -12,13 +11,13 @@ requires =
1211
pypi_filter = https://raw.githubusercontent.com/astropy/ci-helpers/master/pip_pinnings.txt
1312
commands =
1413
pip freeze
15-
python setup.py test
14+
pytest --pyargs pyvo
1615

1716
description =
1817
run tests
19-
astropy30: with astropy 3.0.*
20-
astropy31: with numpy 3.1.*
21-
astropy32: with numpy 3.2.*
18+
astropy40: with astropy 4.0.*
19+
astropy41: with astropy 4.1.*
20+
latest: with astropy latest
2221

2322
deps =
2423
#-rpip-requirements
@@ -27,9 +26,9 @@ deps =
2726
pytest-astropy
2827
requests_mock
2928

30-
astropy30: astropy==3.0.*
31-
astropy31: astropy==3.1.*
32-
astropy32: astropy==3.2.*
29+
astropy40: astropy==4.0.*
30+
astropy41: astropy==4.1.*
31+
latest: astropy
3332
astropydev: git+https://github.com/astropy/astropy.git#egg=astropy
3433

3534
# # Linkcheck is broken with cryptic error with Sphinx 3.1.0
@@ -57,7 +56,8 @@ deps:
5756

5857
commands =
5958
pip freeze
60-
python setup.py test --coverage
59+
pytest --pyargs pyvo --cov pyvo --cov-config={toxinidir}/setup.cfg
60+
coverage xml -o {toxinidir}/coverage.xml
6161

6262

6363
[testenv:docs]

0 commit comments

Comments
 (0)