Skip to content

Commit

Permalink
Merge branch 'main' into scalebar
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Apr 8, 2024
2 parents e53fd68 + bf4592e commit e9c4e10
Show file tree
Hide file tree
Showing 104 changed files with 3,023 additions and 1,907 deletions.
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ changelog:
- "type: compatibility"
- title: Documentation
labels:
- "type: doc"
- "type: docs"
- title: Maintenance
labels:
- "type: maintenance"
Expand Down
197 changes: 115 additions & 82 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,111 +2,144 @@ name: packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '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
- "v[0-9]+.[0-9]+.[0-9]+"
- "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]+"
workflow_dispatch:
schedule:
- cron: '0 14 * * SUN'
- 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
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"
name: Build Conda
runs-on: "ubuntu-latest"
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
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/"
name: Build PyPI
runs-on: "ubuntu-latest"
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/"
28 changes: 14 additions & 14 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ name: docs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '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]+'
- "v[0-9]+.[0-9]+.[0-9]+"
- "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]+"
workflow_dispatch:
inputs:
target:
description: 'Site to build and deploy, or dry-run'
description: "Site to build and deploy, or dry-run"
type: choice
options:
- dev
- main
- dryrun
- dev
- main
- dryrun
required: true
default: dryrun
schedule:
- cron: '0 14 * * SUN'
- cron: "0 14 * * SUN"

jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
timeout-minutes: 120
defaults:
run:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/downstream_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
downstream_tests:
uses: holoviz-dev/holoviz_tasks/.github/workflows/run_downstream_tests.yaml@main
with:
downstream_repos_as_json: "{\"downstream_repo\":[\"hvplot\", \"geoviews\"]}"
downstream_repos_as_json: '{"downstream_repo":["hvplot", "geoviews"]}'
secrets:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Loading

0 comments on commit e9c4e10

Please sign in to comment.