Skip to content

Commit

Permalink
Merge branch 'google:master' into wms_faster_jxl
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith authored Feb 18, 2025
2 parents 1247ddf + a12de1c commit 1684a03
Show file tree
Hide file tree
Showing 1,372 changed files with 109,778 additions and 32,865 deletions.
16 changes: 0 additions & 16 deletions .eslintignore

This file was deleted.

68 changes: 0 additions & 68 deletions .eslintrc.yml

This file was deleted.

68 changes: 56 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
tags:
- v**
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false

jobs:
client:
Expand All @@ -24,12 +31,20 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: "npm"
cache-dependency-path: |
package-lock.json
examples/**/package-lock.json
- run: npm install
# 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 ci
- run: npm run format:fix
- name: Check for dirty working directory
run: git diff --exit-code
Expand All @@ -47,7 +62,6 @@ jobs:
- run: npm run build-package
- run: npm publish --dry-run
working-directory: dist/package
- uses: ./.github/actions/setup-firefox
- name: Run JavaScript tests (including WebGL)
run: npm test
if: ${{ runner.os != 'macOS' }}
Expand All @@ -68,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 All @@ -92,17 +136,17 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Uncomment the action below for an interactive shell
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- uses: ./.github/actions/setup-firefox
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install Python packaging/test tools
run: pip install tox nox wheel numpy -r python/requirements-test.txt
- uses: ./.github/actions/setup-firefox
- run: nox -s lint format mypy
- name: Check for dirty working directory
run: git diff --exit-code
Expand Down Expand Up @@ -139,7 +183,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
cache: "npm"
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -149,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 Expand Up @@ -214,7 +258,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
registry-url: "https://registry.npmjs.org"
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
node-version:
- "20.x"
- "22.x"
runs-on: ubuntu-latest

steps:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ tsconfig.tsbuildinfo
.eslintcache
/lib
/.firebase
/test-results
/playwright-report
-/docs/python/api/index.rst
/docs/python/api/*.rst
/.vite
5 changes: 5 additions & 0 deletions .ncurc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reject:
# API break
- "gl-matrix"
- "@types/gl-matrix"
- "codemirror"
61 changes: 61 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "typescript", "oxc", "unicorn", "promise", "vitest"],
"env": {
"browser": true
},
"settings": {},
"rules": {
// Seems to be buggy
"no-loss-of-precision": "off",
"import/no-cycle": "error",
"import/first": "error",
"no-unsafe-finally": "off",
"require-yield": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"erasing-op": "off",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"no-new-array": "off",
"no-document-cookie": "off",
"@typescript-eslint/consistent-type-imports": "error"
},
"overrides": [
{
"files": ["*.test.ts", "*.spec.ts"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
],
"ignorePatterns": [
"**/node_modules",
"**/dist",
"**/python",
"templates/neuroglancer/sliceview",
"src/third_party/jpgjs/jpg.js",
"**/templates",
"**/build",
"**/.tox",
"**/.nox",
"**/.venv",
"lib",
"**/python",
"**/config",
"**/typings",
"src/mesh/draco/stub.js",
"**/tsconfig.tsbuildinfo",
"examples"
]
}
8 changes: 6 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +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
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ prune examples
exclude .clang-format
exclude .editorconfig
exclude .eslintignore
exclude .eslintrc
exclude .style.yapf
exclude cors_webserver.py
exclude gulpfile.js
Expand All @@ -36,8 +35,9 @@ exclude MANIFEST.in
exclude *.ts
exclude .prettierrc.yml
exclude .prettierignore
exclude .eslintrc.yml
exclude eslint.config.js
exclude .ncurc.yml
exclude index.html
exclude webpack.config.js
exclude rspack.config.js
exclude firebase.json
exclude .firebaserc
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
19 changes: 14 additions & 5 deletions build_tools/after-version-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,25 @@ 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"], {
cwd: exampleDir,
});
await execFileAsync("git", ["add", "package-lock.json"], {
await execFileAsync("pnpm", ["install"], {
cwd: exampleDir,
});
}),
);

await execFileAsync(
"git",
[
"add",
...(await glob("examples/*/*/pnpm-lock.yaml", {
absolute: false,
cwd: rootDir,
})),
],
{ cwd: rootDir },
);
Loading

0 comments on commit 1684a03

Please sign in to comment.