Skip to content

Commit f56f828

Browse files
committed
2 parents 7f7a6b2 + 880ab2d commit f56f828

File tree

169 files changed

+6035
-2412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+6035
-2412
lines changed

.circleci/config.yml

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@ version: 2.1
22
jobs:
33
build_docs:
44
docker:
5-
- image: cimg/python:3.12-node
5+
- image: cimg/python:3.12
66
steps:
77
# checkout code to default ~/project
88
- checkout
9-
- run:
10-
name: install dependencies
11-
command: |
12-
python -m venv env
13-
source env/bin/activate
14-
python -m pip install --upgrade pip
15-
pip install -r requirements.txt
169
- run:
1710
name: generate docs
1811
command: |
19-
source env/bin/activate
20-
mkdocs build --clean --strict --verbose
12+
uv run mkdocs build --clean --strict --verbose
2113
- persist_to_workspace:
2214
# the mkdocs build outputs are in ~/project/site
2315
root: ~/project
@@ -31,35 +23,28 @@ jobs:
3123
docker:
3224
- image: cimg/python:3.12
3325
steps:
34-
# checkout code to default ~/project
3526
- checkout
3627
- attach_workspace:
37-
# mkdocs build outputs will be in ~/project/site
3828
at: ~/project
39-
- run:
40-
name: install linkchecker
41-
command: |
42-
python -m venv env
43-
source env/bin/activate
44-
python -m pip install --upgrade pip
45-
python -m pip install linkchecker
4629
- run:
4730
name: check links
4831
command: |
49-
source env/bin/activate
5032
git status
5133
if (! git log -1 --pretty=oneline | grep REL:) ; then
5234
chmod a+rX -R ~
53-
linkchecker -t 1 ~/project/site/
35+
uvx linkchecker -t 1 ~/project/site/
5436
# check external separately by pointing to all *html so no
5537
# failures for local file:/// -- yoh found no better way,
5638
linkchecker -t 1 --check-extern \
5739
--ignore-url 'file:///.*' \
40+
--ignore-url 'https://bids-specification.readthedocs.io/en/stable/.*' \
41+
--ignore-url 'https://doi.org/.*' \
5842
--ignore-url 'https://fonts.gstatic.com' \
59-
--ignore-url 'https://github.com/bids-standard/bids-specification/(pull|tree)/.*' \
6043
--ignore-url 'https://github.com/[^/]*' \
61-
--ignore-url 'https://doi.org/.*' \
62-
--ignore-url 'https://bids-specification.readthedocs.io/en/stable/.*' \
44+
--ignore-url 'https://github.com/bids-standard/bids-specification/(pull|tree)/.*' \
45+
--ignore-url 'https://www.incf.org' \
46+
--ignore-url 'https://dicomlookup.com/dicomtags/.*' \
47+
--ignore-url 'https://www.instagram.com/bidsstandard/' \
6348
~/project/site/*html ~/project/site/*/*.html
6449
else
6550
echo "Release PR - do nothing"
@@ -72,20 +57,17 @@ jobs:
7257
# checkout code to default ~/project
7358
- checkout
7459
- run:
75-
name: install dependencies
60+
name: install uv
7661
command: |
77-
apt-get update && apt install -y python3-pip python3-venv pandoc
78-
python3 -m venv .venv
79-
source .venv/bin/activate
80-
python3 -m pip install --upgrade pip
81-
python3 -m pip install -r ~/project/requirements.txt
82-
python3 -m pip install ~/project/tools/schemacode/[render]
62+
curl -LsSf https://astral.sh/uv/install.sh | XDG_BIN_HOME=/usr/local/bin sh
8363
- run:
84-
name: install font that works with unicode emojis
85-
command: apt-get update && apt-get install -y fonts-symbola
64+
name: install dependencies
65+
command: |
66+
apt-get update && apt install -y fonts-symbola pandoc
8667
- run:
8768
name: generate pdf version docs
8869
command: |
70+
uv sync
8971
source .venv/bin/activate
9072
cd ~/project/pdf_build_src
9173
bash build_pdf.sh

.codespellrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[codespell]
2-
skip = *.js,*.svg,*.eps,.git,node_modules,env,venv,.mypy_cache,package-lock.json,CITATION.cff,tools/new_contributors.tsv,./tools/schemacode/docs/build
3-
ignore-words-list = fo,te,als,Acknowledgements,acknowledgements,weill,bu,winn,manuel
2+
skip = *.js,*.svg,*.eps,.git,node_modules,env,venv,.mypy_cache,package-lock.json,CITATION.cff,tools/new_contributors.tsv,./tools/schemacode/docs/build,venvs
3+
ignore-regex = \bHEP\b
4+
ignore-words-list = acknowledgements,als,bu,fo,te,weill,winn
45
builtin = clear,rare,en-GB_to_en-US
56
# this overloads default dictionaries and I have not yet figured out
67
# how to have multiple https://github.com/codespell-project/codespell/issues/2727

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body:
1717
If not, please open an issue in the [bids-2-devel repository](https://github.com/bids-standard/bids-2-devel) instead.
1818
1919
- Is there already a group working on your idea?
20-
Check the [BIDS extension proposals](https://bids.neuroimaging.io/get_involved.html#extending-the-bids-specification)
20+
Check the [BIDS extension proposals](https://bids.neuroimaging.io/extensions/index.html)
2121
2222
- Will your idea potentially require a large effort?
2323
Read [BEP lead guidelines](https://docs.google.com/document/d/1pWmEEY-1-WuwBPNy5tDAxVJYQ9Een4hZJM06tQZg8X4/).

.github/dependabot.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# Documentation
22
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
33
version: 2
4+
enable-beta-ecosystems: true
45
updates:
56
- package-ecosystem: "github-actions"
67
directory: "/"
78
schedule:
8-
interval: "weekly"
9+
interval: "monthly"
10+
labels:
11+
- "exclude-from-changelog"
12+
groups:
13+
actions-infrastructure:
14+
patterns:
15+
- "actions/*"
16+
- package-ecosystem: "uv"
17+
directory: "/"
18+
schedule:
19+
interval: "monthly"
920
labels:
1021
- "exclude-from-changelog"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ See the [CONTRIBUTING](https://github.com/bids-standard/bids-specification/blob/
77

88
- Please ensure your name is credited
99
on our [Contributors appendix](https://github.com/bids-standard/bids-specification/blob/master/src/appendices/contributors.md).
10-
To add your name, please edit our [Contributors wiki](https://github.com/bids-standard/bids-specification/wiki/Contributors)
10+
To add your name, please edit our [Recent Contributors wiki](https://github.com/bids-standard/bids-specification/wiki/Recent-Contributors)
1111
and add your name with the type of contribution.
1212
For assistance, please tag @bids-standard/maintainers.
1313

.github/workflows/publish_schema.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- "master"
7+
- "maint/*"
78

89
concurrency:
910
group: ${{ github.workflow }}-${{ github.ref }}
@@ -34,13 +35,27 @@ jobs:
3435
- uses: actions/setup-python@v5
3536
with:
3637
python-version: 3
38+
- run: env
39+
- run: git status
40+
- name: Determine master/maintenance branch
41+
id: branch
42+
run: |
43+
if [[ "$GITHUB_REF_NAME" = "master" ]]; then
44+
echo "branch=jsr-dist" | tee -a $GITHUB_OUTPUT
45+
echo "mode=dev" | tee -a $GITHUB_OUTPUT
46+
else
47+
echo "branch=jsr-maint" | tee -a $GITHUB_OUTPUT
48+
echo "mode=maint" | tee -a $GITHUB_OUTPUT
49+
fi
3750
- name: Install bidsschematools
3851
run: |
3952
pip install --upgrade tools/schemacode
4053
git clean -fxd tools/schemacode
41-
- name: Checkout jsr-dist
54+
- name: Checkout ${{ steps.branch.outputs.branch }}
4255
run: |
43-
git checkout -t origin/jsr-dist
56+
git checkout -t origin/$JSR_BRANCH
57+
env:
58+
JSR_BRANCH: ${{ steps.branch.outputs.branch }}
4459
- name: Regenerate schema
4560
run: bst export > schema.json
4661
- name: Regenerate context types
@@ -54,36 +69,46 @@ jobs:
5469
bst export-metaschema > /tmp/schema.json
5570
npx --package=json-schema-to-typescript json2ts --unknownAny /tmp/schema.json > metaschema.ts
5671
- name: Determine next version
72+
id: version
5773
run: |
5874
BASE=$( jq -r .schema_version schema.json )
59-
if [[ "$BASE" =~ ^[0-9]*.[0-9]*.[0-9]*$ ]]; then
75+
if [[ "$BASE" =~ ^[0-9]*\.[0-9]*\.[0-9]*$ ]]; then
6076
# Release, so unconditionally update version
6177
VERSION=$BASE
6278
jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json
63-
else
79+
echo release=true | tee -a $GITHUB_OUTPUT
80+
elif [[ "$BASE" =~ ^[0-9]*\.[0-9]*\.[0-9]*\.post[0-9]*$ ]]; then
81+
# Post-release, so replace .post with + for JSR semver
82+
VERSION=${BASE/.post/+}
83+
jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json
84+
echo release=true | tee -a $GITHUB_OUTPUT
85+
elif [[ "$GITHUB_REF_NAME" = "master" ]]; then
6486
DENOVER=$( jq -r .version jsr.json )
6587
# Get the reference of the latest commit to touch the schema directory
66-
HASH=$( git log -n 1 --pretty=%h $REF -- src/schema )
88+
HASH=$( git log -n 1 --pretty=%h $GITHUB_REF -- src/schema )
6789
if [[ $DENOVER =~ ^"$BASE".[0-9] ]]; then
6890
PREFIX=${DENOVER%+*}
6991
let SERIAL=1+${PREFIX#$BASE.}
7092
else
7193
SERIAL=1
7294
fi
7395
VERSION="$BASE.$SERIAL+$HASH"
96+
echo release=true | tee -a $GITHUB_OUTPUT
97+
else
98+
echo release=false | tee -a $GITHUB_OUTPUT
7499
fi
75100
echo VERSION=$VERSION | tee -a $GITHUB_ENV
76-
env:
77-
REF: ${{ github.ref }}
78-
- name: Check for changes, set version and commit
101+
echo version=$VERSION | tee -a $GITHUB_OUTPUT
102+
- name: Bump version (${{ steps.version.outputs.version }}) if changed
103+
if: steps.version.outputs.release == 'true'
79104
run: |
80105
if ! git diff -s --exit-code; then
81106
jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json
82107
git add jsr.json schema.json context.ts metaschema.ts
83-
git commit -m "Update schema JSR distribution"
108+
git commit -m "Update schema JSR distribution ($VERSION)"
84109
git push
85110
fi
86111
- name: Publish to JSR
87-
if: success()
112+
if: success() && steps.version.outputs.release == 'true'
88113
run: |
89114
npx jsr publish

0 commit comments

Comments
 (0)