Skip to content

Commit

Permalink
Merge branch 'master' into file-formats
Browse files Browse the repository at this point in the history
  • Loading branch information
CPernet authored Apr 22, 2024
2 parents 0750685 + 1afbfe8 commit f1af753
Show file tree
Hide file tree
Showing 77 changed files with 1,927 additions and 343 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ venvs
pdf_build_src/bids-spec.pdf
pdf_build_src/bids-spec_pandoc_log.json
pdf_build_src/src_copy
pdf_build_src/tests/data/output

# JS/NPM
package-lock.json
Expand Down
13 changes: 10 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exclude: 'tools/schemacode/bidsschematools/tests/data/broken_dataset_description.json'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,7 +13,7 @@ repos:
- id: check-added-large-files
- id: check-case-conflict
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.0
hooks:
- id: black
files: ^tools/(?!schemacode)
Expand Down Expand Up @@ -43,13 +43,19 @@ repos:
- id: prettier
entry: env PRETTIER_LEGACY_CLI=1 prettier # temporary fix for https://github.com/prettier/prettier/issues/15742
files: src/schema/.*/.*\.yaml
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [-f=standard, -c=.yamllint.yml]
files: src/schema/.*/.*\.yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
# Sync with project.optional-dependencies.typing
Expand All @@ -62,5 +68,6 @@ repos:
- pytest
- types-PyYAML
- types-tabulate
- types-jsonschema
args: ["tools/schemacode/bidsschematools"]
pass_filenames: false
1 change: 1 addition & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
["lint-maximum-heading-length", false],
["lint-no-shortcut-reference-link", false],
["lint-no-trailing-spaces"],
["remark-lint-code-block-style", false],
["lint-no-undefined-references", false]
]
}
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,37 @@ That would look like this:
|--------------|----------------------------------------------------------|
| Manufacturer | Manufacturer of the equipment, for example (`"Siemens"`) |


#### MkDocs admonitions

