Repository navigation
Make an analysis folder portable, and say what a move broke - #78
Merged
Merged
Conversation
A .dash file already carries its data paths relative to itself, but a whole investigation had nothing saying what it consisted of, or whether it would work on the machine it had just arrived on. An optional ducklocal-project.json lists the dashboards, any other data and the versions and extensions the work used. `project check` runs the existing check over each dashboard and adds what a move breaks: files that did not come along, paths that were never going to, extensions this machine lacks. Each problem says what to do next. It never reaches the network or installs anything: a dashboard reading remote data is left unrun, and says so. `limitations` says what passing does not cover, such as a source with the same name and different data. `project relink` points a source at where its file is now, keeping the old dashboard as a backup. Opening the manifest in the window opens its dashboards, and only those inside its folder, since one elsewhere would run SQL from somewhere nobody looked. A lone .dash file works as it always has. Closes #70. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its cross join built up memory, so on a fast enough machine it reached the 2GB limit inside the 1s timeout and reported resource_limit, failing macOS CI. The limits were right; the query was testing the wrong one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # skills/ducklocal/references/cli.md # src/cli.rs # tests/cli.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #70. Part of #64.
Why
A
.dashfile already keeps its data paths relative to itself, but a whole investigation had nothing saying what it consisted of, or whether it would work on the machine it had just arrived on.What
An optional
ducklocal-project.jsonin the folder:{"version": 1, "name": "orders", "dashboards": ["reports/orders.dash"], "data": [{"name": "archive", "path": "data/old.csv", "sample": "data/s.csv"}], "requires": {"duckdb": "v2.0.0", "extensions": ["httpfs"]}}checkruns the existingcheckover each dashboard, and adds what a move breaks: files that didn't come along, paths that can't travel (absolute, outside the folder, backslashes), and extensions this machine lacks. Every problem has ahint.limitationssays what passing doesn't cover, starting with: a source can have the same name and different data.relinkpoints a source at where its file is now, in every dashboard naming it, keeping each old one as.dash.bak. It writes a relative path when the file is inside the project.examples/portable_project, which the tests copy elsewhere and check.A lone
.dashfile works as it always has. No account, daemon, server or catalog.Decisions to review
ducklocal-project.json. The issue left this open. I picked JSON because the repo already depends onserde_jsonand agents write it easily; it's the one thing here that's costly to change later, so this is the time to object. TOML would read better by hand but adds a dependency.checkexits 0 whatever it finds, and you readok. Its output is a report, while this CLI's errors go to stderr with no stdout, so a failing exit would lose the report. A script has to checkok. An alternative is a--strictflag that exits 1.limitations, so "ok" there says less, and the report says so.relinkedits dashboards directly rather than going throughpropose, because it's an explicit command a person runs and it keeps a backup. The skill tells agents to ask first. Should agents have to propose instead?Gaps against the issue
sampleis only reported, never swapped in.sourceblock avoids that, and the hint says so.limitations. It doesn't test whether credentials work, since that would mean reaching out.Testing
tests/cli.rs: the shipped example moved and checked, its data moved and relinked, and every problem kind, including a dashboard outside the folder and a remote one that must not run.project::tests: path rules, relative and absolute writing, a relink that changes only that path, and how the window expands a manifest.cargo test --locked: 465 unit, 33 CLI and 8 LSP tests pass. Clippy and fmt are clean.Not tested by eye: opening the manifest in the real window. The expansion it relies on is tested in
tabs::split.This includes a one-line fix for a flaky test that's also on #77: my timeout test from #74 could report
resource_limiton a fast machine. Whichever merges first, the other merges cleanly.🤖 Generated with Claude Code