diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e6b41fa62..ee82d5b003 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 jobs: build_docs: docker: - - image: cimg/python:3.8 + - image: cimg/python:3.12-node steps: # checkout code to default ~/project - checkout @@ -21,14 +21,15 @@ jobs: - persist_to_workspace: # the mkdocs build outputs are in ~/project/site root: ~/project - paths: site + paths: + - site - store_artifacts: path: ~/project/site/ destination: dev_docs check_links: docker: - - image: cimg/python:3.8 + - image: cimg/python:3.12 steps: # checkout code to default ~/project - checkout @@ -131,7 +132,8 @@ jobs: - persist_to_workspace: # raw generated changelog in ~/changelog_build/CHANGES.md root: ~/. - paths: changelog_build + paths: + - changelog_build # Lint and fix the auto generated changes.md file lint_generated_changelog: @@ -164,7 +166,8 @@ jobs: - persist_to_workspace: # linted and fixed changelog in ~/changelog_build/CHANGES.md root: ~/. - paths: changelog_build + paths: + - changelog_build # Push built changelog to repo commit_generated_changelog: @@ -178,7 +181,7 @@ jobs: - attach_workspace: # fixed+linted changelog in ~/changelog_build/CHANGES.md at: ~/. - - deploy: + - run: name: Changelog deployment # $CHANGE_TOKEN is generated via the GitHub web UI, and then securely stored within CircleCI web UI command: | @@ -197,7 +200,6 @@ jobs: fi workflows: - version: 2 search_build: jobs: - build_docs diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index c5809f72b2..6cf4dbcd4c 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -44,7 +44,7 @@ jobs: run: python -m build tools/schemacode - name: "Check distribution metadata" run: twine check tools/schemacode/dist/* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: dist path: tools/schemacode/dist/ @@ -76,7 +76,7 @@ jobs: run: python -c "import sys; print(sys.version)" - name: "Fetch packages" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist/ @@ -91,7 +91,7 @@ jobs: --cov-append --cov-report=xml --cov=bidsschematools --doctest-modules - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: unit_${{ matrix.os }}_${{ matrix.python-version }} path: coverage.xml @@ -108,7 +108,7 @@ jobs: python-version: ["3.11"] steps: - name: "Fetch packages" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist/ @@ -146,7 +146,7 @@ jobs: run: python -m pytest --pyargs bidsschematools -m "validate_schema" --cov-append --cov-report=xml --cov=bidsschematools - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: schema_validation path: coverage.xml @@ -161,10 +161,10 @@ jobs: uses: actions/checkout@v4 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Upload to CodeCov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} # not required but might help API rate limits fail_ci_if_error: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4a77c432b4..8d7578c843 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-added-large-files - id: check-case-conflict - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 24.1.1 hooks: - id: black files: ^tools/(?!schemacode) @@ -23,7 +23,7 @@ repos: files: tools/schemacode args: ["--config", "tools/schemacode/pyproject.toml", "--verbose"] - repo: https://github.com/pyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort files: ^tools/(?!schemacode) @@ -33,12 +33,12 @@ repos: files: tools/schemacode args: ["--settings-file", "tools/schemacode/pyproject.toml"] - repo: https://github.com/pyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 args: [--config=tools/schemacode/setup.cfg] - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.3 + rev: v4.0.0-alpha.8 hooks: - id: prettier entry: env PRETTIER_LEGACY_CLI=1 prettier # temporary fix for https://github.com/prettier/prettier/issues/15742 @@ -49,7 +49,7 @@ repos: - id: codespell args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.7.1 + rev: v1.8.0 hooks: - id: mypy # Sync with project.optional-dependencies.typing diff --git a/Release_Protocol.md b/Release_Protocol.md index b4d90f8d5d..f3163cf403 100644 --- a/Release_Protocol.md +++ b/Release_Protocol.md @@ -267,7 +267,16 @@ Similarly update the version in CITATION.cff with a `dev` suffix. 1. In a previous step you have secured a PDF version of the BIDS specification and the corresponding `CITATION.cff` file. 1. Follow the steps described here: https://github.com/bids-standard/bids-specification-pdf-releases#release-instructions -### 11. Sharing news of the release +### 11. Update the BIDS website data + +Update the following files in the BIDS website repository (https://github.com/bids-standard/bids-website) if applicable: + +- `tools/timeline.csv` +- `_data/beps.yml` +- `_data/beps_completed.yml` +- `_data/beps_other.yml` + +### 12. Sharing news of the release Please share news of the release on the [identified platforms](https://docs.google.com/spreadsheets/d/16SAGK3zG93WM2EWuoZDcRIC7ygPc5b7PDNGpFyC3obA/edit#gid=0). Please use our previous release posts as a guide. diff --git a/src/appendices/schema.md b/src/appendices/schema.md index 1616a6d5c9..fc0855881d 100644 --- a/src/appendices/schema.md +++ b/src/appendices/schema.md @@ -9,7 +9,7 @@ to the BIDS standard. The BIDS schema is available in two machine readable formats: -- as a set of [YAML](https://en.wikipedia.org/wiki/YAML) files in the [BIDS specification repository](https://github.com/bids-standard/bids-specification/src/schema) +- as a set of [YAML](https://en.wikipedia.org/wiki/YAML) files in the [BIDS specification repository](https://github.com/bids-standard/bids-specification/tree/master/src/schema) - as a [single dereferenced json file](https://bids-specification.readthedocs.io/en/stable/schema.json) A didactic walkthrough of the schema can be found in the [BEP Guide](https://bids-extensions.readthedocs.io/en/latest/schema/), diff --git a/src/schema/rules/files/raw/fmap.yaml b/src/schema/rules/files/raw/fmap.yaml index 94b03f7f6f..056ed1d67e 100644 --- a/src/schema/rules/files/raw/fmap.yaml +++ b/src/schema/rules/files/raw/fmap.yaml @@ -38,6 +38,7 @@ pepolar: ceagent: optional direction: required run: optional + part: optional chunk: optional TB1DAM: diff --git a/tools/examplecode/__init__.py b/tools/examplecode/__init__.py index 886bf1c86a..414983f48d 100644 --- a/tools/examplecode/__init__.py +++ b/tools/examplecode/__init__.py @@ -1,4 +1,5 @@ """A Python package to render BIDS example with tree like output.""" + from examplecode.example import DirectoryTree __all__ = [ diff --git a/tools/mkdocs_macros_bids/macros.py b/tools/mkdocs_macros_bids/macros.py index aa29f21b28..f68453c6b8 100644 --- a/tools/mkdocs_macros_bids/macros.py +++ b/tools/mkdocs_macros_bids/macros.py @@ -1,4 +1,5 @@ """Functions used by the macros mkdocs plugin.""" + import os import sys diff --git a/tools/mkdocs_macros_bids/main.py b/tools/mkdocs_macros_bids/main.py index 30a93e6ce9..13bb5caf44 100644 --- a/tools/mkdocs_macros_bids/main.py +++ b/tools/mkdocs_macros_bids/main.py @@ -4,6 +4,7 @@ Functions decorated in "define_env()" are callable throughout the specification and are run/rendered with the mkdocs plugin "macros". """ + import os import sys diff --git a/tools/pull_files.py b/tools/pull_files.py index 2e6658ba83..a2a32aa552 100644 --- a/tools/pull_files.py +++ b/tools/pull_files.py @@ -7,6 +7,7 @@ https://github.com/alan-turing-institute/the-turing-way/blob/af98c94/tests/pull_files.py """ + import argparse import requests diff --git a/tools/schemacode/bidsschematools/data/__init__.py b/tools/schemacode/bidsschematools/data/__init__.py index e275ce39b4..14df1fc5ec 100644 --- a/tools/schemacode/bidsschematools/data/__init__.py +++ b/tools/schemacode/bidsschematools/data/__init__.py @@ -2,6 +2,7 @@ .. autofunction:: load_resource """ + import atexit import os from contextlib import ExitStack diff --git a/tools/schemacode/bidsschematools/data/tests/test_rules.py b/tools/schemacode/bidsschematools/data/tests/test_rules.py index c44634f814..e8da90ee93 100644 --- a/tools/schemacode/bidsschematools/data/tests/test_rules.py +++ b/tools/schemacode/bidsschematools/data/tests/test_rules.py @@ -1,4 +1,5 @@ """Simple validation tests on schema rules.""" + import warnings from collections.abc import Mapping diff --git a/tools/schemacode/bidsschematools/expressions.py b/tools/schemacode/bidsschematools/expressions.py index c850d24551..3c22673095 100644 --- a/tools/schemacode/bidsschematools/expressions.py +++ b/tools/schemacode/bidsschematools/expressions.py @@ -1,5 +1,6 @@ """Parsing utilities for BIDS Schema expression language """ + from functools import partial from pyparsing import ( diff --git a/tools/schemacode/bidsschematools/render/__init__.py b/tools/schemacode/bidsschematools/render/__init__.py index 506e6b4583..a251a1f3cd 100644 --- a/tools/schemacode/bidsschematools/render/__init__.py +++ b/tools/schemacode/bidsschematools/render/__init__.py @@ -1,4 +1,5 @@ """Functions for rendering elements of the schema in the specification text.""" + from bidsschematools.render.tables import ( make_columns_table, make_entity_table, diff --git a/tools/schemacode/bidsschematools/render/tables.py b/tools/schemacode/bidsschematools/render/tables.py index 90d091f5db..cf8645ffeb 100644 --- a/tools/schemacode/bidsschematools/render/tables.py +++ b/tools/schemacode/bidsschematools/render/tables.py @@ -1,4 +1,5 @@ """Functions for rendering portions of the schema as text.""" + from __future__ import annotations import logging diff --git a/tools/schemacode/bidsschematools/render/text.py b/tools/schemacode/bidsschematools/render/text.py index 6468007625..1106e17185 100644 --- a/tools/schemacode/bidsschematools/render/text.py +++ b/tools/schemacode/bidsschematools/render/text.py @@ -1,4 +1,5 @@ """Functions for rendering portions of the schema as text.""" + import logging import os diff --git a/tools/schemacode/bidsschematools/render/utils.py b/tools/schemacode/bidsschematools/render/utils.py index a482b54492..873699058e 100644 --- a/tools/schemacode/bidsschematools/render/utils.py +++ b/tools/schemacode/bidsschematools/render/utils.py @@ -1,4 +1,5 @@ """Utility functions for specification rendering tools.""" + import math import posixpath diff --git a/tools/schemacode/bidsschematools/rules.py b/tools/schemacode/bidsschematools/rules.py index 6dd837629f..d0d6f5dae9 100644 --- a/tools/schemacode/bidsschematools/rules.py +++ b/tools/schemacode/bidsschematools/rules.py @@ -3,6 +3,7 @@ This module is currently limited to constructing filename rules from ``schema.rules.files``. """ + import re import typing as ty from collections.abc import Mapping diff --git a/tools/schemacode/bidsschematools/schema.py b/tools/schemacode/bidsschematools/schema.py index 22dac02cb6..8a51725f1b 100644 --- a/tools/schemacode/bidsschematools/schema.py +++ b/tools/schemacode/bidsschematools/schema.py @@ -1,4 +1,5 @@ """Schema loading- and processing-related functions.""" + import logging import os import re diff --git a/tools/schemacode/bidsschematools/tests/data/__init__.py b/tools/schemacode/bidsschematools/tests/data/__init__.py index 6415366aea..978e681be5 100644 --- a/tools/schemacode/bidsschematools/tests/data/__init__.py +++ b/tools/schemacode/bidsschematools/tests/data/__init__.py @@ -2,6 +2,7 @@ .. autofunction:: load_test_data """ + from ...data import Loader __all__ = ("load_test_data",) diff --git a/tools/schemacode/bidsschematools/tests/test_render_tables.py b/tools/schemacode/bidsschematools/tests/test_render_tables.py index be41b8c5eb..9e1116fe68 100644 --- a/tools/schemacode/bidsschematools/tests/test_render_tables.py +++ b/tools/schemacode/bidsschematools/tests/test_render_tables.py @@ -1,4 +1,5 @@ """Tests for the bidsschematools package.""" + from bidsschematools.render import tables diff --git a/tools/schemacode/bidsschematools/tests/test_render_text.py b/tools/schemacode/bidsschematools/tests/test_render_text.py index 3d25fd8b32..e6745c8780 100644 --- a/tools/schemacode/bidsschematools/tests/test_render_text.py +++ b/tools/schemacode/bidsschematools/tests/test_render_text.py @@ -1,4 +1,5 @@ """Tests for the bidsschematools package.""" + import os import pytest diff --git a/tools/schemacode/bidsschematools/tests/test_schema.py b/tools/schemacode/bidsschematools/tests/test_schema.py index b0703361a3..5e7b0e3575 100644 --- a/tools/schemacode/bidsschematools/tests/test_schema.py +++ b/tools/schemacode/bidsschematools/tests/test_schema.py @@ -1,4 +1,5 @@ """Tests for the bidsschematools package.""" + import os from collections.abc import Mapping diff --git a/tools/schemacode/bidsschematools/types/namespace.py b/tools/schemacode/bidsschematools/types/namespace.py index b59e8bb586..39943ac3f0 100644 --- a/tools/schemacode/bidsschematools/types/namespace.py +++ b/tools/schemacode/bidsschematools/types/namespace.py @@ -4,6 +4,7 @@ YAML files available as a single dictionary and allow attribute (``.``) lookups. """ + import json import typing as ty from collections.abc import ItemsView, KeysView, Mapping, MutableMapping, ValuesView diff --git a/tools/schemacode/bidsschematools/utils.py b/tools/schemacode/bidsschematools/utils.py index 308fd981f6..ec2947fb37 100644 --- a/tools/schemacode/bidsschematools/utils.py +++ b/tools/schemacode/bidsschematools/utils.py @@ -1,4 +1,5 @@ """Utility functions for the bids-specification schema.""" + import logging from . import data