It is possible to use [Mkdocs admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#inline-blocks-inline-end)
to highlight certain aspect of the specification.

Admonitions are written like this:

````
!!! note "displayed heading is preceded by a keyword and 3 `!`"
Body of the admonition
can be written on several lines,
but must be always preceded by 4 spaces.
````

The keyword for the heading must be one of the following:

- note
- abstract
- info
- tip
- success
- question
- warning
- failure: octicons
- danger
- bug
- example
- quote

## Using macros

We use [mkdocs-macros](https://mkdocs-macros-plugin.readthedocs.io/en/latest/)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Attribution 4.0 International

Copyright (c) 2018-2022, BIDS Contributors.
Copyright (c) 2018, BIDS Contributors.

=======================================================================

Expand Down
37 changes: 28 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Validation](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml/badge.svg)](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml)
[![CircleCI](https://circleci.com/gh/bids-standard/bids-specification.svg?style=shield)](https://circleci.com/gh/bids-standard/bids-specification)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109520103085644521?domain=https%3A%2F%2Ffosstodon.org%2F)](https://fosstodon.org/@bidsstandard)
[![@BIDSstandard](http://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://twitter.com/BIDSstandard)
[![@BIDSstandard](https://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://x.com/BIDSstandard)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686061.svg)](https://doi.org/10.5281/zenodo.3686061)

<img src="./BIDS_logo/BIDS_logo_white_transparent_background_crop.png#gh-dark-mode-only" alt="bids-logo" width="600"/>
Expand All @@ -13,7 +13,6 @@ organization of neuroimaging data.
In this repository, we develop the
[BIDS specification](https://bids-specification.readthedocs.io/en/latest/).


# When to use BIDS

To organize your data in BIDS, all you need is neuro data, a computer, and the
Expand Down Expand Up @@ -44,10 +43,7 @@ The specification is provided in the form of a webpage, built using
1. Read some introductory material, most likely the very basic problems have already been addressed!
- [BIDS Starter Kit](https://github.com/bids-standard/bids-starter-kit) for tutorials, wikis, templates, ...
2. Post your question in one of several channels where BIDS members are active
- the [NeuroStars](https://neurostars.org/tags/bids) discourse forum
- the [BrainHack Mattermost](https://mattermost.brainhack.org), for instant messaging (see also this [news item](https://bids.neuroimaging.io/2020/06/24/Join-the-BIDS-community-on-the-BrainHack-Mattermost.html))
- the [Google group](https://groups.google.com/forum/#!forum/bids-discussion), for broader discussions surrounding BIDS
- the [specification repository issue page](https://github.com/bids-standard/bids-specification/issues), if you found inconsistencies, typos, or other issues with the BIDS specification itself
- see: [BIDS communication channels](#bids-communication-channels)

# Contributing to BIDS

Expand All @@ -58,11 +54,34 @@ For a current list of our contributors, please see our [Contributors appendix](h

When you're ready to get started, check out [our contributing guidelines](https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md).

We ask that all contributions to BIDS across all project-related spaces (including but not limited to:
[GitHub](https://github.com/bids-standard),
the [Google group](https://groups.google.com/forum/#!forum/bids-discussion), and newsletter emails),
We ask that all contributions to BIDS across all project-related spaces
(including but not limited to:
[GitHub](https://github.com/bids-standard), and the
[Google group](https://groups.google.com/forum/#!forum/bids-discussion); see
[BIDS communication channels](#bids-communication-channels))
adhere to our [code of conduct](https://github.com/bids-standard/bids-specification/blob/master/CODE_OF_CONDUCT.md).

# BIDS communication channels

## Main communication channels

- "Issue" pages on the different GitHub repositories of the [`bids-standard` GitHub organization](https://github.com/bids-standard),
such as the [BIDS specification repository](https://github.com/bids-standard/bids-specification/issues),
for reporting problems or making suggestions
- The [NeuroStars Discourse forum](https://neurostars.org/tags/bids), for asking usage questions
- The [BrainHack Mattermost](https://mattermost.brainhack.org), for instant messaging
(see also this [news item](https://bids.neuroimaging.io/2020/06/24/Join-the-BIDS-community-on-the-BrainHack-Mattermost.html))
- The [Google group](https://groups.google.com/forum/#!forum/bids-discussion), for broader discussions and announcements surrounding BIDS
- The [BIDS website "news"](https://bids.neuroimaging.io/news.html), similar to the Google group, for broader discussions and announcements

## Social media channels

- [X](https://x.com/BIDSstandard)
- [Mastodon](https://fosstodon.org/@bidsstandard)
- [Bluesky](https://bsky.app/profile/bidsstandard.bsky.social)
- [Youtube](https://www.youtube.com/channel/UCxZUcYfd_nvIVWAbzRB1tlw)
- [Instagram](https://www.instagram.com/bidsstandard/)

## Contributors

Thanks goes to these wonderful people.
Expand Down
2 changes: 1 addition & 1 deletion Release_Protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,5 @@ Update the following files in the BIDS website repository (https://github.com/bi

### 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 share news of the release on the [identified platforms](https://github.com/bids-standard/bids-specification?tab=readme-ov-file#BIDS-communication-channels).
Please use our previous release posts as a guide.
14 changes: 10 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nav:
- Electroencephalography: modality-specific-files/electroencephalography.md
- Intracranial Electroencephalography: modality-specific-files/intracranial-electroencephalography.md
- Task events: modality-specific-files/task-events.md
- Physiological and other continuous recordings: modality-specific-files/physiological-and-other-continuous-recordings.md
- Physiological recordings: modality-specific-files/physiological-recordings.md
- Behavioral experiments (with no neural recordings): modality-specific-files/behavioral-experiments.md
- Genetic Descriptor: modality-specific-files/genetic-descriptor.md
- Positron Emission Tomography: modality-specific-files/positron-emission-tomography.md
Expand Down Expand Up @@ -84,19 +84,25 @@ extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/bids-standard/bids-specification/
- icon: fontawesome/brands/twitter
link: https://twitter.com/BIDSstandard/
- icon: fontawesome/brands/x-twitter
link: https://x.com/BIDSstandard/
- icon: fontawesome/brands/mastodon
link: https://fosstodon.org/@bidsstandard
- icon: fontawesome/brands/google
link: https://groups.google.com/g/bids-discussion
- icon: fontawesome/brands/instagram
link: https://www.instagram.com/bidsstandard/
- icon: fontawesome/brands/youtube
link: https://www.youtube.com/channel/UCxZUcYfd_nvIVWAbzRB1tlw

extra_javascript:
- js/jquery-3.6.0.min.js
markdown_extensions:
- toc:
anchorlink: true
- pymdownx.superfences
- admonition
- pymdownx.details
plugins:
- search
- branchcustomization:
Expand All @@ -116,7 +122,7 @@ plugins:
"04-modality-specific-files/03-electroencephalography.md": "modality-specific-files/electroencephalography.md"
"04-modality-specific-files/04-intracranial-electroencephalography.md": "modality-specific-files/intracranial-electroencephalography.md"
"04-modality-specific-files/05-task-events.md": "modality-specific-files/task-events.md"
"04-modality-specific-files/06-physiological-and-other-continuous-recordings.md": "modality-specific-files/physiological-and-other-continuous-recordings.md"
"04-modality-specific-files/06-physiological-and-other-continuous-recordings.md": "modality-specific-files/physiological-recordings.md"
"04-modality-specific-files/07-behavioral-experiments.md": "modality-specific-files/behavioral-experiments.md"
"04-modality-specific-files/08-genetic-descriptor.md": "modality-specific-files/genetic-descriptor.md"
"04-modality-specific-files/09-positron-emission-tomography.md": "modality-specific-files/positron-emission-tomography.md"
Expand Down
5 changes: 2 additions & 3 deletions pdf_build_src/pandoc_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This is done once the duplicate src directory is processed.
"""

import subprocess
import yaml
from pathlib import Path
Expand All @@ -11,9 +12,7 @@

def _find(path, filename):
return next(
parent / filename
for parent in path.parents
if Path.is_file(parent / filename)
parent / filename for parent in path.parents if Path.is_file(parent / filename)
)


Expand Down
Loading

0 comments on commit f1af753

Please sign in to comment.