Skip to content

Commit

Permalink
Merge branch 'master' into bep022
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau authored Aug 24, 2023
2 parents 57b21d7 + 48a61a6 commit 8b49f2b
Show file tree
Hide file tree
Showing 166 changed files with 15,434 additions and 2,292 deletions.
3,164 changes: 3,164 additions & 0 deletions .all-contributorsrc

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ jobs:
build_docs_pdf:
docker:
- image: danteev/texlive:latest
- image: texlive/texlive:latest
steps:
# checkout code to default ~/project
- checkout
- run:
name: install dependencies
command: |
apt-get update && apt install -y python3-pip
apt-get update && apt install -y python3-pip python3-venv pandoc
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r ~/project/requirements.txt
python3 -m pip install ~/project/tools/schemacode/[render]
Expand All @@ -83,6 +85,7 @@ jobs:
- run:
name: generate pdf version docs
command: |
source .venv/bin/activate
cd ~/project/pdf_build_src
bash build_pdf.sh
mv ~/project/pdf_build_src/bids-spec.pdf ~/project/bids-spec.pdf
Expand Down
6 changes: 4 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ignore:
- "*/*/tests/*"
- "**/tests/*"
- "*/*/tests/*"
- "**/tests/*"
codecov:
token: 7e84a7fb-8f7e-45f5-8dcc-9f5219fa3855
7 changes: 6 additions & 1 deletion .codespell_dict
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
sub-directory->subdirectory
Sub-directory->Subdirectory
sub-directories->subdirectories
Sub-directories->Subdirectories
file name->filename
File name->Filename
file names->filenames
File names->Filenames
folder->directory
folders->directories
Folder->Directory
Folders->Directories
10 changes: 6 additions & 4 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[codespell]
skip = *.js,*.svg,*.eps,.git
ignore-words-list = fo,te,als
builtin = clear,rare
dictionary = .codespell_dict
skip = *.js,*.svg,*.eps,.git,node_modules,env,venv,.mypy_cache,package-lock.json,CITATION.cff,tools/new_contributors.tsv,./tools/schemacode/docs/build
ignore-words-list = fo,te,als,Acknowledgements,acknowledgements,weill,bu,winn
builtin = clear,rare,en-GB_to_en-US
# this overloads default dictionaries and I have not yet figured out
# how to have multiple https://github.com/codespell-project/codespell/issues/2727
# dictionary = .codespell_dict
exclude-file = src/CHANGES.md
27 changes: 27 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# labeler "full" schema
# https://github.com/marketplace/actions/auto-labeler

# enable labeler on issues, prs, or both.
enable:
issues: false
prs: true
# comments object allows you to specify a different message for issues and prs

comments:
prs: |
I have applied any labels matching special text in your title and description.
Please review the labels and make any necessary changes.
# Labels is an object where:
# - keys are labels
# - values are objects of { include: [ pattern ], exclude: [ pattern ] }
# - pattern must be a valid regex, and is applied globally to
# title + description of issues and/or prs (see enabled config above)
# - 'include' patterns will associate a label if any of these patterns match
# - 'exclude' patterns will ignore this label if any of these patterns match
labels:
exclude-from-changelog:
include:
- 'pre-commit\.ci'
exclude: []
21 changes: 21 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Label PRs"
# See https://github.com/marketplace/actions/auto-labeler

on:

pull_request_target:
types: [opened]

jobs:

labeler:
runs-on: ubuntu-latest

if: github.repository_owner == 'bids-standard'

steps:
- name: Check Labels
id: labeler
uses: jimschubert/labeler-action@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
5 changes: 4 additions & 1 deletion .github/workflows/redirect_circleci_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ on: [status]

jobs:
circleci_artifacts_redirector_job:
if: "${{ startsWith(github.event.context, 'ci/circleci: build_docs_pdf') }}"
runs-on: ubuntu-latest
if: "${{ startsWith(github.event.context, 'ci/circleci: build_docs_pdf') }}"
permissions:
statuses: write
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
uses: larsoner/circleci-artifacts-redirector-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLECI_TOKEN }}
artifact-path: 0/bids-spec.pdf
circleci-jobs: build_docs_pdf
job-title: Check the rendered PDF version here!
8 changes: 4 additions & 4 deletions .github/workflows/schemacode_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -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 pytest pyyaml pandas tabulate markdown-it-py
run: pip install --upgrade pytest pyyaml pandas tabulate markdown-it-py pyparsing
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.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: macos-latest
python-version: 3
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
python-version: ["3.11"]
steps:
- name: "Fetch packages"
uses: actions/download-artifact@v3
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/typescript_build.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,18 @@ jobs:
run: |
python no-bad-latin.py
working-directory: tools

# Validate CITATION.cff
validate_cff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip3 install cffconvert
- name: Validate CITATION.cff
run: make validate_citation_cff
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ venv.bak/
# mkdocs documentation
/site

# schema docs documentation
tools/schemacode/build/*

# mypy
.mypy_cache/
.dmypy.json
Expand Down
42 changes: 34 additions & 8 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.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,27 +13,53 @@ repos:
- id: check-added-large-files
- id: check-case-conflict
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.7.0
hooks:
- id: black
files: ^tools/(?!schemacode)
args: ["--verbose"]
- id: black
name: "black bidsschematools"
files: tools/schemacode
args: [--verbose]
args: ["--config", "tools/schemacode/pyproject.toml", "--verbose"]
- repo: https://github.com/pyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
files: tools/
files: ^tools/(?!schemacode)
args: ["--profile", "black"]
- id: isort
name: "isort bidsschematools"
files: tools/schemacode
args: ["--settings-file", "tools/schemacode/pyproject.toml"]
- repo: https://github.com/pyCQA/flake8
rev: 5.0.4
rev: 6.1.0
hooks:
- id: flake8
args: [--config=tools/schemacode/setup.cfg]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.2
rev: v3.0.2
hooks:
- id: prettier
files: src/schema/.*/.*\.yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.5
hooks:
- id: codespell
args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
# Sync with project.optional-dependencies.typing
additional_dependencies:
- click
- markdown-it-py
- importlib_resources
- pandas-stubs
- pyparsing
- pytest
- types-PyYAML
- types-tabulate
args: ["tools/schemacode/bidsschematools"]
pass_filenames: false
Loading

0 comments on commit 8b49f2b

Please sign in to comment.