generated from mathias/template-go-web
fix(ci): Taskfile YAML syntax error + staticcheck tagged-switch (jepa-fx-risk#19)
Taskfile.yml line 46 had an unquoted Go-template `{{.VAR}}` inside a YAML
flow sequence (`cmds: [...]`) -- the literal braces broke YAML parsing
outright ("did not find expected ',' or ']'"), so `task check` (and thus
CI's push-triggered check job) failed before running a single command.
A manual `workflow_dispatch` re-run passed because the autoresearch
workflow never calls `task check` at all -- unrelated path, not an
env/secret difference as first suspected. Quoted the string.
Also fixed a staticcheck QF1002 in internal/eval/var.go: a boolean
switch comparing the same variable (n1) in every case is a tagged
switch in disguise -- converted to `switch n1 { case 0: ... case n: ...
}`.
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ tasks:
|
||||
cmds: [.venv/bin/python scripts/fetch_multipair.py]
|
||||
data:prepare:pair:
|
||||
desc: "Build {PAIR}_hourly.parquet from data/raw/{PAIR}/ (e.g. PAIR=gbpusd)"
|
||||
cmds: [PAIR={{.PAIR}} .venv/bin/python scripts/prepare_hourly.py {{.EXTRA_ARGS}}]
|
||||
cmds: ["PAIR={{.PAIR}} .venv/bin/python scripts/prepare_hourly.py {{.EXTRA_ARGS}}"]
|
||||
vars:
|
||||
PAIR: '{{default "eurusd" .PAIR}}'
|
||||
data:prepare:multipair:
|
||||
|
||||
@@ -40,11 +40,11 @@ func kupiecPOF(n, n1 int, p0 float64) float64 {
|
||||
phat := float64(n1) / float64(n)
|
||||
|
||||
var lr float64
|
||||
switch {
|
||||
case n1 == 0:
|
||||
switch n1 {
|
||||
case 0:
|
||||
// 0 × ln(0/p0) = 0 by convention; only the n0 term contributes
|
||||
lr = 2 * float64(n0) * math.Log((1-phat)/(1-p0))
|
||||
case n1 == n:
|
||||
case n:
|
||||
// n0 term vanishes
|
||||
lr = 2 * float64(n1) * math.Log(phat/p0)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user