Skip to content

Commit

Permalink
Merge branch 'main' into normalize_group
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Apr 17, 2024
2 parents f2a9a51 + 4042923 commit 1195466
Show file tree
Hide file tree
Showing 48 changed files with 1,719 additions and 374 deletions.
183 changes: 108 additions & 75 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,107 +6,140 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+a[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+b[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
# Dry-run only
workflow_dispatch:
schedule:
- cron: "0 14 * * SUN"

defaults:
run:
shell: bash -el {0}

env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
PYTHON_VERSION: "3.11"
PACKAGE: "holoviews"

jobs:
waiting_room:
name: Waiting Room
runs-on: ubuntu-latest
needs: [conda_build, pip_install]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
environment:
name: publish
steps:
- run: echo "All builds have finished, have been approved, and ready to publish"

conda_build:
name: Build Conda Packages
name: Build Conda
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
PKG_TEST_PYTHON: "--test-python=py39"
PYTHON_VERSION: "3.9"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ env.PYTHON_VERSION }}
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
- name: conda setup
run: |
conda config --set always_yes True
conda config --append channels pyviz/label/dev
conda config --append channels conda-forge
# pyct is for running setup.py
conda install -y conda-build anaconda-client build pyct
conda install -y conda-build build pyct -c pyviz/label/dev
- name: conda build
run: |
bash ./scripts/build_conda.sh
source ./scripts/build_conda.sh
echo "CONDA_FILE="$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2"" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
if: always()
with:
name: conda
path: ${{ env.CONDA_FILE }}
if-no-files-found: error

