Skip to content

Commit

Permalink
Merge branch 'master' into bep-016
Browse files Browse the repository at this point in the history
  • Loading branch information
arokem committed Mar 29, 2024
2 parents ab2b4cd + bd08602 commit 48a6a42
Show file tree
Hide file tree
Showing 140 changed files with 11,546 additions and 1,293 deletions.
3,220 changes: 3,220 additions & 0 deletions .all-contributorsrc

Large diffs are not rendered by default.

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
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[codespell]
skip = *.js,*.svg,*.eps,.git,node_modules,env,venv,.mypy_cache,package-lock.json
ignore-words-list = fo,te,als,Acknowledgements,acknowledgements,winn
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,manuel
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
Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/schemacode_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
os: ["ubuntu-latest"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install build dependencies"
Expand All @@ -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 All @@ -56,26 +56,27 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: macos-latest
python-version: 3
- os: windows-latest
python-version: 3
name: ${{ matrix.os }} with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Set up Python"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: "Display Python version"
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 @@ -90,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 @@ -107,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 All @@ -129,12 +130,12 @@ jobs:
runs-on: ubuntu-latest
name: Validate schema
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set Up Python environment
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.11"

- name: Install the schemacode package
run: |
Expand All @@ -145,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 @@ -157,13 +158,13 @@ jobs:
needs: [test, validate_schema]
steps:
- name: Checkout
uses: actions/checkout@v3
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
33 changes: 24 additions & 9 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master

# Markdown formatting
remark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
- name: Install dependencies
Expand All @@ -36,8 +36,8 @@ jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
Expand All @@ -49,8 +49,8 @@ jobs:
python-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3
- run: python -m pip install --upgrade flake8 black isort[colors]
Expand All @@ -63,8 +63,8 @@ jobs:
latin-phrases:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
Expand All @@ -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@v4
- uses: actions/setup-python@v5
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
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
8 changes: 0 additions & 8 deletions .lgtm.yml

This file was deleted.

15 changes: 8 additions & 7 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.4.0
rev: v4.5.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.3.0
rev: 24.3.0
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,22 +33,23 @@ repos:
files: tools/schemacode
args: ["--settings-file", "tools/schemacode/pyproject.toml"]
- repo: https://github.com/pyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
args: [--config=tools/schemacode/setup.cfg]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
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
files: src/schema/.*/.*\.yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.9.0
hooks:
- id: mypy
# Sync with project.optional-dependencies.typing
Expand Down
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]
]
}
Loading

0 comments on commit 48a6a42

Please sign in to comment.