-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
61 lines (44 loc) · 1.87 KB
/
Justfile
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
test:
uv run pytest --disable-warnings -s
deno test -A --parallel tests/cli_test.ts
test-watch:
watchexec -- uv run pytest --disable-warnings -s && deno test -A --parallel tests/cli_test.ts
open NOTEBOOK:
uv run runbook edit {{NOTEBOOK}}
clear-binder-output:
jupyter nbconvert --clear-output --inplace ./runbooks/binder/*.ipynb
clear-output *FILES:
jupyter nbconvert --clear-output --inplace {{FILES}}
lint:
pre-commit run
lint-all:
pre-commit run --all-files
profile:
uv run python3 -m cProfile runbook/cli/__init__.py
release:
deno run -A npm:release-it
clean:
rm -rf ./dist
build:
uv build
benchmark:
hyperfine --export-markdown=docs/PERFORMANCE.md -- runbook
template-update:
#!/usr/bin/env bash
set -eou pipefail
readonly UPDATED_AT="$(date -Iseconds)"
export UPDATED_AT
# Base 64 to avoid corruption during parsing/exporting
readonly TEMPLATE_DENO="$(uv run jupyter nbconvert --log-level='ERROR' runbooks/binder/_template-deno.ipynb --stdout --clear-output --ClearMetadataPreprocessor.enabled=True \
--ClearMetadataPreprocessor.preserve_cell_metadata_mask='[("tags")]' "--ClearMetadataPreprocessor.clear_notebook_metadata=False" | grep -E -v "^poetry-version-plugin" | base64)"
export TEMPLATE_DENO
readonly TEMPLATE_PYTHON="$(uv run jupyter nbconvert --log-level='ERROR' runbooks/binder/_template-python.ipynb --stdout --clear-output --ClearMetadataPreprocessor.enabled=True \
--ClearMetadataPreprocessor.preserve_cell_metadata_mask='[("tags")]' "--ClearMetadataPreprocessor.clear_notebook_metadata=False" | grep -E -v "^poetry-version-plugin" | base64)"
export TEMPLATE_PYTHON
envsubst < runbook/template_builder.py | tee runbook/template.py
readme:
.config/templating.sh
docs:
uvx --with sphinx-click --with myst_parser --with . --from sphinx sphinx-build -b html docs/ site
docs-release:
bash .hermit/bin/publish-docs