Skip to content

feat!: new compute_projection API #414

feat!: new compute_projection API

feat!: new compute_projection API #414

Workflow file for this run

name: CI Build
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
workflow_dispatch:
inputs:
publish_pages:
description: "Publish Documentation Website"
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Set up Rust for WebAssembly
run: |
rustup target add wasm32-unknown-unknown
cargo install -f wasm-bindgen-cli --version 0.2.114
- name: Set up uv package manager
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
npm ci
cd packages/backend && uv sync --frozen
- uses: actions/cache@v5
id: cache-files
with:
path: ~/.cache/embedding_atlas
key: ${{ runner.os }}-embedding-atlas
- name: Generate cached demo data
run: cd packages/docs && npm run generate_cache
- name: Build
run: npm run build
- name: Run type checks
run: npm run check
- name: Run tests
run: npm run test
- name: Run code format check
run: npm run check-format
- name: Upload node package artifact
uses: actions/upload-artifact@v6
with:
name: node-dist
path: packages/embedding-atlas/
- name: Upload python package artifact
uses: actions/upload-artifact@v6
with:
name: python-dist
path: packages/backend/dist/
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v4
with:
path: packages/docs/.vitepress/dist/
test-python:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Download wheel
uses: actions/download-artifact@v7
with:
name: python-dist
path: dist/
- name: Install wheel
run: pip install dist/*.whl
- name: Run tests
run: |
embedding-atlas --help
python -c "import embedding_atlas"
python -c "from embedding_atlas.projection import compute_projection"
pip install jupyterlab anywidget
python -c "from embedding_atlas.widget import EmbeddingAtlasWidget"
pip install streamlit
python -c "from embedding_atlas.streamlit import embedding_atlas"
publish-pypi:
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs:
- build
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/embedding-atlas
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v7
with:
name: python-dist
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
publish-npmjs:
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs:
- build
permissions:
contents: read
id-token: write
environment:
name: npmjs
steps:
- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Retrieve release distributions
uses: actions/download-artifact@v7
with:
name: node-dist
path: package/
- run: cd package && npm publish --provenance --access public
publish-pages:
runs-on: ubuntu-latest
if: github.event_name == 'release' || inputs.publish_pages == true
needs:
- build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4