Skip to content

Commit

Permalink
Merge branch 'master' into feat/auto-multichannel
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Feb 7, 2025
2 parents aba6a81 + af326c7 commit 1de258f
Show file tree
Hide file tree
Showing 596 changed files with 42,983 additions and 2,078 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ jobs:
cache: "npm"
cache-dependency-path: |
package-lock.json
examples/**/package-lock.json
# uv required for javascript tests
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
# go needed for fake_gcs_server used by the javascript tests
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "stable"
- run: npm install
- run: npm ci
- run: npm run format:fix
- name: Check for dirty working directory
run: git diff --exit-code
Expand Down Expand Up @@ -79,6 +82,36 @@ jobs:
name: client
path: dist/client
if: ${{ runner.os == 'Linux' }}
example-project-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "pnpm"
cache-dependency-path: |
examples/**/pnpm-lock.yaml
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "npm"
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run example-project-test -- --reporter=html
- name: Upload report and built clients
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: example-project-test-results
path: |
playwright-report/
examples/*/*/dist/
# Builds Python package and runs Python tests
#
Expand Down Expand Up @@ -160,7 +193,7 @@ jobs:
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT"
- run: npm install
- run: npm ci
- run: |
build_info="{'tag':'$(git describe --always --tags)', 'url':'https://github.com/google/neuroglancer/commit/$(git rev-parse HEAD)', 'timestamp':'$(date)'}"
npm run build-python -- --no-typecheck --no-lint --define NEUROGLANCER_BUILD_INFO="${build_info}"
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ tsconfig.tsbuildinfo
.eslintcache
/lib
/.firebase
/test-results
/playwright-report
-/docs/python/api/index.rst
/docs/python/api/*.rst
1 change: 1 addition & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"**/build",
"**/.tox",
"**/.nox",
"**/.venv",
"lib",
"**/python",
"**/config",
Expand Down
5 changes: 3 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/templates/
/python/
/third_party/jpgjs/jpg.js
/testdata/**/*.json
/testdata/
zarr.json
.parcel-cache
dist
/lib
/docs/_build/
/.ruff_cache
package.json
package-lock.json
.venv
pnpm-lock.yaml
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

Neuroglancer is a WebGL-based viewer for volumetric data. It is capable of displaying arbitrary (non axis-aligned) cross-sectional views of volumetric data, as well as 3-D meshes and line-segment based models (skeletons).

Refer to the documentation website at https://neuroglancer-docs.web.app for more details.

This is not an official Google product.

# Examples
Expand Down Expand Up @@ -157,6 +159,7 @@ There is a Google Group/mailing list for discussion related to Neuroglancer:

# Related Projects

- [Panel-Neuroglancer](https://github.com/panel-extensions/panel-neuroglancer) - Integrate Neuroglancer into Jupyter notebook workflows and Python web apps with this HoloViz Panel extension.
- [TensorStore](https://github.com/google/tensorstore) - C++ and Python library for efficiently
reading and writing multi-dimensional arrays in formats supported by Neuroglancer.
- [4Quant/neuroglancer-docker](https://github.com/4Quant/neuroglancer-docker) - Example setup for
Expand Down
6 changes: 3 additions & 3 deletions build_tools/after-version-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ await execFileAsync("npm", ["run", "build-package"], {
cwd: rootDir,
});

// Update package-lock.json files in examples.
// Update lockfiles in examples.
await Promise.all(
(await glob("examples/*/*/package.json", { absolute: true, cwd: rootDir }))
.map((examplePackageJsonPath) => path.dirname(examplePackageJsonPath))
.map(async (exampleDir: string) => {
await execFileAsync("npm", ["install", "--no-audit", "--no-fund"], {
await execFileAsync("pnpm", ["install"], {
cwd: exampleDir,
});
}),
Expand All @@ -35,7 +35,7 @@ await execFileAsync(
"git",
[
"add",
...(await glob("examples/*/*/package-lock.json", {
...(await glob("examples/*/*/pnpm-lock.yaml", {
absolute: false,
cwd: rootDir,
})),
Expand Down
2 changes: 1 addition & 1 deletion build_tools/build-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function buildDeclarationFiles(
program.emit();
}

async function buildPackage(options: {
export async function buildPackage(options: {
inplace?: boolean;
skipDeclarations?: boolean;
}) {
Expand Down
2 changes: 1 addition & 1 deletion build_tools/update-example-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ await Promise.all(
await execFileAsync("npx", ["npm-check-updates", "-u"], {
cwd: exampleDir,
});
await execFileAsync("npm", ["install", "--no-audit", "--no-fund"], {
await execFileAsync("pnpm", ["install"], {
cwd: exampleDir,
});
}),
Expand Down
32 changes: 32 additions & 0 deletions build_tools/vitest/python_tools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @license
* Copyright 2025 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { spawnSync } from "node:child_process";
import path from "node:path";

export const PYTHON_TEST_TOOLS_PATH = path.join(
import.meta.dirname,
"python_tools",
);

export async function syncPythonTools() {
// Note: For unknown reasons, using `await promisify(spawn)` in place of
// `spawnSync` causes the vitest process to exit as soon as the child
// process completes.
spawnSync("uv", ["sync", "--project", PYTHON_TEST_TOOLS_PATH], {
stdio: ["ignore", "inherit", "inherit"],
});
}
8 changes: 8 additions & 0 deletions build_tools/vitest/python_tools/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[project]
name = "python-tools"
description = "Python tools used by the test suite"
version = "0.0"
requires-python = ">=3.11"
dependencies = [
"moto[s3,server]>=5.0.28",
]
Loading

0 comments on commit 1de258f

Please sign in to comment.