Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[alias]
bundle = "run -p perspective-bundle --"
bundle = "run -p perspective-bundle"

[build]
rustflags = ["--cfg=web_sys_unstable_apis"]
target-dir = "rust/target"

[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'
Expand Down
297 changes: 145 additions & 152 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: perspective-dist
path: packages/perspective/dist/
path: rust/perspective-js/dist/

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -521,12 +521,6 @@ jobs:
PYTHON_VERSION: ${{ matrix.python-version }}
PSP_PROJECT: python

- name: JavaScript Lint
run: pnpm run lint
env:
PYTHON_VERSION: ${{ matrix.python-version }}
PSP_PROJECT: js

##########################################################################################################################
##########################################################################################################################

Expand Down Expand Up @@ -645,7 +639,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: perspective-dist
path: packages/perspective/dist/
path: rust/perspective-js/dist/

- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -750,7 +744,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: perspective-dist
path: packages/perspective/dist/
path: rust/perspective-js/dist/

- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -1166,145 +1160,145 @@ jobs:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# 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: packages/perspective/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
# 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

##########################################################################################################################
##########################################################################################################################
Expand Down Expand Up @@ -1707,9 +1701,8 @@ jobs:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

publish:
needs:
[
test_js_and_python,
needs: [
# test_js_and_python,
test_python,
test_python_sdist,
build_pyodide,
Expand Down Expand Up @@ -1750,7 +1743,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: perspective-dist
path: packages/perspective/dist/
path: rust/perspective-js/dist/

- uses: actions/download-artifact@v4
with:
Expand Down
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ flycheck_*.el
*.app

# Build artifacts
build
rust/target*
/docs/build
/packages/*/build
/python/*/build
/examples/*/build
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Expand Down Expand Up @@ -123,6 +127,8 @@ target.vscode
!.vscode/settings.default.json
!.vscode/tasks.json

.llvm

# docs
website/translated_docs
website/build/
Expand Down Expand Up @@ -223,3 +229,15 @@ testenv
.clangd
.llvm/
examples/blocks/src/nypd/nypdccrb.arrow
.clangd
rust/perspective/build
rust/perspective-viewer/build
rust/perspective-client/src/rust/proto.rs
.vscode/vscode.css
rust/perspective/src/ts/ts-rs
rust/perspective-viewer/src/ts/ts-rs
rust/perspective-js/build
rust/perspective-js/src/ts/ts-rs
rust/perspective-server/cpp
rust/perspective-server/cmake
rust/perspective-js/docs
Loading