Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Pixi and Hatchling #1354

Merged
merged 34 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1e56aac
Add pixi.toml
hoxbro Aug 1, 2024
f762101
Fix format test.yaml
hoxbro Aug 1, 2024
127275e
Update test-environments
hoxbro Aug 1, 2024
d381203
Add dask-core back
hoxbro Aug 1, 2024
19cb424
Update name
hoxbro Aug 1, 2024
5f225b3
Fix lint for pyproject.toml
hoxbro Aug 1, 2024
d1a6a5c
Remove benchmark to unit test
hoxbro Aug 1, 2024
c01ff5e
Move to hatchling
hoxbro Aug 1, 2024
7420437
Update examples environment variable
hoxbro Aug 1, 2024
92940a7
Add build and lint environments
hoxbro Aug 1, 2024
58435e4
Fix cov
hoxbro Aug 1, 2024
b86492e
Make pip and conda build work
hoxbro Aug 1, 2024
ea4359f
Add nighly lock
hoxbro Aug 1, 2024
5b41db0
Add new build
hoxbro Aug 1, 2024
8bd6112
Add bokeh sampledata
hoxbro Aug 1, 2024
71e86d2
Merge benchmark
hoxbro Aug 1, 2024
07a5899
Comment out upload step in build
hoxbro Aug 1, 2024
3629f36
Add benchmark to gpu task
hoxbro Aug 1, 2024
d3ea518
Add benchmark skip
hoxbro Aug 1, 2024
eae72a2
uncomment build.yaml
hoxbro Aug 1, 2024
2a9ba6d
Format docs yaml
hoxbro Aug 1, 2024
d0ea4a4
Enable pixi docs
hoxbro Aug 1, 2024
2ee2f49
Upload docs build
hoxbro Aug 1, 2024
b0c874b
Align example folder
hoxbro Aug 1, 2024
bad5b07
Finish up pyproject.toml
hoxbro Aug 2, 2024
c418eb3
Add exampels back to datashader/examples
hoxbro Aug 2, 2024
49f1a3f
Format toml
hoxbro Aug 2, 2024
f5094ba
Remove old dotfiles
hoxbro Aug 2, 2024
219f915
Update conda build
hoxbro Aug 2, 2024
906a9eb
Misc updates
hoxbro Aug 2, 2024
a07412f
Apply suggestions from code review
hoxbro Aug 2, 2024
529aca9
Apply suggestions from code review
hoxbro Aug 2, 2024
7e80b74
Update pyproject.toml
hoxbro Aug 4, 2024
fa8747a
Update conda.meta about
hoxbro Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

51 changes: 21 additions & 30 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ on:

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

env:
PYTHON_VERSION: "3.11"
PACKAGE: "datashader"
MPLBACKEND: "Agg"
DASK_DATAFRAME__QUERY_PLANNING: false

jobs:
waiting_room:
Expand All @@ -32,31 +30,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
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
fetch-depth: "100"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: conda-incubator/setup-miniconda@v3
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/conda/build.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 @@ -90,21 +86,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 @@ -126,7 +117,7 @@ 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__)"

pip_publish:
Expand Down
97 changes: 57 additions & 40 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,78 @@ 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'
description: "Site to build and deploy"
type: choice
options:
- dev
- main
- dryrun
- dev
- main
- dryrun
required: true
default: dryrun
schedule:
- cron: '0 16 * * SUN'
- cron: "0 16 * * SUN"

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

jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {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"
DASK_DATAFRAME__QUERY_PLANNING: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: holoviz-dev/holoviz_tasks/install@v0
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
name: Documentation
python-version: "3.10"
channel-priority: strict
channels: pyviz/label/dev,conda-forge,nodefaults
envs: "-o doc"
cache: true
conda-update: true
environments: docs
- name: Build documentation
run: pixi run -e docs docs-build
- uses: actions/upload-artifact@v4
if: always()
with:
name: docs
if-no-files-found: error
path: builtdocs
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: fetch data
run: |
conda activate test-environment
python scripts/download_data.py
- name: generate rst
run: |
conda activate test-environment
nbsite generate-rst --org holoviz --project-name datashader
- name: build docs
run: |
conda activate test-environment
nbsite build --what=html --output=builtdocs --org holoviz --project-name datashader
- name: Deploy dev

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
uses: peaceiris/actions-gh-pages@v3
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
Expand All @@ -66,7 +83,7 @@ jobs:
external_repository: holoviz-dev/datashader
publish_dir: ./builtdocs
force_orphan: true
- name: Deploy main
- 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')))
Expand Down
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: "datashader"

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