Skip to content

Commit d19f0c2

Browse files
authored
Merge pull request #115 from MetaCell/develop
Develop
2 parents 3efc904 + 65e7d1e commit d19f0c2

1,629 files changed

Lines changed: 96810 additions & 93874 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 16 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Prettier formatting
2+
b67a299daf9d0366283169d4f1ec15c54f861546

.github/workflows/build.yml

Lines changed: 83 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on:
77
tags:
88
- v**
99
pull_request:
10+
workflow_dispatch:
11+
inputs:
12+
debug_enabled:
13+
type: boolean
14+
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
15+
required: false
16+
default: false
1017

1118
jobs:
1219
client:
@@ -24,12 +31,20 @@ jobs:
2431
fetch-depth: 0
2532
- uses: actions/setup-node@v4
2633
with:
27-
node-version: 20.x
34+
node-version: 22.x
2835
cache: "npm"
2936
cache-dependency-path: |
3037
package-lock.json
31-
examples/**/package-lock.json
32-
- run: npm install
38+
# uv required for javascript tests
39+
- uses: astral-sh/setup-uv@v5
40+
with:
41+
enable-cache: false
42+
# go needed for fake_gcs_server used by the javascript tests
43+
- name: Setup go
44+
uses: actions/setup-go@v5
45+
with:
46+
go-version: "stable"
47+
- run: npm ci
3348
- run: npm run format:fix
3449
- name: Check for dirty working directory
3550
run: git diff --exit-code
@@ -47,7 +62,6 @@ jobs:
4762
- run: npm run build-package
4863
- run: npm publish --dry-run
4964
working-directory: dist/package
50-
- uses: ./.github/actions/setup-firefox
5165
- name: Run JavaScript tests (including WebGL)
5266
run: npm test
5367
if: ${{ runner.os != 'macOS' }}
@@ -68,6 +82,36 @@ jobs:
6882
name: client
6983
path: dist/client
7084
if: ${{ runner.os == 'Linux' }}
85+
example-project-test:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
- name: Install pnpm
90+
uses: pnpm/action-setup@v4
91+
with:
92+
version: 10
93+
- uses: actions/setup-node@v4
94+
with:
95+
node-version: 22.x
96+
cache: "pnpm"
97+
cache-dependency-path: |
98+
examples/**/pnpm-lock.yaml
99+
- uses: actions/setup-node@v4
100+
with:
101+
node-version: 22.x
102+
cache: "npm"
103+
cache-dependency-path: |
104+
package-lock.json
105+
- run: npm ci
106+
- run: npm run example-project-test -- --reporter=html
107+
- name: Upload report and built clients
108+
uses: actions/upload-artifact@v4
109+
if: ${{ !cancelled() }}
110+
with:
111+
name: example-project-test-results
112+
path: |
113+
playwright-report/
114+
examples/*/*/dist/
71115
72116
# Builds Python package and runs Python tests
73117
#
@@ -92,28 +136,30 @@ jobs:
92136
fetch-depth: 0
93137
- uses: actions/setup-node@v4
94138
with:
95-
node-version: 20.x
139+
node-version: 22.x
140+
- uses: astral-sh/setup-uv@v5
141+
with:
142+
enable-cache: false
96143
- name: Set up Python ${{ matrix.python-version }}
97144
uses: actions/setup-python@v5
98145
with:
99146
python-version: ${{ matrix.python-version }}
100-
# Uncomment the action below for an interactive shell
101-
# - name: Setup tmate session
102-
# uses: mxschmitt/action-tmate@v3
103-
- name: Install Python packaging/test tools
104-
run: pip install --upgrade pip tox nox wheel numpy -r python/requirements-test.txt
105147
- uses: ./.github/actions/setup-firefox
106-
- run: nox -s lint format mypy
148+
- name: Setup tmate session
149+
uses: mxschmitt/action-tmate@v3
150+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
151+
- run: uvx nox -s lint format mypy
107152
- name: Check for dirty working directory
108153
run: git diff --exit-code
109-
- name: Test with tox
110-
run: tox -e ${{ fromJSON('["skip-browser-tests","firefox-xvfb"]')[runner.os == 'Linux'] }}
154+
- name: Run python tests (skip browser tests)
155+
run: uvx nox -s test -- --skip-browser-tests
156+
if: ${{ runner.os != 'Linux' }}
157+
- name: Run python tests (include browser tests)
158+
run: uvx nox -s test_xvfb -- --browser firefox
159+
if: ${{ runner.os == 'Linux' }}
111160
# Verify that editable install works
112-
- name: Install in editable form
113-
run: pip install -e . --config-settings editable_mode=strict
114-
- name: Run Python tests against editable install (excluding WebGL)
115-
working-directory: python/tests
116-
run: pytest -vv --skip-browser-tests
161+
- name: Test in editable form
162+
run: uvx nox -s test_editable
117163

