-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjustfile
More file actions
104 lines (80 loc) · 2.93 KB
/
justfile
File metadata and controls
104 lines (80 loc) · 2.93 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Eth P2P Notebooks - Pipeline Commands
# Default recipe
default:
@just --list
# ============================================
# Development
# ============================================
# Start Astro development server
dev:
cd site && pnpm dev
# Preview production build
preview:
cd site && pnpm preview
# Install all dependencies
install:
uv sync
cd site && pnpm install
git config core.hooksPath .githooks
# ============================================
# Data Pipeline
# ============================================
# Fetch data: all (default) or specific date (YYYY-MM-DD)
# Fetch data: all (default) or specific date (YYYY-MM-DD). Support force="true" to force re-fetch.
fetch target="all" force="false":
uv run python scripts/fetch_data.py --output-dir notebooks/data \
{{ if target == "all" { "--sync" } else { "--date " + target } }} \
{{ if force == "true" { "--force" } else { "" } }}
# Check for stale data without fetching
check-stale:
uv run python scripts/pipeline.py check-stale
# Show resolved date range from config
show-dates:
uv run python scripts/pipeline.py resolve-dates
# Show current query hashes
show-hashes:
uv run python scripts/pipeline.py query-hashes
# ============================================
# Notebook Rendering
# ============================================
# Render notebooks: all (default), "latest", or specific date (YYYY-MM-DD). Support force="true" to force re-render.
render target="all" force="false":
uv run python scripts/render_notebooks.py --output-dir site/rendered \
{{ if target == "all" { "" } \
else if target == "latest" { "--latest-only" } \
else { "--date " + target } }} \
{{ if force == "true" { "--force" } else { "" } }}
# ============================================
# Build & Deploy
# ============================================
# Build Astro site
build:
cd site && pnpm build
# Copy parquet files to dist for R2 publishing (only rendered dates)
copy-data:
uv run python scripts/copy_data_to_dist.py
# Render all + build Astro + copy data for publishing
publish: render build copy-data
# ============================================
# CI / Full Pipeline
# ============================================
# Full sync: fetch + render + build
sync: fetch render build
# CI: Check data staleness (exit 1 if stale)
check-stale-ci:
uv run python scripts/fetch_data.py --output-dir notebooks/data --check-only
# ============================================
# Utilities
# ============================================
# Warn about stale data but don't fail
check-stale-warn:
uv run python scripts/pipeline.py check-stale || echo "Warning: Some data may be stale"
# Type check the Astro site
typecheck:
cd site && pnpm typecheck
# Clean build artifacts
clean:
rm -rf site/dist site/.astro site/rendered
# Clean all (including node_modules and venv)
clean-all: clean
rm -rf site/node_modules .venv