Skip to content

Commit

Permalink
Make helper to check paths in example to take arg to point to schema.…
Browse files Browse the repository at this point in the history
…org + add it to RTD workflow
  • Loading branch information
yarikoptic committed Mar 7, 2024
1 parent 4a09bbd commit 66edbab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build:
jobs:
pre_build:
- bst -v export --output src/schema.json
- tools/no-bad-schema-paths.sh src/schema.json # README.md might need fixing

mkdocs:
configuration: mkdocs.yml
Expand Down
4 changes: 3 additions & 1 deletion tools/no-bad-schema-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -eu -o pipefail

schema_json=$(readlink -f "$1")

cd `readlink -f "$0" | xargs dirname`/../src/schema

grep -oE '(://)?([-_A-Za-z]+\.)+[-_A-Za-z]+' README.md \
Expand All @@ -14,7 +16,7 @@ grep -oE '(://)?([-_A-Za-z]+\.)+[-_A-Za-z]+' README.md \
#echo "$filepath"
#ls -ld "$filepath"* || echo "nope"
#echo -n "$path: "
v=$(jq ".$p" < ../../../bids-schema/versions/master/schema.json | grep -v '^null$' || :)
v=$(jq ".$p" < "$schema_json" | grep -v '^null$' || :)
if [ -z "$v" ]; then
echo "$p: not reachable"
fi
Expand Down

0 comments on commit 66edbab

Please sign in to comment.