-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
48 lines (38 loc) · 1.37 KB
/
justfile
File metadata and controls
48 lines (38 loc) · 1.37 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
# -----------------------------------------------------------------------------
# R Project Template — Justfile
# -----------------------------------------------------------------------------
# Common developer commands for rv-based projects.
# Run `just <command>` (e.g., `just test`).
# -----------------------------------------------------------------------------
# Always use bash for consistency across OSes
set shell := ["bash", "-cu"]
# Default recipe (shown when running plain `just`)
default:
@just --list
# Install dependencies (create/update virtualenv)
install:
rv sync
# Upgrade packages to the latest versions available
update:
rv upgrade
# Lint (Jarl check)
lint:
jarl check .
# Format (Air format)
format:
r-air format --check .
# Run testthat
test:
Rscript -e "testthat::test_dir('src/package_name/__tests__')"
# Build docs (Quartrify)
docs-build:
Rscript -e "quartify::rtoqmd_dir('src/package_name/', render = TRUE, output_html_dir = '../../docs/html', exclude_pattern='__tests__')"
# Install pre-commit hooks
pre-commit-install:
uvx pre-commit install \
&& uvx pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks \
&& uvx pre-commit install -t pre-push \
&& uvx pre-commit install --hook-type commit-msg
# Run all pre-commit hooks
pre-commit:
uvx pre-commit run --all-files --hook-stage push