Skip to content

Commit

Permalink
Move to GH Actions (#4592)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcpevey authored Nov 3, 2020
1 parent c7a0eca commit a795949
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 41 deletions.
31 changes: 0 additions & 31 deletions .appveyor.yml

This file was deleted.

99 changes: 99 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# things not included
# language
# notifications - no email notifications set up

name: pytest
on:
pull_request:
branches:
- '*'

jobs:
test_suite:
name: Pytest on ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: [2.7, 3.6, 3.7]
exclude:
- os: windows-latest
python-version: 2.7
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
env:
DESC: "Python ${{ matrix.python-version }} tests"
HV_REQUIREMENTS: "unit_tests"
PYTHON_VERSION: ${{ matrix.python-version }}
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "100"
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: goanpeca/setup-miniconda@v1
with:
miniconda-version: "latest"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create ${{ env.CHANS_DEV}} --python=${{ matrix.python-version }}
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda list
doit develop_install ${{ env.CHANS_DEV}} -o ${{ env.HV_REQUIREMENTS }}
python -c "from param import version; print(version.Version.setup_version('.', 'holoviews', archive_commit='$Format:%h$'))"
echo "-----"
git describe
echo "======"
conda list
- name: matplotlib patch
if: startsWith(matrix.python-version, 3.)
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda uninstall matplotlib matplotlib-base --force
conda install matplotlib=3.0.3 --no-deps
python -c "import matplotlib; print(matplotlib.__version__);"
- name: doit env_capture
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit env_capture
- name: doit test_flakes
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit test_flakes
- name: doit test_unit
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit test_unit
- name: test examples
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit test_examples
- name: run coveralls
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(matrix.python-version, 3.)
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
coveralls
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ env:
- MOZ_HEADLESS=1

stages:
- test
- name: extra_tests
if: type = cron
- name: conda_dev_package
Expand Down Expand Up @@ -58,7 +57,7 @@ jobs:
########## Test Stage ##########

- &default
stage: test
stage: env_setup
env: DESC="Python 3.6 tests" HV_REQUIREMENTS="unit_tests" PYTHON_VERSION=3.6
before_install:
- pip install pyctdev && doit miniconda_install && pip uninstall -y doit pyctdev
Expand All @@ -73,20 +72,17 @@ jobs:
- doit env_capture
- hash -r
script:
- doit test_all_recommended
- doit test_flakes
after_success: coveralls
after_failure: sleep 10

- <<: *default
env: DESC="Python 2.7 tests" PYTHON_VERSION=2.7 HV_REQUIREMENTS="unit_tests"

- &basic_deps
<<: *default
stage: extra_tests
env: DESC="Basic dependencies" HV_REQUIREMENTS="basic_tests"
after_success: echo "Success"
script:
- doit test_unit
after_success: echo "Success"

########## DOCS ##########

Expand Down
2 changes: 1 addition & 1 deletion holoviews/core/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def hist(self, dimension=None, num_bins=20, bin_range=None,


def __getitem__(self, key):
if key is ():
if key == ():
return self
else:
raise NotImplementedError("%s currently does not support getitem" %
Expand Down
2 changes: 1 addition & 1 deletion holoviews/core/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def dimension_values(self, dimension, expanded=True, flat=True):

def __getitem__(self, key):
"Index into the AdjointLayout by index or label"
if key is ():
if key == ():
return self

data_slice = None
Expand Down
2 changes: 1 addition & 1 deletion holoviews/element/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __getitem__(self, heading):
"""
Get the value associated with the given heading (key).
"""
if heading is ():
if heading == ():
return self
if heading not in self.vdims:
raise KeyError("%r not in available headings." % heading)
Expand Down

0 comments on commit a795949

Please sign in to comment.