Skip to content

Commit

Permalink
Drop Python 2.7 and 3.6 and add 3.11 (#110)
Browse files Browse the repository at this point in the history
* drop 2.7 and 3.6, add 3.11
* update tox config and python_requires
* limit number of python versions tested on GH actions
  • Loading branch information
maximlt authored Jun 12, 2023
1 parent 0642143 commit 43c5c0f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 145 deletions.
146 changes: 6 additions & 140 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
schedule:
- cron: '0 9 * * SUN'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test_suite:
name: Pytest on ${{ matrix.python-version }}, ${{ matrix.os }}
Expand All @@ -19,7 +23,8 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10']
# Run on the full set on schedule, workflow_dispatch and push&tags events, otherwise on a subset.
python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.7", "3.8", "3.9", "3.10", "3.11"]') || fromJSON('["3.7", "3.11"]') }}
timeout-minutes: 60
defaults:
run:
Expand Down Expand Up @@ -50,11 +55,6 @@ jobs:
run: |
conda activate ${{ env.ENV_NAME }}
doit develop_install -o tests -o examples
- name: Panel 3.6
if: matrix.python-version == '3.6'
run: |
conda activate ${{ env.ENV_NAME }}
conda install "panel=0.12.6"
- name: doit env_capture
run: |
conda activate ${{ env.ENV_NAME }}
Expand All @@ -78,137 +78,3 @@ jobs:
doit test_unit_extra
- uses: codecov/codecov-action@v3
if: github.event_name == 'push'

test_suite_36:
name: Pytest on ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.6']
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENV_NAME: "colorcet"
MPLBACKEND: "Agg"
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Fetch
run: git fetch --prune --tags -f
- name: conda setup
run: |
conda update -n base conda
conda install -n base -c conda-forge "mamba>=0.23" --no-update-deps
conda create -n ${{ env.ENV_NAME }}
conda activate ${{ env.ENV_NAME }}
conda config --env --prepend channels pyviz
conda config --env --show-sources
conda install python=${{ matrix.python-version }} pyctdev
- name: doit develop_install
run: |
conda activate ${{ env.ENV_NAME }}
doit develop_install -o tests -o examples --conda-mode=mamba
- name: doit env_capture
run: |
conda activate ${{ env.ENV_NAME }}
doit env_capture
- name: doit test_lint
run: |
conda activate ${{ env.ENV_NAME }}
doit test_lint
- name: doit test_unit
run: |
conda activate ${{ env.ENV_NAME }}
doit test_unit
- name: doit test_examples
run: |
conda activate ${{ env.ENV_NAME }}
doit test_examples
- name: doit test_unit_extra
run: |
conda activate ${{ env.ENV_NAME }}
pip install pytest-mpl
doit test_unit_extra
- uses: codecov/codecov-action@v3
if: github.event_name == 'push'

test_suite_py27:
name: Pytest on Python 2.7 only
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: [2.7]
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
env:
HV_REQUIREMENTS: "tests"
CHANS: "-c pyviz -c bokeh"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENV_NAME: "colorcet"
MPLBACKEND: "Agg"
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
- name: conda setup
run: |
conda config --set always_yes True
conda --version
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create --name=${{ env.ENV_NAME }} --python=${{ matrix.python-version }}
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit develop_install ${{ env.CHANS}} -o ${{ env.HV_REQUIREMENTS }}
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit env_capture
- name: Handling backports on 'ubuntu-latest' and the decorator package
if: matrix.os == 'ubuntu-latest'
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
conda install ${{ env.CHANS}} backports.functools_lru_cache 'decorator=4.4.2'
- name: doit env_capture again
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit env_capture
- name: doit test_unit
if: matrix.os == 'ubuntu-latest'
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
doit test_unit
- name: doit test_unit
if: matrix.os == 'macos-latest'
run: |
eval "$(conda shell.bash hook)"
conda activate ${{ env.ENV_NAME }}
pytest colorcet
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ by Peter Kovesi at the Center for Exploration Targeting.

## Installation

Colorcet supports Python 2.7, 3.6, 3.7, 3.8, 3.9 and 3.10 on Linux, Windows, or Mac
Colorcet supports Python 3.7, 3.8, 3.9, 3.10 and 3.11 on Linux, Windows, or Mac
and can be installed with conda:

```sh
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ def get_setup_version(reponame):
"License :: OSI Approved",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 5 - Production/Stable",
],
author="James A. Bednar",
Expand All @@ -98,7 +97,7 @@ def get_setup_version(reponame):
},
include_package_data=True,
packages=find_packages(),
python_requires=">=2.7",
python_requires=">=3.7",
install_requires=install_requires,
extras_require=extras_require,
entry_points={
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# For use with pyctdev (but should work with tox alone)

[tox]
envlist = {py27,py36,py37,py38,py39,py310}-{lint,unit,unit_extra,examples,all}-{default}-{dev,pkg}
envlist = {py37,py38,py39,py310,py311}-{lint,unit,unit_extra,examples,all}-{default}-{dev,pkg}
build = wheel

[_lint]
Expand Down

0 comments on commit 43c5c0f

Please sign in to comment.