Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix/deno_2_test_and…
Browse files Browse the repository at this point in the history
…_build
  • Loading branch information
effigies committed Oct 31, 2024
2 parents 6fe71cc + fbd9129 commit 6d85c62
Show file tree
Hide file tree
Showing 748 changed files with 18 additions and 61,173 deletions.
84 changes: 0 additions & 84 deletions .circleci/config.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,3 @@ updates:
directory: '/'
schedule:
interval: 'monthly'
# - package-ecosystem: 'npm'
# directory: '/'
# schedule:
# interval: 'weekly'
#
# - package-ecosystem: 'npm'
# directory: '/bids-validator-web'
# schedule:
# interval: 'weekly'
38 changes: 0 additions & 38 deletions .github/workflows/docker-build-push.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/node_tests.yml

This file was deleted.

12 changes: 1 addition & 11 deletions .github/workflows/schema_web_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Use Node 18 for legacy build
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: denoland/setup-deno@v2
- uses: denoland/setup-deno@v1
with:
deno-version: v2.x
- run: deno task build
working-directory: ./web
- name: Install NPM deps
run: npm install
working-directory: ./legacy
- name: Build legacy validator website
run: npm run web-export
working-directory: ./legacy
- name: Move legacy validator build into deno website
run: mv legacy/bids-validator-web/out web/dist/legacy
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/test-bids-examples.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "bids-examples"]
path = legacy/bids-validator/tests/data/bids-examples
url = https://github.com/bids-standard/bids-examples.git
30 changes: 0 additions & 30 deletions Dockerfile

This file was deleted.

5 changes: 3 additions & 2 deletions bids-validator/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"./main": "./src/main.ts",
"./output": "./src/utils/output.ts",
"./files": "./src/files/deno.ts",
"./options": "./src/setup/options.ts"
"./options": "./src/setup/options.ts",
"./issues": "./src/issues/datasetIssues.ts"
},
"publish": {
"exclude": [
Expand Down Expand Up @@ -34,7 +35,7 @@
"@hed/validator": "npm:[email protected]",
"@ignore": "npm:[email protected]",
"@libs/xml": "jsr:@libs/[email protected]",
"@mango/nifti": "npm:[email protected].8",
"@mango/nifti": "npm:@bids/[email protected].9",
"@std/assert": "jsr:@std/[email protected]",
"@std/fmt": "jsr:@std/[email protected]",
"@std/fs": "jsr:@std/[email protected]",
Expand Down
1 change: 1 addition & 0 deletions bids-validator/src/files/deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { type BIDSFile, FileTree } from '../types/filetree.ts'
import { requestReadPermission } from '../setup/requestPermissions.ts'
import { FileIgnoreRules, readBidsIgnore } from './ignore.ts'
import { logger } from '../utils/logger.ts'
export { type BIDSFile, FileTree }

/**
* Thrown when a text file is decoded as UTF-8 but contains UTF-16 characters
Expand Down
13 changes: 1 addition & 12 deletions bids-validator/src/files/nifti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,11 @@ async function extract(buffer: Uint8Array, nbytes: number): Promise<Uint8Array>
return result
}

function readHeaderQuiet(buf: ArrayBuffer) {
const console_error = console.error
const console_log = console.log
console.error = (msg: string) => { logger.info(msg)}
console.log = (msg: string) => { logger.info(msg)}
const header = readHeader(buf)
console.error = console_error
console.log = console_log
return header
}

export async function loadHeader(file: BIDSFile): Promise<NiftiHeader> {
try {
const buf = await file.readBytes(1024)
const data = isCompressed(buf.buffer) ? await extract(buf, 540) : buf
const header = readHeaderQuiet(data.buffer)
const header = readHeader(data.buffer)
if (!header) {
throw { key: 'NIFTI_HEADER_UNREADABLE' }
}
Expand Down
3 changes: 2 additions & 1 deletion bids-validator/src/issues/datasetIssues.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { nonSchemaIssues } from './list.ts'
import type { Issue, Severity } from '../types/issues.ts'
import type { Issue, Severity, IssueDefinition, IssueFile } from '../types/issues.ts'
export type { Issue, Severity, IssueDefinition, IssueFile }

// Code is deprecated, return something unusual but JSON serializable
const CODE_DEPRECATED = Number.MIN_SAFE_INTEGER
Expand Down
Loading

0 comments on commit 6d85c62

Please sign in to comment.