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 May 28, 2024
2 parents 8109cd4 + d458f60 commit dc421f9
Show file tree
Hide file tree
Showing 145 changed files with 4,695 additions and 6,292 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

52 changes: 24 additions & 28 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defaults:
shell: bash -el {0}

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

Expand All @@ -30,31 +29,29 @@ jobs:
steps:
- run: echo "All builds have finished, have been approved, and ready to publish"

pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi

conda_build:
name: Build Conda
needs: [pixi_lock]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: conda-incubator/setup-miniconda@v3
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
miniconda-version: "latest"
- name: conda setup
run: |
# pyct is for running setup.py
conda install -y conda-build build pyct -c pyviz/label/dev
environments: "build"
download-data: false
install: false
- name: conda build
run: |
source ./scripts/build_conda.sh
echo "CONDA_FILE="$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2"" >> $GITHUB_ENV
run: pixi run -e build build-conda
- uses: actions/upload-artifact@v4
if: always()
with:
name: conda
path: ${{ env.CONDA_FILE }}
path: dist/*tar.bz2
if-no-files-found: error

conda_publish:
Expand Down Expand Up @@ -88,21 +85,16 @@ jobs:
pip_build:
name: Build PyPI
needs: [pixi_lock]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install build
run: |
python -m pip install build
environments: "build"
download-data: false
install: false
- name: Build package
run: python -m build .
run: pixi run -e build build-pip
- uses: actions/upload-artifact@v4
if: always()
with:
Expand All @@ -124,8 +116,12 @@ jobs:
path: dist/
- name: Install package
run: python -m pip install dist/*.whl
- name: Test package
- name: Import package
run: python -c "import $PACKAGE; print($PACKAGE.__version__)"
- name: Install test dependencies
run: python -m pip install "$(ls dist/*whl)[tests]"
- name: Test package
run: python -m pytest --pyargs $PACKAGE --color=yes

pip_publish:
name: Publish PyPI
Expand Down
83 changes: 46 additions & 37 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,65 +20,74 @@ on:
schedule:
- cron: "0 14 * * SUN"

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

jobs:
build_docs:
name: Documentation
runs-on: "ubuntu-latest"
timeout-minutes: 120
defaults:
run:
shell: bash -el {0}
pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi

docs_build:
name: Build Documentation
needs: [pixi_lock]
runs-on: "macos-latest"
timeout-minutes: 180
outputs:
tag: ${{ steps.vars.outputs.tag }}
env:
DESC: "Documentation build"
MPLBACKEND: "Agg"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
MOZ_HEADLESS: 1
PANEL_EMBED: "true"
PANEL_EMBED_JSON: "true"
PANEL_EMBED_JSON_PREFIX: "json"
DASK_DATAFRAME__QUERY_PLANNING: false
steps:
- uses: holoviz-dev/holoviz_tasks/install@v0
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
environments: docs
- name: Build documentation
run: pixi run -e docs docs-build
- uses: actions/upload-artifact@v4
if: always()
with:
name: Documentation
python-version: "3.10"
channel-priority: flexible
channels: pyviz/label/dev,conda-forge,nodefaults
envs: "-o doc"
cache: true
conda-update: true
name: docs
if-no-files-found: error
path: builtdocs
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Download data
run: |
conda activate test-environment
bash scripts/download_data.sh
- name: generate rst
run: |
conda activate test-environment
nbsite generate-rst --org holoviz --project-name holoviews
- name: refmanual
run: |
conda activate test-environment
python ./doc/generate_modules.py holoviews -d ./doc/reference_manual -n holoviews -e tests
- name: build docs
run: |
conda activate test-environment
nbsite build --what=html --output=builtdocs --org holoviz --project-name holoviews

docs_publish:
name: Publish Documentation
runs-on: "ubuntu-latest"
needs: [docs_build]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
steps:
- uses: actions/download-artifact@v4
with:
name: docs
path: builtdocs/
- name: Set output
id: vars
run: echo "tag=${{ needs.docs_build.outputs.tag }}" >> $GITHUB_OUTPUT
- name: upload dev
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
(github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
pipx install awscli
aws s3 sync --quiet ./builtdocs s3://dev.holoviews.org/
- name: upload main
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
pipx install awscli
aws s3 sync --quiet ./builtdocs s3://holoviews.org/
25 changes: 25 additions & 0 deletions .github/workflows/nightly_lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: nightly_lock
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

env:
PACKAGE: "holoviews"

jobs:
pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi
- name: Upload lock-file to S3
if: "!github.event.pull_request.head.repo.fork"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "eu-west-1"
run: |
zip $(date +%Y-%m-%d).zip pixi.lock pixi.toml
aws s3 cp ./$(date +%Y-%m-%d).zip s3://assets.holoviz.org/lock/$PACKAGE/
Loading

0 comments on commit dc421f9

Please sign in to comment.