Skip to content

Commit

Permalink
TST: Fix workflows, add RC testing (#156)
Browse files Browse the repository at this point in the history
* Attempt to upgrade workflows.
Drop support for Python 3.7 and Python 3.8.
Drop support for Lab 1 and Lab 2.

* Add RC testing workflow

* Ignore DeprecationWarning from ipywidgets

* Fix warning message matching

* Ignore ioloop DeprecationWarning from Ginga

* And one more DeprecationWarning

* Only run RC testing on demand
  • Loading branch information
pllim authored Dec 9, 2022
1 parent cc88c31 commit e18a002
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 22 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ on:
# * is a special character in YAML so you have to quote this string
- cron: '0 5 * * 5'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pep8:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Lint with flake8
Expand All @@ -31,26 +38,26 @@ jobs:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
- name: Install and build
run: python -m pip install tox --upgrade
- name: Run tests
run: tox -e test
run: tox -e py39-test

devtests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
- name: Install and build
run: python -m pip install tox --upgrade
- name: Run tests
run: tox -e test-devdeps
run: tox -e py311-test-devdeps
30 changes: 30 additions & 0 deletions .github/workflows/predeps_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: rc_testing

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install and build
run: python -m pip install tox --upgrade
- name: Run tests
run: tox -e py310-test-predeps
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
if: github.repository == 'astropy/astrowidgets'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down
4 changes: 2 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The following dependencies are needed *in the kernel of execution*
to use ``astrowidgets`` in either Jupyter Lab or Notebook. They should be installed
automatically when you install astrowidgets:

* ``python>=3.6``
* ``python>=3.8``
* ``numpy``
* ``astropy``
* ``ipywidgets>=7.5``
Expand All @@ -48,7 +48,7 @@ automatically when you install astrowidgets:
* ``pillow``
* ``freetype``
* ``aggdraw``
* ``jupyterlab>=1``
* ``jupyterlab>=3``
* ``nodejs``
* ``opencv`` (optional, not installed by default)

Expand Down
15 changes: 10 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ astropy_header = true
xfail_strict = true
filterwarnings =
error
ignore:numpy.ufunc size changed:RuntimeWarning
ignore:numpy.ndarray size changed:RuntimeWarning
ignore::DeprecationWarning:ginga
ignore:numpy\.ufunc size changed:RuntimeWarning
ignore:numpy\.ndarray size changed:RuntimeWarning
ignore:zmq\.eventloop\.ioloop is deprecated in pyzmq 17:DeprecationWarning
ignore:Widget.* is deprecated:DeprecationWarning
ignore:Marker set named:UserWarning
# https://github.com/ejeschke/ginga/issues/1033
ignore:There is no current event loop:DeprecationWarning
# https://github.com/ejeschke/ginga/issues/1034
ignore:SelectableGroups dict interface is deprecated:DeprecationWarning

[flake8]
# E501: line too long
Expand Down Expand Up @@ -40,9 +45,9 @@ install_requires =
pillow
ipywidgets>=7.5
ipyevents>=0.6.3
jupyterlab>=1
jupyterlab>=3
aggdraw
python_requires >=3.6
python_requires >=3.8

[options.extras_require]
test =
Expand Down
12 changes: 9 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
[tox]
envlist =
test{,-devdeps}
py{38,39,310,311}-test{,-devdeps,-predeps}
requires =
setuptools >= 30.3.0
pip >= 19.3.1
setuptools_scm
isolated_build = true

[testenv]
setenv =
MPLBACKEND=agg
JUPYTER_PLATFORM_DIRS=1

extras = test

changedir =
test: .tmp/{envname}

deps =
devdeps: git+https://github.com/astropy/astropy.git#egg=astropy
devdeps: git+https://github.com/ejeschke/ginga.git#egg=ginga

commands =
jupyter --paths
pip freeze
pytest --pyargs astrowidgets {toxinidir}/docs {posargs}

pip_pre =
predeps: true
!predeps: false

0 comments on commit e18a002

Please sign in to comment.