Skip to content

Commit 9734fba

Browse files
committed
Merge remote-tracking branch 'upstream/main' into dev
2 parents 7cba507 + ed14a14 commit 9734fba

27 files changed

+546
-119
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Tue Mar 25 15:43:26 2025 -0400 - [email protected] - chore(fmt): deno fmt [ignore-rev]
2+
51510f5ecd91027f6ab4bfd1d0d287aaf6300e8d
13
# Wed Aug 28 11:37:33 2024 -0400 - [email protected] - chore(fmt): deno fmt [ignore-rev]
24
ff6015b9b2d9b1f215905d71e7dc7a14b8f29f56
35
# Fri Aug 16 17:23:33 2024 -0400 - [email protected] - chore(fmt): deno fmt [ignore-rev]

.github/scripts/scriv_check.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
# Modified from https://github.com/tarides/changelog-check-action/tree/main
3+
4+
set -uo pipefail
5+
6+
if [ "${NO_CHANGELOG_LABEL}" = "true" ]; then
7+
# 'no changelog' set, so finish successfully
8+
exit 0
9+
else
10+
# a changelog check is required
11+
# fail if the diff is empty
12+
if git diff --exit-code "origin/${BASE_REF}" -- "changelog.d/"; then
13+
cat <<END >&2
14+
User-visible changes should come with an entry in the changelog.
15+
Create a changelog blurb with "uvx scriv create --edit".
16+
If no changelog entry is needed, then set the "no changelog" label.
17+
END
18+
exit 1
19+
fi
20+
fi

.github/workflows/deno_tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,16 @@ jobs:
7272
run: echo 'PERMS=--allow-read --allow-write --allow-env --allow-run --deny-net' >> $GITHUB_ENV
7373
if: ${{ ! matrix.allow-net }}
7474
- name: Disable example that requires network access
75-
run: touch tests/data/bids-examples/xeeg_hed_score/.SKIP_VALIDATION
75+
run: |
76+
for DS in eeg_ds003645s_hed_library xeeg_hed_score; do
77+
touch tests/data/bids-examples/${DS}/.SKIP_VALIDATION
78+
done
7679
if: ${{ ! matrix.allow-net }}
7780
- name: Disable unreleased examples
78-
run: touch tests/data/bids-examples/dwi_deriv/.SKIP_VALIDATION
81+
run: |
82+
for DS in dwi_deriv pheno004; do
83+
touch tests/data/bids-examples/${DS}/.SKIP_VALIDATION
84+
done
7985
if: github.ref_name != 'dev' && github.base_ref != 'dev'
8086
- run: deno test --node-modules-dir=auto $PERMS --coverage=cov/ src/
8187
- name: Collect coverage

.github/workflows/validation.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,15 @@ jobs:
2222
python-version: 3
2323
- name: Validate CITATION.cff
2424
run: pipx run cffconvert --validate
25+
check_change_log:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
- name: Check for changes in changelog
32+
env:
33+
BASE_REF: ${{ github.event.pull_request.base.ref }}
34+
NO_CHANGELOG_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'no changelog') }}
35+
run: .github/scripts/scriv_check.sh
36+
shell: bash

