Skip to content

Commit

Permalink
Add perspective-js and perspective-client crates, move `perspecti…
Browse files Browse the repository at this point in the history
…ve-viewer`

Signed-off-by: Andrew Stein <[email protected]>
  • Loading branch information
texodus committed May 27, 2024
1 parent 413eced commit 8041a71
Show file tree
Hide file tree
Showing 367 changed files with 10,812 additions and 12,471 deletions.
291 changes: 145 additions & 146 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 @@ -645,7 +645,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 +750,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 +1166,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 +1707,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 +1749,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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,4 @@ rust/perspective-js/build
rust/perspective-js/src/ts/ts-rs
rust/perspective-server/cpp
rust/perspective-server/cmake
rust/perspective-js/docs
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules/
target/
.emsdk/
boost*/
py_modules/
py_modules/
ts-rs/
Loading

0 comments on commit 8041a71

Please sign in to comment.