118164
python-build-package:
119165
strategy:
@@ -139,36 +185,35 @@ jobs:
139185
fetch-depth: 0
140186
- uses: actions/setup-node@v4
141187
with:
142-
node-version: 20.x
188+
node-version: 22.x
143189
cache: "npm"
190+
- uses: astral-sh/setup-uv@v5
191+
with:
192+
enable-cache: false
144193
- name: Set up Python
145194
uses: actions/setup-python@v5
146195
with:
147196
python-version: 3.x
148-
- name: Get pip cache dir
149-
id: pip-cache
197+
- name: Get uv cache dir
198+
id: uv-cache
150199
run: |
151-
echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT"
152-
- run: npm install
200+
echo "dir=$(uv cache dir)" >> "$GITHUB_OUTPUT"
201+
- run: npm ci
153202
- run: |
154203
build_info="{'tag':'$(git describe --always --tags)', 'url':'https://github.com/google/neuroglancer/commit/$(git rev-parse HEAD)', 'timestamp':'$(date)'}"
155204
npm run build-python -- --no-typecheck --no-lint --define NEUROGLANCER_BUILD_INFO="${build_info}"
156205
shell: bash
157206
- name: Check for dirty working directory
158207
run: git diff --exit-code
159-
- name: Install setuptools
160-
run: pip install setuptools
161208
- name: Build Python source distribution (sdist)
162-
run: python setup.py sdist --format gztar
209+
run: uv build --sdist
163210
if: ${{ runner.os == 'Linux' }}
164-
- name: Install cibuildwheel
165-
run: pip install cibuildwheel
166211
- name: Build Python wheels
167-
run: bash -xve ./python/build_tools/cibuildwheel.sh
212+
run: uvx nox -s cibuildwheel
168213
env:
169-
# On Linux, share pip cache with manylinux docker containers
170-
CIBW_ENVIRONMENT_LINUX: PIP_CACHE_DIR=/host${{ steps.pip-cache.outputs.dir }}
171-
CIBW_BEFORE_ALL_LINUX: /project/python/build_tools/cibuildwheel_linux_cache_setup.sh /host${{ steps.pip-cache.outputs.dir }}
214+
# On Linux, share uv cache with manylinux docker containers
215+
CIBW_ENVIRONMENT_LINUX: UV_CACHE_DIR=/host${{ steps.uv-cache.outputs.dir }}
216+
CIBW_BEFORE_ALL_LINUX: /project/python/build_tools/cibuildwheel_linux_cache_setup.sh /host${{ steps.uv-cache.outputs.dir }}
172217
CIBW_BUILD: ${{ matrix.cibw_build }}
173218
- name: Upload wheels as artifacts
174219
uses: actions/upload-artifact@v4
@@ -182,6 +227,9 @@ jobs:
182227
runs-on: ubuntu-latest
183228
steps:
184229
- uses: actions/checkout@v4
230+
- uses: astral-sh/setup-uv@v5
231+
with:
232+
enable-cache: false
185233
- name: Set up Python
186234
uses: actions/setup-python@v5
187235
with:
@@ -190,10 +238,8 @@ jobs:
190238
uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2
191239
with:
192240
macos-skip-brew-update: "true"
193-
- name: Install nox
194-
run: pip install nox
195241
- name: Build docs
196-
run: nox -s docs
242+
run: uvx nox -s docs
197243
- name: Upload docs as artifact
198244
uses: actions/upload-artifact@v4
199245
with:
@@ -214,7 +260,7 @@ jobs:
214260
- name: Use Node.js
215261
uses: actions/setup-node@v4
216262
with:
217-
node-version: 20.x
263+
node-version: 22.x
218264
registry-url: "https://registry.npmjs.org"
219265
- uses: actions/download-artifact@v4
220266
with:
@@ -296,5 +342,6 @@ jobs:
296342
- run: ./src/mesh/draco/build.sh
297343
- run: ./src/sliceview/compresso/build.sh
298344
- run: ./src/sliceview/png/build.sh
345+
- run: ./src/sliceview/jxl/build.sh
299346
# Check that there are no differences.
300347
- run: git diff --exit-code

.github/workflows/build_docs_preview.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v4
12+
- uses: astral-sh/setup-uv@v5
13+
with:
14+
enable-cache: false
1215
- name: Set up Python ${{ matrix.python-version }}
1316
uses: actions/setup-python@v5
1417
with:
15-
python-version: 3.12
18+
python-version: 3.13
1619
- name: Setup Graphviz
1720
uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2
1821
with:
1922
macos-skip-brew-update: "true"
20-
- name: Install nox
21-
run: pip install nox
2223
- name: Build documentation
23-
run: nox -s docs
24+
run: uvx nox -s docs
2425
- name: Upload client as artifact
2526
uses: actions/upload-artifact@v4
2627
with:

.github/workflows/build_preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
node-version:
11-
- "20.x"
11+
- "22.x"
1212
runs-on: ubuntu-latest
1313

1414
steps:

.github/workflows/deploy_docs_preview.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
statuses: write
1113
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1214
steps:
1315
- name: "Create commit status"

.github/workflows/deploy_preview.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
statuses: write
1113
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1214
steps:
1315
- name: "Create commit status"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ tsconfig.tsbuildinfo
2121
.eslintcache
2222
/lib
2323
/.firebase
24+
/test-results
25+
/playwright-report
26+
-/docs/python/api/index.rst
27+
/docs/python/api/*.rst
28+
/.vite

.ncurc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
reject:
2+
# API break
3+
- "gl-matrix"
4+
- "@types/gl-matrix"
5+
- "codemirror"

0 commit comments

Comments
 (0)