.github/workflows/wheels.yml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
name: Build wheels
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
tags: ['*']
7+
pull_request:
8+
branches: [main, dev]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
env:
16+
MACOSX_DEPLOYMENT_TARGET: '10.12'
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
jobs:
23+
build_sdist:
24+
name: Build & verify package
25+
runs-on: ubuntu-latest
26+
permissions:
27+
attestations: write
28+
id-token: write
29+
steps:
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
- uses: hynek/build-and-inspect-python-package@v2
34+
with:
35+
attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}
36+
skip-wheel: true
37+
38+
build_wheels:
39+
name: Build wheels on ${{ matrix.os }}
40+
runs-on: ${{ matrix.os }}
41+
needs: [build_sdist]
42+
strategy:
43+
matrix:
44+
os:
45+
- ubuntu-latest
46+
- ubuntu-24.04-arm
47+
- windows-latest
48+
- macos-13
49+
- macos-latest
50+
fail-fast: false
51+
permissions:
52+
attestations: write
53+
id-token: write
54+
55+
steps:
56+
- name: Download sdist
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: Packages
60+
path: dist
61+
62+
- name: Unpack sdist
63+
run: |
64+
tar --strip-components=1 -xzvf dist/*.tar.gz
65+
rm -r dist
66+
67+
- name: Build wheels from sdist
68+
uses: pypa/[email protected]
69+
70+
- name: Generate artifact attestation for wheels
71+
if: ${{ github.event_name != 'pull_request' }}
72+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
73+
with:
74+
subject-path: "wheelhouse/bids_validator_deno-*.whl"
75+
76+
- uses: actions/upload-artifact@v4
77+
with:
78+
name: wheel-${{ matrix.os }}
79+
path: ./wheelhouse
80+
81+
test-publish:
82+
name: Push package to test.pypi.org
83+
if: github.event_name == 'push'
84+
runs-on: ubuntu-latest
85+
needs: [build_wheels]
86+
permissions:
87+
id-token: write
88+
89+
steps:
90+
- name: Download sdist
91+
uses: actions/download-artifact@v4
92+
with:
93+
name: Packages
94+
path: dist
95+
96+
- name: Download wheels
97+
uses: actions/download-artifact@v4
98+
with:
99+
pattern: wheel-*
100+
path: dist
101+
102+
- run: |
103+
mv dist/*/* dist/
104+
rmdir dist/*/
105+
106+
- name: Upload package to PyPI
107+
uses: pypa/gh-action-pypi-publish@release/v1
108+
with:
109+
repository-url: https://test.pypi.org/legacy/
110+
skip-existing: true
111+
112+
publish:
113+
name: Publish released package to pypi.org
114+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
115+
runs-on: ubuntu-latest
116+
needs: [build_wheels]
117+
permissions:
118+
id-token: write
119+
120+
steps:
121+
- name: Download sdist
122+
uses: actions/download-artifact@v4
123+
with:
124+
name: Packages
125+
path: dist
126+
127+
- name: Download wheels
128+
uses: actions/download-artifact@v4
129+
with:
130+
pattern: wheel-*
131+
path: dist
132+
133+
- run: |
134+
mv dist/*/* dist/
135+
rmdir dist/*/
136+
137+
- name: Upload package to PyPI
138+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
<a id='changelog-2.0.4'></a>
2+
# 2.0.5 — 2025-03-31
3+
4+
A hot-fix release that adds missing entries to the 2.0.4 changelog and fixes publication to PyPI.
5+
6+
<a id='changelog-2.0.4'></a>
7+
# 2.0.4 — 2025-03-31
8+
9+
## Added
10+
11+
- Validate directory names names according to `schema.rules.directories` entries.
12+
Use rules to identify "opaque" directories whose contents are unspecified by BIDS.
13+
([#180])
14+
15+
[#180]: https://github.com/bids-standard/bids-validator/pull/180
16+
17+
- Report field descriptions for missing or invalid metadata. ([#177])
18+
19+
[#177]: https://github.com/bids-standard/bids-validator/pull/177
20+
21+
- Publish validator to PyPI as `bids-validator-deno`. ([#186])
22+
23+
[#186]: https://github.com/bids-standard/bids-validator/pull/186
24+
25+
## Changed
26+
27+
- Update to HED Validator 4.0.0. ([#173])
28+
29+
[#173]: https://github.com/bids-standard/bids-validator/pull/173
130

231
<a id='changelog-2.0.3'></a>
332
# 2.0.3 — 2025-02-24

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@ deno run -ERWN jsr:@bids/validator
3131
```
3232

3333
Deno by default sandboxes applications like a web browser.
34-
`-E`, `-R`, '-W', and `-N` allow the validator to read environment variables,
34+
`-E`, `-R`, `-W`, and `-N` allow the validator to read environment variables,
3535
read/write local files, and read network locations.
3636

37+
A pre-compiled binary is published to [PyPI][] and may be installed with:
38+
39+
```
40+
pip install bids-validator-deno
41+
bids-validator-deno --help
42+
```
43+
3744
### Configuration file
3845

3946
The schema validator accepts a JSON configuration file that reclassifies issues as
@@ -91,3 +98,4 @@ The BIDS validator documentation is available on [Read the Docs](https://bids-va
9198
[BIDS Validator]: https://bids-standard.github.io/bids-validator/
9299
[Deno]: https://deno.com/
93100
[Deno - Installation]: https://docs.deno.com/runtime/getting_started/installation/
101+
[PyPI]: https://pypi.org/project/bids-validator-deno/

changelog.d/scriv.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[scriv]
22
format = md
33
main_branches = master, main, dev
4-
version = literal: deno.json: version
4+
version = command: jq .version deno.json
55
categories = Added, Changed, Fixed, Deprecated, Removed, Security, Infrastructure

deno.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
"@bids/schema": "jsr:@bids/[email protected]+1a202531",
3232
"@cliffy/command": "jsr:@effigies/[email protected]",
3333
"@cliffy/table": "jsr:@effigies/[email protected]",
34-
"@hed/validator": "npm:hed-validator@3.15.5",
34+
"@hed/validator": "npm:hed-validator@4.0.1",
3535
"@ignore": "npm:[email protected]",
3636
"@libs/xml": "jsr:@libs/[email protected]",
3737
"@mango/nifti": "npm:@bids/[email protected]",
38-
"@std/assert": "jsr:@std/[email protected].7",
39-
"@std/fmt": "jsr:@std/[email protected].5",
40-
"@std/fs": "jsr:@std/[email protected].13",
38+
"@std/assert": "jsr:@std/[email protected].12",
39+
"@std/fmt": "jsr:@std/[email protected].6",
40+
"@std/fs": "jsr:@std/[email protected].15",
4141
"@std/io": "jsr:@std/[email protected]",
4242
"@std/log": "jsr:@std/[email protected]",
4343
"@std/path": "jsr:@std/[email protected]",

0 commit comments

Comments
 (0)