deputy sync¶
Scans Python and Java source files, parses them with deproc, and indexes all discovered entities.
Usage¶
Options¶
| Flag | Description |
|---|---|
--force / -f |
Re-parses every project file regardless of content hash. Does not touch dependencies |
--force-deps |
Re-indexes every dependency package even if its version and install time are unchanged. Turns dependency sync on for this run. Cannot be combined with --no-sync-deps |
--sync-deps |
Also index packages from the project's .venv |
--no-sync-deps |
Skip dependency indexing even if sync_deps=true in config |
Behaviour¶
- Incremental by default: only files whose content hash changed since the last sync are re-parsed.
- Configured roots: besides the project directory,
deputy syncindexes the directories insource_roots,generated_roots,declaration_rootsanddependency_roots, and appliesanalysis_languages,analysis_extensionsandanalysis_exclusions. See Analysis roots. --sync-depsindexes each dependency package's top-level modules as separate entities tagged withsource: "dependency". Editable (path-based) dependencies are followed to their source directories.- Full rebuild:
deputy sync --force --force-depsre-parses every project file and re-indexes every dependency package. - Dependency config: can also be set persistently via
deputy config sync_deps true. The--sync-deps/--no-sync-depsflag overrides it for a single run. Async_depsvalue stored in the database is not read. This also applies whenauto_syncruns a sync beforesearchorinfo. - Which environment: deputy uses
venv_pathfrom.deputyconfigif that directory containspyvenv.cfg, then$VIRTUAL_ENV, then<project>/.venv. - Packages without
top_level.txt: only packages that ship atop_level.txtin their.dist-infodirectory get entities. Other installed packages are recorded in thedependenciestable but contribute no entities.
Excluded paths¶
The following are always excluded from discovery and linking:
__pycache__/*.egg-info,*.dist-infonode_modules/.git/,.venv/,.mypy_cache/,.pytest_cache/build/,dist/