forked from bids-standard/bids-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (38 loc) · 1.59 KB
/
Makefile
File metadata and controls
54 lines (38 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.PHONY: tools/contributors.tsv
.PHONY: all serve install update_contributors formatschema
all:
@echo "Nothing is done by default. Consider following targets:"
@echo " install -- prep environment"
@echo " serve -- prep environment and build and serve docs"
@echo " formatschema -- format and commit(!) schema"
serve: .venv
uv run mkdocs serve
install: .venv node_modules
node_modules: package.json package-lock.json
npm install
.venv: pyproject.toml uv.lock
uv sync --frozen --group doc --group tools
validate_citation_cff: CITATION.cff .venv
uv run cffconvert --validate
update_contributors: .venv
uv run tools/add_contributors.py
uv run tools/print_contributors.py
npx all-contributors-cli generate
runprettier:
npx prettier --write "src/schema/**/*.yaml"
python3 -m yamllint -f standard src/schema/ -c .yamllint.yml
SCHEMA_CHANGES := $(shell git diff --name-only | grep src/schema/*.yaml)
commitschema:
@echo SCHEMA_CHANGES $(SCHEMA_CHANGES)
git add src/schema/*.yaml && \
git commit -m "[git-blame-ignore-rev] prettified schema files." && \
git log --grep "\[git-blame-ignore-rev\]" --pretty=format:"# %ai - %ae - %s%n%H" >> .git-blame-ignore-revs \
|| true
formatschema: runprettier commitschema
.PHONY: runprettier commitschema
schemacodedocs_clean:
uv run --group=doc sphinx-build -M clean tools/schemacode/docs tools/schemacode/docs/_build
schemacodedocs_build: schemacodedocs_clean
uv run --group=doc sphinx-build -M html tools/schemacode/docs tools/schemacode/docs/_build
schemacodedocs_serve: schemacodedocs_build
uv run python -m http.server -d tools/schemacode/docs/_build