Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 46 additions & 0 deletions .github/workflows/dicom-corpus-extended.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# The slow DICOM corpus tier. Manual only: its failures list known loader gaps.
name: Extended DICOM corpus
on:
workflow_dispatch:

jobs:
corpus:
name: Extended DICOM corpus
runs-on: ubuntu-latest
env:
DICOM_CORPUS: extended
VITE_SHOW_SAMPLE_DATA: true
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Cache test datasets
uses: actions/cache@v4
with:
path: .tmp/datasets
key: dicom-corpus-extended-${{ hashFiles('tests/datasets.ts', 'tests/dicomVolumeCorpus.json', 'tests/dicomCompositionCorpus.json', 'tests/dicomExtendedCorpus.json') }}
restore-keys: dicom-corpus-extended-
- name: Locate Playwright browsers
id: playwright
run: |
echo "PLAYWRIGHT_BROWSERS_PATH=$RUNNER_TEMP/ms-playwright" >> "$GITHUB_ENV"
echo "version=$(node -p "require('@playwright/test/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: browser-cache
uses: actions/cache@v4
with:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}
- name: Install Chromium
if: steps.browser-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Install Chromium system dependencies
if: steps.browser-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Run the corpus spec
run: env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY npm run test:e2e:chrome -- tests/specs/dicom-volume-corpus.e2e.ts
2 changes: 1 addition & 1 deletion .github/workflows/e2e-datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v4
with:
path: .tmp/datasets
key: e2e-datasets-${{ hashFiles('tests/datasets.ts') }}
key: e2e-datasets-${{ hashFiles('tests/datasets.ts', 'tests/dicomVolumeCorpus.json', 'tests/dicomCompositionCorpus.json') }}
restore-keys: e2e-datasets-
- name: Download missing datasets
run: node tests/downloadDatasets.ts
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/cache@v4
with:
path: .tmp/datasets
key: e2e-datasets-${{ hashFiles('tests/datasets.ts') }}
key: e2e-datasets-${{ hashFiles('tests/datasets.ts', 'tests/dicomVolumeCorpus.json', 'tests/dicomCompositionCorpus.json') }}
restore-keys: e2e-datasets-
# One browser path on every OS, so one cache step covers both.
- name: Locate Playwright browsers
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ yarn-error.log*

__pycache__
venv
.venv

bundle-analysis.html

Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dist
node_modules
public
src/io/itk-dicom
src/io/resample
*.json
45 changes: 42 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ const featureBoundaries = (features) => {
export default tseslint.config(
{
ignores: [
'src/io/itk-dicom/emscripten-build/**',
'src/io/resample/emscripten-build/**',
'**/*.d.ts',
'dist/**',
Expand Down Expand Up @@ -281,7 +280,7 @@ export default tseslint.config(
},
},
{
files: ['src/vtk/**/*.{js,ts}'],
files: ['src/vtk/**/*.{js,ts}', 'src/dicom/vtk/**/*.{js,ts}'],
rules: {
'no-param-reassign': [
'error',
Expand Down Expand Up @@ -374,7 +373,7 @@ export default tseslint.config(
{
files: ['src/**/*.{js,ts,vue}'],
ignores: [
'src/**/__tests__/**',
'**/__tests__/**',
'src/**/*.{spec,test}.{js,ts}',
'src/**/*.d.ts',
'**/emscripten-build/**',
Expand All @@ -389,5 +388,45 @@ export default tseslint.config(
],
},
},
// ESLint matches specifiers, not resolved paths. Core and vtk files sit at
// most one directory deep, so climbing two levels always leaves them.
{
files: ['src/dicom/core/**/*.{js,ts}'],
ignores: ['**/__tests__/**'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
regex:
'^(@/|@src/|vue(?:/|$)|pinia(?:/|$)|@vueuse/|@kitware/vtk\\.js(?:/|$)|itk-wasm(?:/|$)|@itk-wasm/|(\\.\\./){2}|\\.\\./vtk(?:/|$))',
message:
'DICOM core cannot depend on application code, UI frameworks, vtk.js, itk-wasm or the DICOM vtk directory.',
},
],
},
],
},
},
{
files: ['src/dicom/vtk/**/*.{js,ts}'],
ignores: ['**/__tests__/**'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
regex:
'^(@/|@src/|vue(?:/|$)|pinia(?:/|$)|@vueuse/|itk-wasm(?:/|$)|@itk-wasm/|(\\.\\./){2})',
message:
'DICOM vtk cannot depend on application code, application state, UI frameworks or itk-wasm.',
},
],
},
],
},
},
eslintConfigPrettier
);
Loading
Loading