Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
269 lines (202 loc) · 8.78 KB
/
Copy pathjustfile
File metadata and controls
269 lines (202 loc) · 8.78 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# pairassembler project justfile.
# All repeating commands should be recipes here.
export DUCKDB_DOWNLOAD_LIB := env_var_or_default("DUCKDB_DOWNLOAD_LIB", "1")
# Show the available recipes by default.
default:
@just --list
# Interactively choose a recipe to run.
choose:
@just --choose
# List all available recipes.
list:
@just --list
alias l := list
alias ls := list
alias ch := choose
# === Development Workflow ===
# Run the regular local check suite.
check: fmt-check lint test doc-check
@echo "All checks passed"
# Run the strict full-codebase check suite.
check-all: fmt-check lint-strict test-all doc-check
@echo "All checks passed on full codebase"
alias c := check
alias ca := check-all
# Prepare a commit by running the local check suite and showing jj status.
prepare-commit: check
@echo ""
@echo "Ready to describe or split the current jj commit."
@jj status
# Prepare for push by running the strict full-codebase check suite.
prepare-push: check-all
@echo ""
@echo "Ready to push when you are."
alias pc := prepare-commit
alias pp := prepare-push
# === Formatting ===
# Check formatting without modifying files.
fmt-check:
cargo fmt --all -- --check
# Apply formatting fixes.
fmt:
cargo fmt --all
alias fc := fmt-check
alias f := fmt
# === Linting ===
# Run the fast local Clippy policy.
lint:
cargo clippy --all-targets --all-features -- -D clippy::correctness -D clippy::unwrap_used
# Compatibility alias for the standard lint recipe name.
lint-all:
@just lint
# Run strict Clippy with all warnings denied.
lint-strict:
cargo clippy --all-targets --all-features -- -D warnings
alias cl := lint
alias cla := lint-strict
# === Testing ===
# Run tests with nextest.
test:
cargo nextest run --all-features --no-tests=pass
# Run all tests, including ignored tests.
test-all:
cargo nextest run --all-features --run-ignored all --no-tests=pass
# Run tests with captured output disabled.
test-verbose:
cargo nextest run --all-features --no-capture --no-tests=pass
alias tr := test
alias ta := test-all
alias tv := test-verbose
# === Benchmarks ===
# Fast local pairasm performance sanity check.
benchmark-smoke: _benchmark-pairasm-smoke
# Run the standard real-data tool comparison and print a report.
benchmark: _benchmark-default
# Run the standard real-data tool comparison and print a report.
_benchmark-default: _benchmark-check-tools _benchmark-fetch-ena _benchmark-prepare-subsets _benchmark-run-default _benchmark-report-read-id-overlap
# Run the tuned/comparability tool comparison and print a report.
benchmark-tuned: _benchmark-check-tools _benchmark-fetch-ena _benchmark-prepare-subsets _benchmark-run-tuned _benchmark-report-tuned-read-id-overlap
# Reprint the latest default-user benchmark comparison report.
benchmark-report: _benchmark-report-read-id-overlap
# Verify Criterion benchmark targets run quickly; this is not a measurement.
_benchmark-pairasm-smoke:
@just _benchmark-phase "smoke" "Checking benchmark targets compile and run quickly"
@cargo bench --bench in_memory_merge -- --test
@PAIRASM_FASTQ_PAIRS=1000 cargo bench --bench fastq_merge -- --test
# Measure pairasm's in-memory merge path with Criterion.
_benchmark-pairasm-in-memory:
cargo bench --bench in_memory_merge
# Measure pairasm's synthetic FASTQ-oriented path with Criterion.
_benchmark-pairasm-fastq:
PAIRASM_FASTQ_PAIRS=10000 cargo bench --bench fastq_merge
# Check external tools needed for pairasm-vs-tool comparison runs.
_benchmark-check-tools:
@just _benchmark-phase "1/5" "Checking external benchmark tools"
@cargo run --quiet -p pairasm-benches -- check
# Fetch configured ENA FASTQ inputs for pairasm-vs-tool comparisons.
_benchmark-fetch-ena:
@just _benchmark-phase "2/5" "Fetching configured ENA FASTQs"
@cargo run --quiet -p pairasm-benches -- fetch --config benches/config/datasets.tsv
# Prepare deterministic first-N-pair subsets from fetched ENA inputs.
_benchmark-prepare-subsets:
@just _benchmark-phase "3/5" "Preparing deterministic FASTQ subsets"
@cargo run --quiet -p pairasm-benches -- prepare --config benches/config/datasets.tsv --read-pairs ${READ_PAIRS:-100000}
# Run the default-user pairasm-vs-tool comparison through hyperfine.
_benchmark-run-default:
@just _benchmark-phase "4/5" "Running default-user tool comparison"
@cargo run --quiet -p pairasm-benches -- run --config benches/config/datasets.tsv --read-pairs ${READ_PAIRS:-100000} --replicates ${REPLICATES:-3} --threads ${THREADS:-8} --mode default-user --db ${BENCHMARK_DB:-benches/benchmarks.duckdb}
# Run the tuned/comparability pairasm-vs-tool comparison through hyperfine.
_benchmark-run-tuned:
@just _benchmark-phase "4/5" "Running tuned/comparability tool comparison"
@cargo run --quiet -p pairasm-benches -- run --config benches/config/datasets.tsv --read-pairs ${READ_PAIRS:-100000} --replicates ${REPLICATES:-3} --threads ${THREADS:-8} --mode tuned-comparability --db ${BENCHMARK_DB:-benches/benchmarks.duckdb}
# Report merged read-ID set overlap for the latest default-user benchmark run in DuckDB.
_benchmark-report-read-id-overlap:
@just _benchmark-phase "5/5" "Reporting merged read-ID set overlap"
@cargo run --quiet -p pairasm-benches -- report read-id-overlap --db ${BENCHMARK_DB:-benches/benchmarks.duckdb}
# Report merged read-ID set overlap for the latest tuned benchmark run in DuckDB.
_benchmark-report-tuned-read-id-overlap:
@just _benchmark-phase "5/5" "Reporting tuned merged read-ID set overlap"
@cargo run --quiet -p pairasm-benches -- report read-id-overlap --mode tuned-comparability --db ${BENCHMARK_DB:-benches/benchmarks.duckdb}
# Print a compact visual separator for benchmark phases.
_benchmark-phase step title:
@cargo run --quiet -p pairasm-benches -- workflow-phase "{{step}}" "{{title}}"
alias bm := benchmark
# === Building ===
# Build the workspace in debug mode.
build:
cargo build
# Build the workspace in release mode.
build-release:
cargo build --release
# Install the `pairasm` binary globally on the user's system
install:
cargo install --path ./pairassembler/
# Typecheck all targets and features.
check-compile:
cargo check --all-targets --all-features
alias b := build
alias r := build-release
alias i := install
alias cr := check-compile
# === Documentation ===
# Check that documentation builds without errors.
doc-check:
cargo doc --no-deps --document-private-items
# Generate and open documentation.
doc:
cargo doc --no-deps --open
alias dc := doc-check
alias d := doc
# === Project Setup ===
# Prepare reference repositories for manual comparison work.
setup: clone-refs
@echo ""
@echo "Project setup complete"
@echo "Reference repos: .agents/repos/"
# === Reference Repositories ===
# Clone external reference implementations into .agents/repos.
[arg("force", long="force", value="1")]
clone-refs force="":
@echo "Cloning reference repositories into .agents/repos/..."
@{{ if force != "" { "rm -rf .agents/repos" } else { "true" } }}
@mkdir -p .agents/repos
@mkdir -p .agents/archive
@echo "Cloning vsearch..."
git clone --depth 1 https://github.com/torognes/vsearch.git .agents/repos/vsearch || echo "vsearch already exists, skipping"
@echo "Cloning fastp..."
git clone --depth 1 https://github.com/OpenGene/fastp.git .agents/repos/fastp || echo "fastp already exists, skipping"
@echo "Downloading bbmap from SourceForge..."
@if [ -d .agents/repos/bbmap ]; then echo "bbmap already exists, skipping"; else curl -L "https://sourceforge.net/projects/bbmap/files/latest/download" -o .agents/archive/bbmap-latest.tar.gz && tar -xzf .agents/archive/bbmap-latest.tar.gz -C .agents/repos; fi
@echo "Cloning FLASH2..."
git clone --depth 1 https://github.com/dstreett/FLASH2.git .agents/repos/flash2 || echo "flash2 already exists, skipping"
@echo "Cloning SeqPrep..."
git clone --depth 1 https://github.com/jstjohn/SeqPrep.git .agents/repos/seqprep || echo "seqprep already exists, skipping"
@echo "Cloning PEAR..."
git clone --depth 1 https://github.com/tseemann/PEAR.git .agents/repos/pear || echo "pear already exists, skipping"
@echo "Cloning NGmerge..."
git clone --depth 1 https://github.com/jsh58/NGmerge.git .agents/repos/ngmerge || echo "ngmerge already exists, skipping"
@echo "Reference repositories cloned to .agents/repos/"
# Remove downloaded reference repositories.
clean-refs:
@echo "Removing reference repositories..."
rm -rf .agents/repos
@echo "Reference repositories removed"
# === Version Control ===
# Show current jj status.
status:
jj status
# Show current jj log.
log:
jj log
alias st := status
alias lg := log
# === Utility ===
# Clean build artifacts.
clean:
cargo clean
# Update dependencies.
update:
cargo update
# Count source lines.
sloc:
@tokei --types=Rust --compact