diff --git a/CHANGELOG.md b/CHANGELOG.md index 07055fc..1a02755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.6.2] - 2026-10-14 ### Fixed diff --git a/README.md b/README.md index 9fd4ef5..e3880fa 100644 --- a/README.md +++ b/README.md @@ -159,205 +159,134 @@ $ canpy --help Static Analysis on Python source code using Jedi and Tree sitter. -╭─ Options ────────────────────────────────────────────────────────────────────╮ -│ --version Show the canpy │ -│ version and │ -│ exit. │ -│ --input -i Path to the │ -│ project root │ -│ directory (not │ -│ required for │ -│ --emit schema). │ -│ --output -o Output directory │ -│ for artifacts. │ -│ --emit json │ -│ (analysis.json, │ -│ default) | neo4j │ -│ (graph.cypher or │ -│ live Bolt push) │ -│ | schema (the │ -│ Neo4j │ -│ schema.json │ -│ contract). │ -│ [default: json] │ -│ --app-name Logical │ -│ application name │ -│ for the graph │ -│ :PyApplication │ -│ anchor (default: │ -│ input dir name). │ -│ --neo4j-uri Push the graph │ -│ to a live Neo4j │ -│ over Bolt │ -│ (incremental); │ -│ omit to write │ -│ graph.cypher. │ -│ [env var: │ -│ NEO4J_URI] │ -│ --neo4j-user Neo4j username. │ -│ [env var: │ -│ NEO4J_USERNAME] │ -│ [default: neo4j] │ -│ --neo4j-password Neo4j password. │ -│ Prefer the env │ -│ var over the │ -│ flag (the flag │ -│ is visible in │ -│ shell history / │ -│ process list). │ -│ [env var: │ -│ NEO4J_PASSWORD] │ -│ [default: neo4j] │ -│ --neo4j-database Neo4j database │ -│ name (default: │ -│ server default). │ -│ [env var: │ -│ NEO4J_DATABASE] │ -│ --analysis-level -a Analysis depth: │ -│ [1<=x<=4] 1=symbol │ -│ table+Jedi call │ -│ graph, │ -│ 2=+defuse-linker │ -│ call graph, │ -│ 3=+native │ -│ intraprocedural │ -│ dataflow │ -│ (CFG/PDG), │ -│ 4=+interprocedu… │ -│ SDG │ -│ (param/summary │ -│ edges, │ -│ alias-aware │ -│ DDG). │ -│ [default: (1)] │ -│ --graphs Level 3+ only: │ -│ comma-separated │ -│ program-graph │ -│ sections to emit │ -│ (cfg, dfg, pdg, │ -│ sdg). Default: │ -│ cfg,dfg,pdg. │ -│ `dfg` emits the │ -│ PDG's data edges │ -│ only; `sdg` │ -│ requires -a 4. │ -│ Incompatible │ -│ with --emit │ -│ neo4j (always │ -│ full-depth). │ -│ [default: │ -│ (cfg,dfg,pdg)] │ -│ --graph-field-de… Level 3 only: │ -│ [x>=1] k-limit on │ -│ access-path │ -│ depth (x.f.g.h │ -│ with k=3 becomes │ -│ x.f.g.*). │ -│ Mandatory bound │ -│ — it is what │ -│ guarantees the │ -│ interprocedural │ -│ fixpoint │ -│ terminates. │ -│ [default: 3] │ -│ --ray --no-ray Enable Ray for │ -│ distributed │ -│ analysis. │ -│ [default: │ -│ no-ray] │ -│ --eager --lazy Enable eager or │ -│ lazy analysis. │ -│ Defaults to │ -│ lazy. Also gates │ -│ every │ -│ destructive step │ -│ of a '--emit │ -│ neo4j' Bolt │ -│ push: a lazy │ -│ push only adds │ -│ and updates, an │ -│ eager one also │ -│ removes │ -│ declarations and │ -│ edges the source │ -│ no longer has. │ -│ [default: lazy] │ -│ --skip-tests --include-tests Skip test files │ -│ in analysis. │ -│ [default: │ -│ skip-tests] │ -│ --no-venv --venv Skip virtualenv │ -│ creation and │ -│ dependency │ -│ installation; │ -│ resolve imports │ -│ against the │ -│ ambient Python │ -│ environment │ -│ instead. │ -│ [default: venv] │ -│ --resolve-instal… Additionally │ -│ bind imports via │ -│ the project │ -│ venv's installed │ -│ metadata │ -│ (*.dist-info); │ -│ output becomes │ -│ machine-depende… │ -│ (prov: │ -│ installed-metad… │ -│ --file-name Analyze only the │ -│ specified file │ -│ (relative to │ -│ input │ -│ directory). │ -│ --cache-dir -c Directory to │ -│ store analysis │ -│ cache. Defaults │ -│ to │ -│ '.codeanalyzer' │ -│ in the input │ -│ directory. │ -│ --clear-cache --keep-cache Clear cache │ -│ after analysis. │ -│ By default, │ -│ cache is │ -│ retained. │ -│ [default: │ -│ keep-cache] │ -│ -v Increase │ -│ verbosity: -v, │ -│ -vv, -vvv │ -│ [default: 0] │ -│ --entrypoint-rul… Extra entrypoint │ -│ rules file │ -│ (YAML). │ -│ Repeatable; │ -│ merges with the │ -│ shipped rules. A │ -│ malformed file │ -│ is an error. │ -│ --artifact-text --no-artifact-… Capture verbatim │ -│ `source` text on │ -│ discovered │ -│ artifacts. │ -│ `source` is the │ -│ whole file; │ -│ --no-artifact-t… │ -│ empties it │ -│ everywhere │ -│ (inventory │ -│ unchanged). │ -│ sha256/size_byt… │ -│ always reflect │ -│ the full file. │ -│ [default: │ -│ artifact-text] │ -│ --help Show this │ -│ message and │ -│ exit. │ -╰──────────────────────────────────────────────────────────────────────────────╯ +╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮ +│ --version Show the canpy version and │ +│ exit. │ +│ --input -i Path to the project root │ +│ directory (not required │ +│ for --emit schema). │ +│ --output -o Output directory for │ +│ artifacts. │ +│ --emit Output target: json │ +│ (analysis.json, default) | │ +│ neo4j (graph.cypher or │ +│ live Bolt push) | schema │ +│ (the Neo4j schema.json │ +│ contract). │ +│ [default: json] │ +│ --app-name Logical application name │ +│ for the graph │ +│ :PyApplication anchor │ +│ (default: input dir name). │ +│ --neo4j-uri Push the graph to a live │ +│ Neo4j over Bolt │ +│ (incremental); omit to │ +│ write graph.cypher. │ +│ [env var: NEO4J_URI] │ +│ --neo4j-user Neo4j username. │ +│ [env var: NEO4J_USERNAME] │ +│ [default: neo4j] │ +│ --neo4j-password Neo4j password. Prefer the │ +│ env var over the flag (the │ +│ flag is visible in shell │ +│ history / process list). │ +│ [env var: NEO4J_PASSWORD] │ +│ [default: neo4j] │ +│ --neo4j-database Neo4j database name │ +│ (default: server default). │ +│ [env var: NEO4J_DATABASE] │ +│ --analysis-level -a [1<=x<=4] Analysis depth: 1=symbol │ +│ table+Jedi call graph, │ +│ 2=+defuse-linker call │ +│ graph, 3=+native │ +│ intraprocedural dataflow │ +│ (CFG/PDG), │ +│ 4=+interprocedural SDG │ +│ (param/summary edges, │ +│ alias-aware DDG). │ +│ [default: (1)] │ +│ --graphs Level 3+ only: │ +│ comma-separated │ +│ program-graph sections to │ +│ emit (cfg, dfg, pdg, sdg). │ +│ Default: cfg,dfg,pdg. │ +│ `dfg` emits the PDG's data │ +│ edges only; `sdg` requires │ +│ -a 4. Incompatible with │ +│ --emit neo4j (always │ +│ full-depth). │ +│ [default: (cfg,dfg,pdg)] │ +│ --graph-field-depth [x>=1] Level 3 only: k-limit on │ +│ access-path depth (x.f.g.h │ +│ with k=3 becomes x.f.g.*). │ +│ Mandatory bound — it is │ +│ what guarantees the │ +│ interprocedural fixpoint │ +│ terminates. │ +│ [default: 3] │ +│ --ray --no-ray Enable Ray for distributed │ +│ analysis. │ +│ [default: no-ray] │ +│ --eager --lazy Enable eager or lazy │ +│ analysis. Defaults to │ +│ lazy. Also gates every │ +│ destructive step of a │ +│ '--emit neo4j' Bolt push: │ +│ a lazy push only adds and │ +│ updates, an eager one also │ +│ removes declarations and │ +│ edges the source no longer │ +│ has. │ +│ [default: lazy] │ +│ --skip-tests --include-tests Skip test files in │ +│ analysis. │ +│ [default: skip-tests] │ +│ --no-venv --venv Skip virtualenv creation │ +│ and dependency │ +│ installation; resolve │ +│ imports against the │ +│ ambient Python environment │ +│ instead. │ +│ [default: venv] │ +│ --resolve-installed Additionally bind imports │ +│ via the project venv's │ +│ installed metadata │ +│ (*.dist-info); output │ +│ becomes machine-dependent │ +│ (prov: │ +│ installed-metadata). │ +│ --file-name Analyze only the specified │ +│ file (relative to input │ +│ directory). │ +│ --cache-dir -c Directory to store │ +│ analysis cache. Defaults │ +│ to '.codeanalyzer' in the │ +│ input directory. │ +│ --clear-cache --keep-cache Clear cache after │ +│ analysis. By default, │ +│ cache is retained. │ +│ [default: keep-cache] │ +│ -v Increase verbosity: -v, │ +│ -vv, -vvv │ +│ [default: 0] │ +│ --entrypoint-rules Extra entrypoint rules │ +│ file (YAML). Repeatable; │ +│ merges with the shipped │ +│ rules. A malformed file is │ +│ an error. │ +│ --artifact-text --no-artifact-text Capture verbatim `source` │ +│ text on discovered │ +│ artifacts. `source` is the │ +│ whole file; │ +│ --no-artifact-text empties │ +│ it everywhere (inventory │ +│ unchanged). │ +│ sha256/size_bytes always │ +│ reflect the full file. │ +│ [default: artifact-text] │ +│ --help Show this message and │ +│ exit. │ +╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` diff --git a/pyproject.toml b/pyproject.toml index 4642463..c86a098 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "codeanalyzer-python" -version = "1.6.1" +version = "1.6.2" description = "Static analysis for Python — canonical schema v2 (symbol table, call graph, and native CFG/PDG/SDG dataflow) as analysis.json or a Neo4j property graph." readme = "README.md" authors = [