Skip to content

Commit

Permalink
Merge commit 'v1.10.0-35-g5f7004819' (master) into enh-project-datase…
Browse files Browse the repository at this point in the history
…ttype

* commit 'v1.10.0-35-g5f7004819': (218 commits)
  Include entity-less "scans.json" into an example of inheritance principle (bids-standard#1945)
  fix(checks): Enforce timing mutual exclusions on BOLD/ASL data only (bids-standard#1969)
  refactor contributing (bids-standard#1965)
  [pre-commit.ci] pre-commit autoupdate (bids-standard#1967)
  [SCHEMA] Allow physio files for anat datatype (bids-standard#1961)
  [pre-commit.ci] pre-commit autoupdate
  Add an empty line in hope to get table rendered properly in "Ordering rules" section (bids-standard#1953)
  schema: add check for duplicate READMEs (bids-standard#1952)
  [MAINT] switch bidsschematools to pyproject.toml (bids-standard#1948)
  fix(schema): Disable TaskName check for channels and markers files
  Permit and warn on task/acquisition/run for electrodes and coordsystems
  [FIX] Allow (but discourage) task entity for coordsystem.json
  fix(schema): Limit MRI metadata checks to NIfTIs
  fix: Only check for sorted times in arrays
  py3.13 (bids-standard#1947)
  [pre-commit.ci] pre-commit autoupdate (bids-standard#1946)
  [FIX] Update changelog links to avoid redirects (bids-standard#1944)
  [ENH] Update DWI suffixes to include most common scanner derivatives (bids-standard#1864)
  [pre-commit.ci] pre-commit autoupdate
  [MAINT] Update Release_Protocol.md
  ...
  • Loading branch information
yarikoptic committed Oct 28, 2024
2 parents 2d9bfdf + 5f70048 commit d0d5c37
Show file tree
Hide file tree
Showing 113 changed files with 3,977 additions and 2,064 deletions.
43 changes: 39 additions & 4 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@
"name": "Anthony Galassi",
"profile": "https://github.com/bendhouseart"
},
{
"contributions": [
"doc"
],
"login": "arianna_sala",
"name": "Arianna Sala",
"profile": "https://www.coma.uliege.be/people/arianna-sala/"
},
{
"avatar_url": [
"https://avatars.githubusercontent.com/u/118582?v=4"
Expand Down Expand Up @@ -383,10 +391,13 @@
},
{
"contributions": [
"doc"
"doc",
"code",
"test"
],
"login": "benjamin_dichter",
"name": "Benjamin Dichter"
"name": "Benjamin Dichter",
"profile": "https://bendichter.com/"
},
{
"contributions": [
Expand Down Expand Up @@ -1999,11 +2010,14 @@
{
"avatar_url": "https://avatars.githubusercontent.com/u/6051303?v=4",
"contributions": [
"doc"
"doc",
"code",
"data",
"review"
],
"login": "markmikkelsen",
"name": "Mark Mikkelsen",
"profile": "https://vivo.weill.cornell.edu/display/cwid-mam4041"
"profile": "https://mikkelsenlab.weill.cornell.edu/"
},
{
"contributions": [
Expand Down Expand Up @@ -2303,6 +2317,13 @@
"login": "nicole_c_swann",
"name": "Nicole C. Swann"
},
{
"contributions": [
"doc"
],
"login": "nbeliy",
"name": "Nikita Beliy"
},
{
"contributions": [
"doc"
Expand Down Expand Up @@ -2636,6 +2657,13 @@
"login": "samuel_garcia",
"name": "Samuel Garcia"
},
{
"contributions": [
"doc"
],
"login": "SamGuay",
"name": "Samuel Guay"
},
{
"avatar_url": [
"https://avatars.githubusercontent.com/u/3496566?v=4"
Expand Down Expand Up @@ -3079,6 +3107,13 @@
"login": "viacovella",
"name": "Vittorio Iacovella"
},
{
"contributions": [
"doc"
],
"login": "viviana_siless",
"name": "Viviana Siless"
},
{
"contributions": [
"doc"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog_generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
git add ${{ github.workspace }}/src/CHANGES.md
git commit -m "[DOC] Auto-generated changelog entry"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: changelog_generator_update
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/publish_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: "Publish schema"

on:
push:
branches:
- "master"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
GIT_AUTHOR_NAME: BIDS CI
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: BIDS CI
GIT_COMMITTER_EMAIL: [email protected]

permissions:
contents: write
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: "blob:none"
- uses: actions/setup-python@v5
with:
python-version: 3
- name: Install bidsschematools
run: |
pip install --upgrade tools/schemacode
git clean -fxd tools/schemacode
- name: Checkout jsr-dist
run: |
git checkout -t origin/jsr-dist
- name: Regenerate schema
run: bst export > schema.json
- name: Regenerate context types
run: |
jq .meta.context schema.json \
| npx quicktype --src-lang schema --lang ts -t Context --just-types \
> context.ts
- name: Regenerate metaschema types
run: |
# Name the file schema so the type will be named Schema
bst export-metaschema > /tmp/schema.json
npx --package=json-schema-to-typescript json2ts --unknownAny /tmp/schema.json > metaschema.ts
- name: Determine next version
run: |
BASE=$( jq -r .schema_version schema.json )
if [[ "$BASE" =~ ^[0-9]*.[0-9]*.[0-9]*$ ]]; then
# Release, so unconditionally update version
VERSION=$BASE
jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json
else
DENOVER=$( jq -r .version jsr.json )
# Get the reference of the latest commit to touch the schema directory
HASH=$( git log -n 1 --pretty=%h $REF -- src/schema )
if [[ $DENOVER =~ ^"$BASE".[0-9] ]]; then
PREFIX=${DENOVER%+*}
let SERIAL=1+${PREFIX#$BASE.}
else
SERIAL=1
fi
VERSION="$BASE.$SERIAL+$HASH"
fi
echo VERSION=$VERSION | tee -a $GITHUB_ENV
env:
REF: ${{ github.ref }}
- name: Check for changes, set version and commit
run: |
if ! git diff -s --exit-code; then
jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json
git add jsr.json schema.json context.ts metaschema.ts
git commit -m "Update schema JSR distribution"
git push
fi
- name: Publish to JSR
if: success()
run: |
npx jsr publish
4 changes: 2 additions & 2 deletions .github/workflows/schemacode_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: "Install build dependencies"
run: pip install --upgrade build twine
- name: "Install test dependencies on tag"
run: pip install --upgrade tools/schemacode[test]
run: pip install --upgrade tools/schemacode[all]
if: ${{ startsWith(github.ref, 'refs/tags/schema-') }}
- name: "Build archive on tag"
run: pytest tools/schemacode/bidsschematools -k make_archive
Expand All @@ -56,7 +56,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: macos-latest
python-version: 3
Expand Down
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ Patrick Park <[email protected]>
Ezequiel Mikulan <[email protected]>

Guillaume Flandin <[email protected]>

Dimitri Papadopoulos Orfanos <[email protected]>
28 changes: 23 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,28 @@ ci:
exclude: 'tools/schemacode/bidsschematools/tests/data/broken_dataset_description.json'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-ast
- id: check-added-large-files
- id: check-case-conflict
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.4
hooks:
- id: check-dependabot
- id: check-github-workflows
args: ["--verbose"]
- id: check-metaschema
files: src/metaschema.json
- id: check-readthedocs
files: readthedocs.yml
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.10.0
hooks:
- id: black
files: ^tools/(?!schemacode)
Expand All @@ -35,10 +46,10 @@ repos:
files: tools/schemacode
args: ["--settings-file", "tools/schemacode/pyproject.toml"]
- repo: https://github.com/pyCQA/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
args: [--config=tools/schemacode/setup.cfg]
args: [--config=tools/schemacode/.flake8]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
Expand All @@ -51,13 +62,18 @@ repos:
- id: yamllint
args: [-f=standard, -c=.yamllint.yml]
files: src/schema/.*/.*\.yaml
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix, --indent, '4', --no-sort]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.12.1
hooks:
- id: mypy
# Sync with project.optional-dependencies.typing
Expand All @@ -71,6 +87,8 @@ repos:
- types-PyYAML
- types-tabulate
- types-jsonschema
- jsonschema
- httpx
args: ["tools/schemacode/bidsschematools"]
pass_filenames: false
- repo: https://github.com/koalaman/shellcheck-precommit
Expand Down
59 changes: 54 additions & 5 deletions .tributors
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@
"name": "Anthony Galassi",
"orcid": "0000-0001-6550-4574"
},
"arianna_sala": {
"affiliation": "université de Liège, Belgium",
"blog": "https://www.coma.uliege.be/people/arianna-sala/",
"contributions": [
"doc"
],
"email": "[email protected]",
"name": "Arianna Sala",
"orcid": "0000-0001-8121-0891"
},
"arokem": {
"affiliation": "University of Washington, Psychology, Seattle, WA, 98107, United States of America",
"blog": "https://arokem.org/",
Expand Down Expand Up @@ -348,10 +358,17 @@
"publish_email": true
},
"benjamin_dichter": {
"affiliation": "CatalystNeuro",
"blog": "https://bendichter.com/",
"contributions": [
"doc"
"doc",
"code",
"test"
],
"name": "Benjamin Dichter"
"email": "[email protected]",
"github": "bendichter",
"name": "Benjamin Dichter",
"orcid": "0000-0001-5725-6910"
},
"benjamin_gagl": {
"affiliation": "University of Vienna",
Expand Down Expand Up @@ -1941,12 +1958,16 @@
"name": "Marie-Hélène Bourget"
},
"markmikkelsen": {
"affiliation": "Weill Cornell Medicine, Department of Radiology, New York, NY, 10021, USA",
"blog": "https://vivo.weill.cornell.edu/display/cwid-mam4041",
"affiliation": "Weill Cornell Medicine",
"blog": "https://mikkelsenlab.weill.cornell.edu/",
"contributions": [
"doc"
"doc",
"code",
"data",
"review"
],
"email": "[email protected]",
"github": "markmikkelsen",
"name": "Mark Mikkelsen",
"orcid": "0000-0002-0349-3782",
"publish_email": true
Expand Down Expand Up @@ -2241,6 +2262,16 @@
],
"name": "Nicole C. Swann"
},
"nbeliy": {
"affiliation": "University of Liege (Liege, Belgium)",
"contributions": [
"doc"
],
"email": "[email protected]",
"github": "nbeliy",
"name": "Nikita Beliy",
"orcid": "0009-0002-0830-3279"
},
"nima_bigdely_shamlo": {
"contributions": [
"doc"
Expand Down Expand Up @@ -2556,6 +2587,16 @@
],
"name": "Samuel Garcia"
},
"SamGuay": {
"affiliation": "Université de Montréal, Montreal, Québec, CA",
"contributions": [
"doc"
],
"email": "[email protected]",
"github": "SamGuay",
"name": "Samuel Guay",
"orcid": "0000-0001-6990-839X"
},
"snastase": {
"affiliation": "Princeton University",
"blog": "https://snastase.github.io/",
Expand Down Expand Up @@ -3005,6 +3046,14 @@
"name": "Vittorio Iacovella",
"orcid": "0000-0002-0853-1573"
},
"viviana_siless": {
"affiliation": "Business School, Universidad Torcuato di Tella",
"contributions": [
"doc"
],
"email": "[email protected]",
"name": "Viviana Siless"
},
"vladimir_litvak": {
"affiliation": "UCL Queen Square Institute of Neurology",
"contributions": [
Expand Down
Loading

0 comments on commit d0d5c37

Please sign in to comment.