Skip to content

Commit

Permalink
Merge branch 'master' into guiomar-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Feb 5, 2024
2 parents 0f3d0a4 + a73a310 commit 441fa10
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 21 deletions.
16 changes: 9 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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: |
Expand All @@ -197,7 +200,6 @@ jobs:
fi
workflows:
version: 2
search_build:
jobs:
- build_docs
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/schemacode_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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/
Expand All @@ -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
Expand All @@ -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/
Expand Down Expand Up @@ -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
Expand All @@ -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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
11 changes: 10 additions & 1 deletion Release_Protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/appendices/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/),
Expand Down
1 change: 1 addition & 0 deletions src/schema/rules/files/raw/fmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pepolar:
ceagent: optional
direction: required
run: optional
part: optional
chunk: optional

TB1DAM:
Expand Down
1 change: 1 addition & 0 deletions tools/examplecode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A Python package to render BIDS example with tree like output."""

from examplecode.example import DirectoryTree

__all__ = [
Expand Down
1 change: 1 addition & 0 deletions tools/mkdocs_macros_bids/macros.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions used by the macros mkdocs plugin."""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions tools/mkdocs_macros_bids/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tools/pull_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
https://github.com/alan-turing-institute/the-turing-way/blob/af98c94/tests/pull_files.py
"""

import argparse

import requests
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.. autofunction:: load_resource
"""

import atexit
import os
from contextlib import ExitStack
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/data/tests/test_rules.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Simple validation tests on schema rules."""

import warnings
from collections.abc import Mapping

Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/expressions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Parsing utilities for BIDS Schema expression language
"""

from functools import partial

from pyparsing import (
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/render/__init__.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/render/tables.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for rendering portions of the schema as text."""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/render/text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for rendering portions of the schema as text."""

import logging
import os

Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/render/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for specification rendering tools."""

import math
import posixpath

Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Schema loading- and processing-related functions."""

import logging
import os
import re
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/tests/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.. autofunction:: load_test_data
"""

from ...data import Loader

__all__ = ("load_test_data",)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the bidsschematools package."""

from bidsschematools.render import tables


Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/tests/test_render_text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the bidsschematools package."""

import os

import pytest
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/tests/test_schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the bidsschematools package."""

import os
from collections.abc import Mapping

Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/types/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/schemacode/bidsschematools/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for the bids-specification schema."""

import logging

from . import data
Expand Down

0 comments on commit 441fa10

Please sign in to comment.