conda_publish:
name: Publish Conda
runs-on: ubuntu-latest
needs: [conda_build, waiting_room]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: conda
path: dist/
- name: Set environment variables
run: |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "CONDA_FILE=$(ls dist/*.tar.bz2)" >> $GITHUB_ENV
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
- name: conda setup
run: |
conda install -y anaconda-client
- name: conda dev upload
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')
run: |
VERSION="$(echo "$(ls dist/*.whl)" | cut -d- -f2)"
FILE="$CONDA_PREFIX/conda-bld/noarch/holoviews-$VERSION-py_0.tar.bz2"
anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev $FILE
anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev $CONDA_FILE
- name: conda main upload
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: (!(contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')))
run: |
VERSION="$(echo "$(ls dist/*.whl)" | cut -d- -f2)"
FILE="$CONDA_PREFIX/conda-bld/noarch/holoviews-$VERSION-py_0.tar.bz2"
anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev --label=main $FILE
anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev --label=main $CONDA_FILE
pip_build:
name: Build PyPI Packages
name: Build PyPI
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
PKG_TEST_PYTHON: "--test-python=py39"
PYTHON_VERSION: "3.9"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
PPU: ${{ secrets.PPU }}
PPP: ${{ secrets.PPP }}
PYPI: "https://upload.pypi.org/legacy/"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: 3.9
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: conda setup
run: |
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create $CHANS_DEV --python=$PYTHON_VERSION
- name: env setup
run: |
conda activate test-environment
doit develop_install $CHANS_DEV
pip uninstall -y holoviews
doit pip_on_conda
- name: doit env_capture
run: |
conda activate test-environment
doit env_capture
- name: pip build
run: |
conda activate test-environment
doit ecosystem=pip package_build --test-group=simple
- name: pip upload
if: github.event_name == 'push'
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install build
run: |
conda activate test-environment
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI
python -m pip install build
- name: Build package
run: python -m build .
- uses: actions/upload-artifact@v4
if: always()
with:
name: pip
path: dist/
if-no-files-found: error

pip_install:
name: Install PyPI
runs-on: "ubuntu-latest"
needs: [pip_build]
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/download-artifact@v4
with:
name: pip
path: dist/
- name: Install package
run: python -m pip install dist/*.whl
- name: Test package
run: python -c "import $PACKAGE; print($PACKAGE.__version__)"

pip_publish:
name: Publish PyPI
runs-on: ubuntu-latest
needs: [pip_build, waiting_room]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: pip
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PPU }}
password: ${{ secrets.PPP }}
repository-url: "https://upload.pypi.org/legacy/"
8 changes: 4 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ jobs:
PANEL_EMBED_JSON: "true"
PANEL_EMBED_JSON_PREFIX: "json"
steps:
- uses: holoviz-dev/holoviz_tasks/install@v0.1a19
- uses: holoviz-dev/holoviz_tasks/install@v0
with:
name: Documentation
python-version: "3.10"
channel-priority: strict
channel-priority: flexible
channels: pyviz/label/dev,conda-forge,nodefaults
envs: "-o doc"
cache: true
conda-update: true
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: bokeh sampledata
- name: Download data
run: |
conda activate test-environment
bokeh sampledata
bash scripts/download_data.sh
- name: generate rst
run: |
conda activate test-environment
Expand Down
73 changes: 29 additions & 44 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
name: Run pre-commit
runs-on: "ubuntu-latest"
steps:
- uses: holoviz-dev/holoviz_tasks/pre-commit@v0.1a19
- uses: holoviz-dev/holoviz_tasks/pre-commit@v0

setup:
name: Setup workflow
Expand All @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v3
if: github.event_name != 'pull_request'
- name: Check for code changes
uses: dorny/paths-filter@v2.11.1
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand All @@ -91,18 +91,15 @@ jobs:
run: |
MATRIX=$(jq -nsc '{
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
"python-version": ["3.9", "3.11"],
"include": [
{"os": "ubuntu-latest", "python-version": "3.10"}
]
"python-version": ["3.9", "3.12"]
}')
echo "MATRIX=$MATRIX" >> $GITHUB_ENV
- name: Set test matrix with 'full' option
if: env.MATRIX_OPTION == 'full'
run: |
MATRIX=$(jq -nsc '{
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
"python-version": ["3.9", "3.10", "3.11"]
"python-version": ["3.9", "3.10", "3.11", "3.12"]
}')
echo "MATRIX=$MATRIX" >> $GITHUB_ENV
- name: Set test matrix with 'downstream' option
Expand All @@ -126,22 +123,27 @@ jobs:
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} unit tests"
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: holoviz-dev/holoviz_tasks/install@v0.1a19
- uses: holoviz-dev/holoviz_tasks/install@v0
if: needs.setup.outputs.code_change == 'true'
with:
name: unit_test_suite
python-version: ${{ matrix.python-version }}
channel-priority: strict
channel-priority: flexible
channels: pyviz/label/dev,conda-forge,nodefaults
envs: "-o flakes -o tests -o examples_tests -o tests_ci"
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }}
conda-update: true
id: install
- name: bokeh sampledata
- name: Check packages latest version
if: needs.setup.outputs.code_change == 'true'
run: |
conda activate test-environment
bokeh sampledata
python scripts/check_latest_packages.py bokeh panel param datashader
- name: Download data
if: needs.setup.outputs.code_change == 'true'
run: |
conda activate test-environment
bash scripts/download_data.sh
- name: doit test_unit
if: needs.setup.outputs.code_change == 'true'
run: |
Expand Down Expand Up @@ -176,12 +178,12 @@ jobs:
# it as one of the sources.
PYCTDEV_SELF_CHANNEL: "pyviz/label/dev"
steps:
- uses: holoviz-dev/holoviz_tasks/install@v0.1a19
- uses: holoviz-dev/holoviz_tasks/install@v0
if: needs.setup.outputs.code_change == 'true'
with:
name: ui_test_suite
python-version: ${{ matrix.python-version }}
channels: pyviz/label/dev,bokeh,conda-forge,nodefaults
channels: pyviz/label/dev,conda-forge,nodefaults
envs: "-o recommended -o tests -o build -o tests_ci"
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }}
playwright: true
Expand Down Expand Up @@ -213,45 +215,28 @@ jobs:
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} core tests"
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
# Add back when this works on Python 3.12
# - uses: holoviz-dev/holoviz_tasks/install@v0.1a19
# if: needs.setup.outputs.code_change == 'true'
# with:
# name: core_test_suite
# python-version: ${{ matrix.python-version }}
# # channel-priority: strict
# channels: pyviz/label/dev,conda-forge,nodefaults
# envs: "-o tests_core -o tests_ci"
# cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }}
# conda-update: true
# id: install
- uses: actions/checkout@v3
if: needs.setup.outputs.code_change == 'true'
with:
fetch-depth: "100"
- name: Fetch unshallow
if: needs.setup.outputs.code_change == 'true'
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v4
- uses: holoviz-dev/holoviz_tasks/install@v0
if: needs.setup.outputs.code_change == 'true'
with:
python-version: 3.12
- name: install
if: needs.setup.outputs.code_change == 'true'
run: |
python -m pip install -ve '.[tests_core, tests_ci]'
- name: bokeh sampledata
name: core_test_suite
python-version: ${{ matrix.python-version }}
# channel-priority: strict
channels: pyviz/label/dev,conda-forge,nodefaults
envs: "-o tests_core -o tests_ci"
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }}
id: install
- name: Download data
if: needs.setup.outputs.code_change == 'true'
run: |
# conda activate test-environment
bokeh sampledata
conda activate test-environment
bash scripts/download_data.sh
- name: Check packages latest version
if: needs.setup.outputs.code_change == 'true'
run: |
# conda activate test-environment
python scripts/check_latest_packages.py
conda activate test-environment
python scripts/check_latest_packages.py numpy pandas bokeh panel param
- name: doit test_unit
if: needs.setup.outputs.code_change == 'true'
run: |
# conda activate test-environment
conda activate test-environment
pytest holoviews
Loading

0 comments on commit 1195466

Please sign in to comment.