mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-13 06:31:47 +00:00
* docs: turn README into an index and move reference detail to docs/guide The README had grown to 393 KB because every change appended its notes there. The text moves verbatim into 18 topic guides under docs/guide/; only headings are re-leveled and relative links re-pointed. The README keeps the introduction, a quick start and a guide index. Contributor test notes move to CONTRIBUTING.md. * docs: send user docs to topic guides and budget the root README The rule 'update README.md for user-facing changes' is what grew the README. Guidance now points to docs/guide/, and check_agent_guidance.py fails when the root README exceeds 16 KiB (AG003). * chore: remove unreferenced screenshots and finished plan notes pr-build/ holds two PR screenshots (3 MB) from #1986. plans/ holds the plan for the merged #4049. docs/SKILL_NAME_CONFLICT_FIX.md is a February change note. Nothing references them. * docs: route always-loaded AGENTS.md files to scoped guides * docs(agents): cut scoped guides to scope, verify, traps, decisions Each AGENTS.md keeps four kinds of content: the scope of the directory, the verification commands, traps a local test run does not show, and decisions the code cannot state. Values, field lists, function inventories, test names, issue numbers and history are deleted, because the code, the tests and git state them. Search and fetch providers share one community guide. Four guides with no remaining content are removed. The size check now allows 6 KiB per file (hard limit 8 KiB) and 24 KiB per chain (hard limit 32 KiB). * style: format frontend guide table and guidance test imports --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2.2 KiB
2.2 KiB
Data analysis skill (skills/public/data-analysis/)
python -m pytest tests/skills -q -k "data_analysis"
Tests use real DuckDB. Default tests never download the spatial extension. Excel
and CLI integration tests run only with an installed copy named by
DEERFLOW_TEST_SPATIAL_DIRECTORY.
Table names and SQL
- Lookup aliases and SQL table names are allocated together, for CSV files and Excel sheets. Neither may shadow an existing name, compared without case. Reserve a name only after its table was created.
- Bind file paths and sheet names as SQL values, and quote generated identifiers.
- User SQL is never rewritten with regular expressions. Original names resolve through connection-local temporary views over the canonical tables, also on a read-only cache hit. Normal CTE shadowing keeps working.
Cache
- Cache identity covers input order, file names and content digests. Moving the directory does not change it. Bump the namespace version when the table-mapping semantics change.
- Publish through
open_analysis_cache(). Build in a private directory, close the writer, reopen read-only, then atomically replace one manifest. Metadata is never published while a writer owns the database. - Validate the manifest and the physical tables before reuse. An invalid entry is rebuilt.
- Keep a generation when publication may have happened. Another process may be reading it. Concurrent cold builders can repeat work, and they never share a writable database.
- There is no automatic garbage collection and no power-loss guarantee.
Environment and exports
- Missing DuckDB or openpyxl prints setup instructions. The skill does not start an installer.
- Export paths resolve against the caller's working directory, also for a bare file name.
- Markdown export escapes headers and values the same way, and turns line
breaks into
<br>, so one result row stays one table row. - JSON export rejects duplicate column names before it opens the output file, and tells the caller to add SQL aliases. CSV and Markdown keep duplicates.
- At the CLI boundary a
ValueErrorbecomes a short stderr message and a non-zero exit. The connection closes infinally.