Skip to content

Docs and examples update for new API #12

Docs and examples update for new API

Docs and examples update for new API #12

Workflow file for this run

# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
# ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
# ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
# ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
# ┃ Copyright (c) 2017, the Perspective Authors. ┃
# ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
# ┃ This file is part of the Perspective library, distributed under the terms ┃
# ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
name: Build Status
on:
push:
branches:
- master
tags:
- v*
paths-ignore:
- AUTHORS
- CHANGELOG.md
- CONTRIBUTING.md
- LICENSE
- README.md
- binder/
- docs/
- examples/
- rust/perspective-python/README.md
pull_request:
branches:
- master
workflow_dispatch:
inputs:
ci-full:
description: "Run Full CI"
required: false
type: boolean
default: false
ci-skip-cache:
description: "Omit Cache from CI run"
required: false
type: boolean
default: false
ci-skip-python:
description: "Skip Python components of CI"
required: false
type: boolean
default: false
ci-include-windows:
description: "Include Windows (Python) components of CI"
required: false
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# ,-,---. . . ,-_/ .---. .
# '|___/ . . . | ,-| ' | ,-. . , ,-. \___ ,-. ,-. . ,-. |-
# ,| \ | | | | | | | ,-| | / ,-| \ | | | | | |
# `-^---' `-^ ' `' `-^ | `-^ `' `-^ `---' `-' ' ' |-' `'
# /` | |
# `--' '
build_js:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
python-version:
- 3.9
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config
id: config-step
uses: ./.github/actions/config
- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
with:
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
- name: WebAssembly Build
run: pnpm run build --ci
env:
PACKAGE: "!perspective-python,!perspective-jupyterlab"
PSP_USE_CCACHE: 1
# - name: Docs Build
# run: pnpm run docs
# - name: Lint
# run: pnpm run lint
# env:
# PACKAGE: "!perspective-python,!perspective-jupyterlab"
- uses: actions/upload-artifact@v4
with:
name: perspective-js-dist
path: |
rust/perspective-js/dist/
rust/perspective-viewer/dist
packages/perspective-jupyterlab/dist/
packages/perspective-viewer-d3fc/dist
packages/perspective-viewer-datagrid/dist
packages/perspective-viewer-openlayers/dist
packages/perspective-esbuild-plugin/dist
packages/perspective-webpack-plugin/dist
packages/perspective-cli/dist
packages/perspective-workspace/dist
# ,-,---. . . .-,--. . .
# '|___/ . . . | ,-| '|__/ . . |- |-. ,-. ,-.
# ,| \ | | | | | | ,| | | | | | | | | |
# `-^---' `-^ ' `' `-^ `' `-| `' ' ' `-' ' '
# /|
# `-'
build_python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-13
- windows-2022
python-version:
- 3.9
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config
id: config-step
uses: ./.github/actions/config
- name: Initialize Build
id: init-step
uses: ./.github/actions/install-deps
with:
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
# https://github.com/apache/arrow/issues/38391
- if: runner.os == 'macOS'
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)" >> $GITHUB_ENV
- run: |
dir env:
if: ${{ runner.os == 'Windows' }}
- name: Python Build
run: pnpm run build
env:
VCPKG_ROOT: ${{ steps.init-step.outputs.VCPKG_INSTALLATION_ROOT }}
PACKAGE: "perspective-python"
PSP_USE_CCACHE: 1
CI: 1
- uses: actions/upload-artifact@v4
with:
name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
path: rust/perspective-python/dist/*.whl
if: ${{ runner.os == 'Windows' }}
- uses: actions/upload-artifact@v4
if: ${{ runner.os != 'Windows' }}
with:
name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
path: rust/target/wheels/*.whl
- uses: actions/upload-artifact@v4
if: ${{ matrix.os == 'ubuntu-20.04' }}
with:
name: perspective-python-sdist
path: rust/target/wheels/*.tar.gz
# ,-,---. . . ,-_/ . , .
# '|___/ . . . | ,-| ' | . . ,-. . . |- ,-. ,-. ) ,-. |-.
# ,| \ | | | | | | | | | | | | | | |-' | / ,-| | |
# `-^---' `-^ ' `' `-^ | `-^ |-' `-| `' `-' ' `--' `-^ ^-'
# /` | | /|
# `--' ' `-'
build_juptyerlab_extension:
needs: [build_js, build_python]
runs-on: ${{ matrix.os }}
if: false
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
python-version:
- 3.9
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config
id: config-step
uses: ./.github/actions/config
- name: Initialize Build
uses: ./.github/actions/install-deps
with:
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
- uses: actions/upload-artifact@v4
with:
name: nbextension-dist
path: rust/perspective-python/perspective/nbextension
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: labextension-dist
path: rust/perspective-python/perspective/labextension
if-no-files-found: error
# ,--,--' . ,-_/ .---. .
# `- | ,-. ,-. |- ' | ,-. . , ,-. \___ ,-. ,-. . ,-. |-
# , | |-' `-. | | ,-| | / ,-| \ | | | | | |
# `-' `-' `-' `' | `-^ `' `-^ `---' `-' ' ' |-' `'
# /` | |
# `--' '
test_js:
needs: [build_js]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
python-version:
- 3.9
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config
id: config-step
uses: ./.github/actions/config
- name: Initialize Build
uses: ./.github/actions/install-deps
with:
llvm: "false"
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
- uses: actions/download-artifact@v4
with:
name: perspective-js-dist
path: .
- name: Run Tests
run: pnpm run test
env:
PACKAGE: "!perspective-python,!perspective-jupyterlab"
PSP_USE_CCACHE: 1
# ,--,--' . .-,--. . .
# `- | ,-. ,-. |- '|__/ . . |- |-. ,-. ,-.
# , | |-' `-. | ,| | | | | | | | | |
# `-' `-' `-' `' `' `-| `' ' ' `-' ' '
# /|
# `-'
test_python:
needs: [build_python]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-13
- windows-2022
python-version:
- 3.9
- 3.12
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config
id: config-step
uses: ./.github/actions/config
- name: Initialize Build
uses: ./.github/actions/install-deps
with:
llvm: "false"
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}
- uses: actions/download-artifact@v4
with:
name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
- name: Install wheel (Linux)
run: python -m pip install -r rust/perspective-python/requirements.txt
if: ${{ runner.os == 'Linux' }}
- name: Install wheel (Linux)
run: python -m pip install -U *manylinux*.whl --target rust/perspective-python
if: ${{ runner.os == 'Linux' }}
# # Note, on mac we must install the x86 wheel, the arm64 wheel
# # would need an arm machine to test
# - name: Install wheel (OSX)
# run: python -m pip install -U --no-dependencies *x86*.whl --target python/perspective
# if: ${{ runner.os == 'macOS' && matrix.python-version != '3.11' }}
# - name: Install wheel (OSX 3.11+)
# run: python -m pip install -U --no-dependencies *universal*.whl --target python/perspective
# if: ${{ runner.os == 'macOS' && matrix.python-version == '3.11' }}
# - name: Install wheel (windows)
# run: python -m pip install -U --no-dependencies (Get-ChildItem .\*.whl | Select-Object -Expand FullName) --target python/perspective
# if: ${{ runner.os == 'Windows' }}
- name: Run Tests
run: pnpm run test
env:
PACKAGE: "perspective-python"
PSP_USE_CCACHE: 1
# ##########################################################################################################################
# ##########################################################################################################################
# #######################################
# #~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~/########\~~~~~~~#
# #~~~~~~|###|~~~\###\~~~~~~#
# #~~~~~~~~~~~~~/###/~~~~~~~#
# #~~~~~~~~~~~/###/~~~~~~~~~#
# #~~~~~~~~~/###/~~~~~~~~~~~#
# #~~~~~~~/###/~~~~~~~~~~~~~#
# #~~~~~|#############|~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Two - Lint Python #
# #~~~~~~~~~~~~~~~~~~~~~~~~~#
# lint_python:
# needs: [initialize]
# strategy:
# matrix:
# os:
# - ubuntu-22.04 # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# python-version:
# - 3.9
# # NOTE: don't fail fast as sometimes npm blocks the burst of fetches from GHA
# fail-fast: false
# ##################################
# # Setup matrix job configuration #
# ##################################
# runs-on: ${{ matrix.os }}
# if: ${{ needs.initialize.outputs.SKIP_CI == 'false' && needs.initialize.outputs.SKIP_PYTHON == 'false' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Install LLVM 17
# uses: KyleMayes/install-llvm-action@v2
# with:
# version: "17"
# directory: "./.llvm"
# ##########
# # Caches #
# ##########
# ################
# # PNPM Cache
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # Pip Cache
# - name: Setup pip cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ###############################
# # Language and Compiler Setup #
# ###############################
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: "pip"
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# ################
# # Dependencies #
# ################
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# ################
# # Python
# # - name: Install python dependencies
# # run: pnpm run _requires_python
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #################
# # Python - Lint #
# #################
# ########
# # Linux
# - name: Python Lint (Linux)
# run: pnpm run lint
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# PSP_PROJECT: python
# ##########################################################################################################################
# ##########################################################################################################################
# #############################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~/########\~~~~~~~#
# #~~~~~~~~~|##|~~~~|##|~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~~~#
# #~~~~~~~~~~~~~|######|~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~~~#
# #~~~~~~~~~|##|~~~~|##|~~~~~~#
# #~~~~~~~~~\#########/~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Three - Test the JS #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# test_js:
# needs: [initialize, build_js]
# strategy:
# matrix:
# os:
# - ubuntu-20.04 # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# python-version:
# - 3.9
# node-version: [20.x]
# # NOTE: don't fail fast as sometimes npm blocks the burst of fetches from GHA
# fail-fast: false
# ##################################
# # Setup matrix job configuration #
# ##################################
# runs-on: ${{ matrix.os }}
# if: ${{ needs.initialize.outputs.SKIP_CI == 'false' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# ##########
# # Caches #
# ##########
# ################
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # Pip Cache
# - name: Setup pip cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ################
# # Cargo Cache
# - name: Setup cargo cache
# uses: actions/cache@v4
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# rust/perspective-viewer/target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ###############################
# # Language and Compiler Setup #
# ###############################
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: "pip"
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# ################
# # Dependencies #
# ################
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# ################
# # Python
# # - name: Install python dependencies
# # run: pnpm run _requires_python
# ################
# # Rust
# - name: Install latest nightly rust
# uses: dtolnay/rust-toolchain@nightly
# with:
# toolchain: nightly-2023-10-12
# targets: wasm32-unknown-unknown
# components: rustfmt, clippy, rust-src
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# - uses: actions/download-artifact@v4
# with:
# name: perspective-dist
# path: rust/perspective-js/dist/
# - uses: actions/download-artifact@v4
# with:
# name: perspective-jupyterlab-dist
# path: packages/perspective-jupyterlab/dist/
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-d3fc-dist
# path: packages/perspective-viewer-d3fc/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-datagrid-dist
# path: packages/perspective-viewer-datagrid/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-openlayers-dist
# path: packages/perspective-viewer-openlayers/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-workspace-dist
# path: packages/perspective-workspace/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-dist
# path: rust/perspective-viewer/dist
# ###############
# # WebAssembly #
# ###############
# - name: WebAssembly Test
# run: pnpm run test_js --ci
# ######################
# # Fancy HTML reports #
# ######################
# - uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: playwright-report
# path: tools/perspective-test/playwright-report/
# retention-days: 30
# ############################# ##############################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~/########\~~~~~~~# #~~~~~~~~~|##########|~~~~~~~#
# #~~~~~~~~~|##|~~~~|##|~~~~~~# #~~~~~~~~~|##|~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~~~# #~~~~~~~~~|##|~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|######|~~~~~~# #~~~~~~~~~|##########|~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~~~# #~~~~~~~~~~~~~~~~~|##|~~~~~~~#
# #~~~~~~~~~|##|~~~~|##|~~~~~~# #~~~~~~~~~|##|~~~~|##|~~~~~~~#
# #~~~~~~~~~\#########/~~~~~~~# #~~~~~~~~~|##########|~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~# ##### #~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Three And a Half # # . # # Benchmarking #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~# ##### #~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# benchmark_js:
# needs: [build_js]
# if: startsWith(github.ref, 'refs/tags/v')
# strategy:
# matrix:
# os: [ubuntu-20.04]
# node-version: [20.x]
# runs-on: ${{ matrix.os }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# ##########
# # Caches #
# ##########
# ################
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# ################
# # Dependencies #
# ################
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# - uses: actions/download-artifact@v4
# with:
# name: perspective-dist
# path: rust/perspective-js/dist/
# - uses: actions/download-artifact@v4
# with:
# name: perspective-jupyterlab-dist
# path: packages/perspective-jupyterlab/dist/
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-d3fc-dist
# path: packages/perspective-viewer-d3fc/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-datagrid-dist
# path: packages/perspective-viewer-datagrid/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-openlayers-dist
# path: packages/perspective-viewer-openlayers/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-workspace-dist
# path: packages/perspective-workspace/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-dist
# path: rust/perspective-viewer/dist
# - name: Benchmarks
# run: pnpm run bench
# - uses: actions/upload-artifact@v4
# with:
# name: perspective-js-benchmarks
# path: tools/perspective-bench/dist/benchmark-js.arrow
# ##########################################################################################################################
# ##########################################################################################################################
# ########################################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~|##########|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Four - Build the Python Assets #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# build_python:
# ###################################################################
# # Run JS build first, then use the artifacts in the python builds #
# ###################################################################
# needs: [initialize, build_js]
# strategy:
# # NOTE: this matrix should build wheels across all supported envs.
# # For each entry, a corresponding test is included below that
# # will download the built wheel and run the test suite.
# #
# # If you update anything here, including the `excludes`, ensure
# # that the subsequent test matrix takes those changes into account.
# matrix:
# os:
# - ubuntu-20.04 # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# - macos-11 # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
# - windows-2022 # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md
# python-version:
# - 3.7
# - 3.8
# - 3.9
# - "3.10"
# - 3.11
# container:
# - none # Not manylinux, we will use this space to build the WASM assets
# - 2014
# node-version: [20.x]
# is-full-run:
# - ${{ needs.initialize.outputs.FULL_RUN == 'true' }}
# include-windows-run:
# - ${{ needs.initialize.outputs.INCLUDE_WINDOWS == 'true' || needs.initialize.outputs.FULL_RUN == 'true' }}
# exclude:
# ############################
# # Things to always exclude #
# ############################
# # Exclude manylinux python builds other than linux
# - os: macos-11
# container: 2014
# - os: windows-2022
# container: 2014
# # Exclude non-manylinux builds on linux
# - os: ubuntu-20.04
# container: none
# ##############################################
# # Things to exclude if not a full matrix run #
# ##############################################
# # Exclude windows builds if set
# - include-windows-run: false
# os: windows-2022
# - is-full-run: false
# os: macos-11
# # Exclude Python 3.7, 3.8, 3.10, 3.11 builds
# - is-full-run: false
# python-version: 3.7
# - is-full-run: false
# python-version: 3.8
# - is-full-run: false
# python-version: "3.10"
# - is-full-run: false
# python-version: 3.11
# # NOTE: don't fail fast as sometimes npm blocks the burst of fetches from GHA
# fail-fast: false
# ##################################
# # Setup matrix job configuration #
# ##################################
# runs-on: ${{ matrix.os }}
# if: ${{ needs.initialize.outputs.SKIP_CI == 'false' && needs.initialize.outputs.SKIP_PYTHON == 'false' }}
# steps:
# - name: Clean System
# uses: AdityaGarg8/remove-unwanted-software@v3
# if: ${{ runner.os == 'Linux' }}
# with:
# remove-android: "true"
# remove-dotnet: "true"
# remove-haskell: "true"
# remove-codeql: "true"
# - name: Checkout
# uses: actions/checkout@v4
# #####################################################
# # Conditionals #
# # --------------------------------------------------#
# # Here is a reference for conditionals used #
# # #
# # Operating system: #
# # if: ${{ runner.os == 'Linux' }} #
# # if: ${{ runner.os == 'macOS' }} #
# # if: ${{ runner.os == 'Windows' }} #
# # #
# #####################################################
# ################
# # JS Artifacts #
# ################
# - uses: actions/download-artifact@v4
# with:
# name: nbextension-dist
# path: python/perspective/perspective/nbextension
# - uses: actions/download-artifact@v4
# with:
# name: labextension-dist
# path: python/perspective/perspective/labextension
# ##########
# # Caches #
# ##########
# ################
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # Pip Cache
# - name: Setup pip cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# if: ${{ runner.os != 'Linux' && needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ################
# # Homebrew Cache
# - name: Setup homebrew cache
# uses: actions/cache@v4
# with:
# path: |
# ~/Library/Caches/Homebrew/boost--*
# ~/Library/Caches/Homebrew/downloads/*--boost-*
# key: brew-${{ hashFiles('cpp/perspective/CMakeLists.txt') }}
# restore-keys: brew-
# if: ${{ runner.os == 'macOS' && needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ################
# # vcpkg Cache
# - name: Setup vcpkg cache
# uses: actions/cache@v4
# with:
# path: |
# C:\Users\runneradmin\AppData\Local\vcpkg\archives
# C:\vcpkg\packages\
# C:\vcpkg\downloads\
# C:\vcpkg\buildtrees\
# C:\vcpkg\ports\
# key: vcpkg-${{ hashFiles('cpp/perspective/CMakeLists.txt') }}
# restore-keys: vcpkg-
# if: ${{ runner.os == 'Windows' && needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ###############################
# # Language and Compiler Setup #
# ###############################
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: "pip"
# if: ${{ runner.os != 'Linux' }} # skip on manylinux2014
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# if: ${{ runner.os != 'Linux' }} # skip on manylinux2014
# ################
# # Dependencies #
# ################
# ################
# # - name: Install LLVM 17
# # uses: KyleMayes/install-llvm-action@v2
# # if: false
# # with:
# # version: "17"
# # directory: "./.llvm"
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# ################
# # Python
# # - name: Install python dependencies
# # run: pnpm run _requires_python
# # if: ${{ runner.os != 'Linux' }} # skip on manylinux2014
# ################
# # Linux
# # NOTE: Not necessary because docker images prebuilt.
# # If we remove docker images, we will need to reenable
# # this.
# # - name: Linux init steps
# # run: sudo node tools/perspective-scripts/install_tools.mjs
# # if: ${{ runner.os == 'Linux' }}
# ################
# # Mac
# - name: Install Boost (MacOS)
# run: sudo node tools/perspective-scripts/install_tools.mjs
# if: ${{ runner.os == 'macOS' }}
# ################
# # Windows
# - name: Windows init steps (vc143)
# run: |
# vcpkg.exe install boost-thread boost-algorithm boost-filesystem boost-multi-index boost-multiprecision boost-program-options boost-system boost-unordered boost-uuid
# vcpkg.exe integrate install
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# VCPKG_DEFAULT_TRIPLET: x64-windows
# VCPKG_PLATFORM_TOOLSET: v143
# if: ${{ matrix.os == 'windows-2022' }}
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# ########
# # Linux
# - name: Python Wheel Steps (Linux)
# run: pnpm run _wheel_python --ci
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# MANYLINUX: ${{ matrix.container }}
# PSP_DOCKER: 1
# if: ${{ matrix.os == 'ubuntu-20.04' }}
# ########
# # Macos
# - name: Python Build Steps (Macos)
# run: |
# pnpm run _wheel_python --ci --macos
# pnpm run _wheel_python --ci --macos --arm
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# if: ${{ runner.os == 'macOS' }}
# - name: Python SDist Steps
# run: |
# cd python/perspective/
# rm -rf perspective/table/*.{so,dll}
# python3 setup.py sdist
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# if: ${{ matrix.os == 'macos-11' }}
# ##########
# # Windows
# - name: Python Build Steps (Windows vc14.3)
# run: pnpm run _wheel_python --ci
# env:
# PSP_GENERATOR: Visual Studio 17 2022
# PSP_VCPKG_PATH: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
# if: ${{ matrix.os == 'windows-2022' }}
# ####################
# # Upload artifacts #
# ####################
# - uses: actions/upload-artifact@v4
# with:
# name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
# path: python/perspective/dist/*.whl
# if: ${{ runner.os == 'Windows' }}
# - uses: actions/upload-artifact@v4
# with:
# name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
# path: python/perspective/wheelhouse/*.whl
# if: ${{ runner.os != 'Windows' }}
# - uses: actions/upload-artifact@v4
# with:
# name: perspective-python-sdist
# path: python/perspective/dist/*.tar.gz
# if: ${{ matrix.os == 'macos-11' && matrix.python-version == 3.8 }}
# build_pyodide:
# strategy:
# matrix:
# os: [ubuntu-20.04]
# runs-on: ${{ matrix.os }}
# needs: [initialize]
# env:
# PYODIDE_VERSION: 0.25.1
# # PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_VERSION.
# # The appropriate versions can be found in the Pyodide repodata.json
# # "info" field, or in Makefile.envs:
# # https://github.com/pyodide/pyodide/blob/0.25.1/Makefile.envs#L2
# PYTHON_VERSION: 3.11.3
# EMSCRIPTEN_VERSION: 3.1.46
# steps:
# - name: Checkout perspective
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# - name: set up python
# id: setup-python
# uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - uses: mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 # v12
# with:
# version: ${{ env.EMSCRIPTEN_VERSION }}
# actions-cache-folder: emsdk-cache
# - name: copy files
# run: |
# npm install -g pnpm
# pnpm install --frozen-lockfile
# pnpm run build_python --setup-only
# - name: Linux init steps
# run: sudo node tools/perspective-scripts/install_tools.mjs
# - name: Install pyodide-build
# run: pip install pyodide-build==$PYODIDE_VERSION "pydantic<2"
# - name: Build
# # Without --exports=pyinit, pyodide-build tries to export all symbols from every .o,
# # which causes the em++ linker command line invocation to be so long
# # that the command fails.
# run: pyodide build python/perspective --exports=pyinit
# - name: Upload pyodide wheel
# uses: actions/upload-artifact@v4
# with:
# name: perspective-python-dist-pyodide
# path: dist/*.whl
# ##########################################################################################################################
# ##########################################################################################################################
# ###############################################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##########|~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##########|~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~|##########|~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Five - Test combined JS/Python Assets #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # test_js_and_python:
# # ###################################################################
# # # Run JS build first, then use the artifacts in the python builds #
# # ###################################################################
# # needs: [initialize, build_js, build_python]
# # strategy:
# # matrix:
# # os:
# # - ubuntu-20.04 # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# # python-version:
# # - 3.9
# # node-version: [20.x]
# # # NOTE: don't fail fast as sometimes npm blocks the burst of fetches from GHA
# # fail-fast: false
# # ##################################
# # # Setup matrix job configuration #
# # ##################################
# # runs-on: ${{ matrix.os }}
# # if: ${{ needs.initialize.outputs.SKIP_CI == 'false' && needs.initialize.outputs.SKIP_PYTHON == 'false' }}
# # steps:
# # - name: Checkout
# # uses: actions/checkout@v4
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-dist
# # path: rust/perspective-jd/dist/
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-jupyterlab-dist
# # path: packages/perspective-jupyterlab/dist/
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-viewer-d3fc-dist
# # path: packages/perspective-viewer-d3fc/dist
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-viewer-datagrid-dist
# # path: packages/perspective-viewer-datagrid/dist
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-workspace-dist
# # path: packages/perspective-workspace/dist
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-viewer-dist
# # path: rust/perspective-viewer/dist
# # - uses: actions/download-artifact@v4
# # with:
# # name: nbextension-dist
# # path: python/perspective/perspective/nbextension
# # - uses: actions/download-artifact@v4
# # with:
# # name: labextension-dist
# # path: python/perspective/perspective/labextension
# # ##########
# # # Caches #
# # ##########
# # ################
# # - name: Install pnpm
# # uses: pnpm/action-setup@v3
# # with:
# # version: 9
# # ################
# # # Pip Cache
# # - name: Setup pip cache
# # uses: actions/cache@v4
# # with:
# # path: ~/.cache/pip
# # key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# # restore-keys: |
# # ${{ runner.os }}-pip-
# # if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# # ###############################
# # # Language and Compiler Setup #
# # ###############################
# # - name: Set up Python ${{ matrix.python-version }}
# # uses: actions/setup-python@v5
# # with:
# # python-version: ${{ matrix.python-version }}
# # cache: "pip"
# # - name: Use Node.js ${{ matrix.node-version }}
# # uses: actions/setup-node@v4
# # with:
# # node-version: ${{ matrix.node-version }}
# # cache: "pnpm"
# # cache-dependency-path: pnpm-lock.yaml
# # ################
# # # Dependencies #
# # ################
# # ################
# # # JS
# # - name: Install js dependencies
# # run: pnpm install --frozen-lockfile
# # env:
# # PSP_SKIP_EMSDK_INSTALL: 1
# # - name: Install Playwright Browsers
# # run: npx playwright install --with-deps
# # ################
# # # Python
# # - name: Install python dependencies
# # run: pnpm run _requires_python
# # # Download artifact
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
# # # Install artifact
# # - name: Install wheel (system)
# # run: python -m pip install --force-reinstall -U --no-dependencies *manylinux2014*.whl
# # - name: Install wheel (local)
# # run: python -m pip install --force-reinstall -U --no-dependencies *manylinux2014*.whl --target python/perspective
# # - name: Check Installed labextensions
# # run: jupyter labextension list
# # - name: Run Jupyterlab tests
# # run: pnpm run test_js --jupyter
# # env:
# # PACKAGE: perspective-jupyterlab
# ##########################################################################################################################
# ##########################################################################################################################
# ########################################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##########|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##|~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##########|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##|~~~~|##|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~|##########|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Six - Test Python wheel Assets #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# test_python:
# ######################################################################
# # Run Python build first, then use the artifacts in the python tests #
# ######################################################################
# needs: [initialize, build_python]
# strategy:
# matrix:
# os:
# - ubuntu-20.04 # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# - macos-11 # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
# - windows-2022 # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md
# python-version:
# - 3.7
# - 3.8
# - 3.9
# - "3.10"
# - 3.11
# node-version: [20.x]
# is-full-run:
# - ${{ needs.initialize.outputs.FULL_RUN == 'true' }}
# include-windows-run:
# - ${{ needs.initialize.outputs.INCLUDE_WINDOWS == 'true' || needs.initialize.outputs.FULL_RUN == 'true' }}
# exclude:
# ##############################################
# # Things to exclude if not a full matrix run #
# ##############################################
# # Exclude if skipping windows
# - include-windows-run: false
# os: windows-2022
# # Exclude Mac builds
# - is-full-run: false
# os: macos-11
# # GitHub Actions are broken on OSX, don't test 3.7 wheels
# # https://github.com/actions/setup-python/issues/682
# - python-version: 3.7
# os: macos-11
# # Exclude Python 3.7, 3.8, 3.10, 3.11 builds
# - is-full-run: false
# python-version: 3.7
# - is-full-run: false
# python-version: 3.8
# - is-full-run: false
# python-version: "3.10"
# - is-full-run: false
# python-version: 3.11
# # NOTE: don't fail fast as sometimes npm blocks the burst of fetches from GHA
# fail-fast: false
# ##################################
# # Setup matrix job configuration #
# ##################################
# runs-on: ${{ matrix.os }}
# if: ${{ needs.initialize.outputs.SKIP_CI == 'false' && needs.initialize.outputs.SKIP_PYTHON == 'false' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# ##########
# # Caches #
# ##########
# ################
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # Pip Cache
# - name: Setup pip cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ###############################
# # Language and Compiler Setup #
# ###############################
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: "pip"
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# ################
# # Dependencies #
# ################
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# ################
# # Python
# - name: Install python dependencies
# run: pnpm run _requires_python
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #################
# # Python - Test #
# #################
# # Download artifact
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
# # Install artifact in-place so tests work as-is
# - name: Install wheel (Linux)
# run: python -m pip install -U --no-dependencies *manylinux2014*.whl --target python/perspective
# if: ${{ runner.os == 'Linux' }}
# # Note, on mac we must install the x86 wheel, the arm64 wheel
# # would need an arm machine to test
# - name: Install wheel (OSX)
# run: python -m pip install -U --no-dependencies *x86*.whl --target python/perspective
# if: ${{ runner.os == 'macOS' && matrix.python-version != '3.11' }}
# - name: Install wheel (OSX 3.11+)
# run: python -m pip install -U --no-dependencies *universal*.whl --target python/perspective
# if: ${{ runner.os == 'macOS' && matrix.python-version == '3.11' }}
# - name: Install wheel (windows)
# run: python -m pip install -U --no-dependencies (Get-ChildItem .\*.whl | Select-Object -Expand FullName) --target python/perspective
# if: ${{ runner.os == 'Windows' }}
# # Run tests
# - name: Python Test Steps
# run: pnpm run test_python --debug
# ##########################################################################################################################
# ##########################################################################################################################
# ##########################################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|#############|~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|#|~~~~~~~/##/~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|#|~~~~~/##/~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~/##/~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~/##/~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~/##/~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~/##/~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Seven - Test Python sdist Assets #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# test_python_sdist:
# ######################################################################
# # Run Python build first, then use the artifacts in the python tests #
# ######################################################################
# needs: [initialize, build_python]
# strategy:
# matrix:
# os:
# - ubuntu-20.04 # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
# python-version:
# - 3.9
# ##################################
# # Setup matrix job configuration #
# ##################################
# runs-on: ${{ matrix.os }}
# if: ${{ needs.initialize.outputs.FULL_RUN == 'true' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# ##########
# # Caches #
# ##########
# ################
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # Pip Cache
# - name: Setup pip cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ###############################
# # Language and Compiler Setup #
# ###############################
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: "pip"
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# ################
# # Dependencies #
# ################
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install --frozen-lockfile
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# ################
# # Linux
# - name: Linux init steps
# run: sudo node tools/perspective-scripts/install_tools.mjs
# ################
# # Python
# - name: Install python dependencies
# run: pnpm run _requires_python
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Download sdist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-sdist
# # Install sdist
# - name: Install sdist
# run: python -m pip install --no-dependencies perspective*.tar.gz
# # Test sdist
# - name: Run tests against from-scratch sdist build
# run: python -m pytest -vvv --rootdir=python/perspective `python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))"`/perspective/tests --ignore=`python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))"`/perspective/tests/client_mode
# ##########################################################################################################################
# ##########################################################################################################################
# ############################ ##############################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~|#############|~~~~~# #~~~~~~~~~|##########|~~~~~~~#
# #~~~~~~|#|~~~~~~~/##/~~~~~~# #~~~~~~~~~|##|~~~~~~~~~~~~~~~#
# #~~~~~~|#|~~~~~/##/~~~~~~~~# #~~~~~~~~~|##|~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~/##/~~~~~~~~~~# #~~~~~~~~~|##########|~~~~~~~#
# #~~~~~~~~~~/##/~~~~~~~~~~~~# #~~~~~~~~~~~~~~~~~|##|~~~~~~~#
# #~~~~~~~~/##/~~~~~~~~~~~~~~# #~~~~~~~~~|##|~~~~|##|~~~~~~~#
# #~~~~~~/##/~~~~~~~~~~~~~~~~# #~~~~~~~~~|##########|~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~# ##### #~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Seven and a Half # # . # # Benchmarking #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~# ##### #~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# benchmark_python:
# ######################################################################
# # Run Python build first, then use the artifacts in the python tests #
# ######################################################################
# needs: [build_python]
# strategy:
# matrix:
# os: [ubuntu-20.04]
# python-version: [3.11]
# node-version: [20.x]
# if: startsWith(github.ref, 'refs/tags/v')
# runs-on: ${{ matrix.os }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# ##########
# # Caches #
# ##########
# ################
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # Pip Cache
# - name: Setup pip cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# if: ${{ needs.initialize.outputs.SKIP_CACHE == 'false' }}
# ###############################
# # Language and Compiler Setup #
# ###############################
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# cache: "pip"
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "pnpm"
# cache-dependency-path: pnpm-lock.yaml
# ################
# # Dependencies #
# ################
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL: 1
# ################
# # Python
# - name: Install python dependencies
# run: pnpm run _requires_python
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~ Build Pipelines ~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #################
# # Python - Test #
# #################
# # Download artifact
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-${{ matrix.os }}-${{ matrix.python-version }}
# # Install artifact in-place so tests work as-is
# - name: Install wheel (Linux)
# run: python -m pip install -U *manylinux2014*.whl --target python/perspective
# if: ${{ runner.os == 'Linux' }}
# - name: Run Benchmark
# run: pnpm run bench
# shell: bash
# env:
# PSP_PROJECT: python
# - uses: actions/upload-artifact@v4
# with:
# name: perspective-python-benchmarks
# path: tools/perspective-bench/dist/benchmark-python.arrow
# ##########################################################################################################################
# ##########################################################################################################################
# ##########################################
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~/#########\~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|##|~~~~~|##|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|##|~~~~~|##|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|###########|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|##|~~~~~|##|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~|##|~~~~~|##|~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~\#########/~~~~~~~~~~~~~~#
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# # Stage Eight - Publish Artifacts #
# #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# publish:
# needs: [
# # test_js_and_python,
# test_python,
# test_python_sdist,
# build_pyodide,
# test_js,
# benchmark_js,
# benchmark_python,
# ]
# if: startsWith(github.ref, 'refs/tags/v')
# strategy:
# matrix:
# os: [ubuntu-20.04]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# ################
# # JS
# - name: Install js dependencies
# run: pnpm install
# env:
# PSP_SKIP_EMSDK_INSTALL:
# 1
# # TODO: `actions/upload-artifact` succedds with a warning when the
# # path is empty, but `actions/downlaod-artifact` fails, and 3 JS
# # packages have no `dist`.
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-cli-dist
# # path: packages/perspective-cli/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-dist
# path: rust/perspective-js/dist/
# - uses: actions/download-artifact@v4
# with:
# name: perspective-jupyterlab-dist
# path: packages/perspective-jupyterlab/dist/
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-d3fc-dist
# path: packages/perspective-viewer-d3fc/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-datagrid-dist
# path: packages/perspective-viewer-datagrid/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-openlayers-dist
# path: packages/perspective-viewer-openlayers/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-workspace-dist
# path: packages/perspective-workspace/dist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-viewer-dist
# path: rust/perspective-viewer/dist
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-esbuild-plugin-dist
# # path: packages/perspective-esbuild-plugin/dist
# # - uses: actions/download-artifact@v4
# # with:
# # name: perspective-webpack-plugin-dist
# # path: packages/perspective-webpack-plugin/dist
# - uses: actions/download-artifact@v4
# with:
# name: nbextension-dist
# path: python/perspective/perspective/nbextension
# - uses: actions/download-artifact@v4
# with:
# name: labextension-dist
# path: python/perspective/perspective/labextension
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-ubuntu-20.04-3.7
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-ubuntu-20.04-3.8
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-ubuntu-20.04-3.9
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-ubuntu-20.04-3.10
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-ubuntu-20.04-3.11
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-macos-11-3.7
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-macos-11-3.8
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-macos-11-3.9
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-macos-11-3.10
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-macos-11-3.11
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-windows-2022-3.7
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-windows-2022-3.8
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-windows-2022-3.9
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-windows-2022-3.10
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-windows-2022-3.11
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-dist-pyodide
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-sdist
# - uses: actions/download-artifact@v4
# with:
# name: perspective-js-benchmarks
# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-benchmarks
# - name: NPM pack perspective
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective
# - name: NPM pack perspective-viewer
# run: pnpm pack --pack-destination=../..
# working-directory: ./rust/perspective-viewer
# - name: NPM pack perspective-viewer-datagrid
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-viewer-datagrid
# - name: NPM pack perspective-viewer-d3fc
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-viewer-d3fc
# - name: NPM pack perspective-viewer-openlayers
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-viewer-openlayers
# - name: NPM pack perspective-workspace
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-workspace
# - name: NPM pack perspective-cli
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-cli
# - name: NPM pack perspective-webpack-plugin
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-webpack-plugin
# - name: NPM pack perspective-esbuild-plugin
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-esbuild-plugin
# - name: NPM pack perspective-jupyterlab
# run: pnpm pack --pack-destination=../..
# working-directory: ./packages/perspective-jupyterlab
# - name: Debug
# run: ls -lah
# - name: Release wheels
# uses: softprops/action-gh-release@v2
# with:
# draft: true
# generate_release_notes: true
# files: |
# *.whl
# *.tar.gz
# *.tgz
# *.arrow
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}