From 3ed9fa051bd92c924980a796e414a5b3481b1921 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Tue, 18 Aug 2026 10:59:35 +0200 Subject: improved mise config --- .mise.toml | 52 ---------------------------------------------------- README.md | 5 ++++- mise.toml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 53 deletions(-) delete mode 100644 .mise.toml create mode 100644 mise.toml diff --git a/.mise.toml b/.mise.toml deleted file mode 100644 index 5ff5424..0000000 --- a/.mise.toml +++ /dev/null @@ -1,52 +0,0 @@ -[tools] -"github:boyter/dcd" = "1.1.0" -go = "1.25.12" -node = "26.6.0" -watchexec = "latest" - -[tasks.generate] -description = "Generate templ Go files" -run = "go tool templ generate" - -[tasks.format] -description = "Format Go sources" -run = "go fmt ./..." - -[tasks.frontend-build] -description = "Compile TypeScript browser assets" -run = "npm run build" - -[tasks.check] -description = "Run formatting, TypeScript and Go gate checks" -depends = ["generate", "format", "frontend-build"] -run = [ - "npm run format:check", - "npm run lint", - "npm run typecheck", - "npm test", - "go vet ./...", - "go build ./...", - "go test ./...", -] - -[tasks.build] -description = "Build the application" -depends = ["frontend-build"] -run = "go build -o biking_home ." - -[tasks.code-analysis] -description = "Run code analysis tools" -run = "dcd -i go -x '_test.go,templates_templ.go' -m 8 ." - -[tasks.migrate] -description = "Apply SQLite migrations" -run = "DATABASE_URL=sqlite:biking_home.db go tool dbmate up" - -[tasks.dev] -description = "Run the web server" -depends = ["frontend-build"] -run = "go run ." - -[tasks.dev-watch] -description = "Regenerate templates, compile TypeScript, and run the web server" -run = ["mise run generate", "mise run frontend-build", "go run ."] diff --git a/README.md b/README.md index 90dda7d..1b95ddb 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ mise run build ```bash # Start the web server on http://localhost:8080 -mise watch dev-watch --restart --exts go,templ,css,ts --ignore '*_templ.go' +mise run dev-watch # Recompute and persist all ride computed values ./biking_home -backfill @@ -131,6 +131,8 @@ TypeScript checks can also be run directly with `npm run check`, covering format ## TODO +- http://localhost:8080/rides/330: col de l'aire dei masco start before detected, and does not appear on ride +- http://localhost:8080/rides/263: Cat 2 to split in 2. when drawing 1 off, try and create new detected climbs - Compute estimated power, speed - Plot speed and slope per segment, colored by heart rate - Plot speed vs ctc/100km @@ -142,6 +144,7 @@ TypeScript checks can also be run directly with `npm run check`, covering format - Record ride times on official climbs - Destination via Start - Planning rides +- Mountain pass from OSM ## Resources diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..93bee88 --- /dev/null +++ b/mise.toml @@ -0,0 +1,52 @@ +[tools] +"github:boyter/dcd" = "1.1.0" +go = "1.25.12" +node = "26.6.0" +watchexec = "latest" + +[env] +DATABASE_URL = "sqlite:biking_home.db" + +[tasks.generate] +description = "Generate templ Go files" +run = "go tool templ generate" + +[tasks.frontend-build] +description = "Compile TypeScript browser assets" +run = "npm run build" + +[tasks.check] +description = "Run formatting, TypeScript and Go gate checks" +depends = ["generate", "frontend-build"] +run = [ + "npm run format:check", + "npm run lint", + "npm run typecheck", + "npm test", + "go fmt ./...", + "go vet ./...", + "go build ./...", + "go test ./...", +] + +[tasks.build] +description = "Build the application" +depends = ["generate", "frontend-build"] +run = "go build -o biking_home ." + +[tasks.code-analysis] +description = "Run code analysis tools" +run = "dcd -i go -x '_test.go,templates_templ.go' -m 8 ." + +[tasks.migrate] +description = "Apply SQLite migrations" +run = "go tool dbmate up" + +[tasks.dev] +description = "Generate templates, compile TypeScript, and run the web server" +depends = ["generate", "frontend-build"] +run = "go run ." + +[tasks.dev-watch] +description = "Watch and restart the web server" +run = "mise watch dev --restart --exts go,templ,css,ts --ignore '*_templ.go'" -- cgit v1.2.3