Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
88 lines (69 loc) · 2.01 KB
/
Copy pathjustfile
File metadata and controls
88 lines (69 loc) · 2.01 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@_default:
just --list --unsorted
# Run all recipes
run-all: install-deps format-all check-all build-all
# List all TODO items in the repository
list-todos:
grep -R -n \
--exclude-dir=.quarto \
--exclude-dir=_book \
--exclude-dir=_site \
--exclude-dir=.git \
--exclude=justfile \
--exclude=copier.yaml \
"TODO" .
# Install or update the pre-commit hooks
install-precommit:
# Install pre-commit hooks
uvx pre-commit install
uvx pre-commit run --all-files
uvx pre-commit autoupdate
# Install workshop's package dependencies
install-deps:
#!/usr/bin/Rscript
pak::pak(ask = FALSE)
# Install development dependencies
install-dev-deps:
uv tool install jarl-linter
uv tool install air-formatter
# Run all formatters
format-all: format-md format-r
# Format Markdown files
format-md:
# Use both rumdl and panache, for different purposes
uvx rumdl fmt --silent
uvx --from panache-cli panache format . --quiet
# Format R code
format-r:
uvx --from air-formatter air format .
# Run all check recipes
check-all: check-spelling check-urls check-r
# Check for spelling errors in files
check-spelling:
uvx typos --config .config/typos.toml
# Check that URLs work
check-urls:
lychee . --config .config/lychee.toml
# Lint R code for any potential issues
check-r:
uvx --from jarl-linter jarl check .
# Run all build recipes
build-all: build-contributors build-readme build-website
# Re-build the README file from the Quarto version
build-readme:
uvx --from quarto quarto render README.qmd --to gfm
# Generate a Quarto include file with the contributors
build-contributors:
sh ./tools/get-contributors.sh rostools/server-analysis-tutorial > includes/_contributors.qmd
# Build Quarto website
build-website:
quarto render
# Preview the website with automatic reload on changes
preview-website:
quarto preview
# Check for and apply updates from the template
update-from-template:
uvx copier update --defaults
# Reset repo changes to match the template
reset-from-template:
uvx copier recopy --defaults