Skip to content

feat(neo4j): project analysis.json into a Neo4j property graph - #32

Closed
rahlk wants to merge 1 commit into
mainfrom
claude/python-codeanalyzer-neo4j-o2vwjh
Closed

feat(neo4j): project analysis.json into a Neo4j property graph#32
rahlk wants to merge 1 commit into
mainfrom
claude/python-codeanalyzer-neo4j-o2vwjh

Conversation

@rahlk

@rahlkrahlk commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Ports the codeanalyzer-typescript v0.4.0 Neo4j feature to Python, keeping the same CLI arg entrypoints. One in-memory analysis can now be emitted three ways via --emit: the canonical analysis.json (default), a Neo4j property graph, or the version-stamped schema contract.

Note: this PR was auto-created from the session working branch and duplicates #33 (same commit). Prefer #33; this one can be closed.

What's included

New codeanalyzer/neo4j/ package (mirrors src/build/neo4j/): catalog.py (schema source of truth), project.py (pure IR → graph rows), cypher.py (snapshot writer), bolt.py (incremental Bolt writer), rows.py / schema.py / emit.py.

CLI--emit {json,neo4j,schema}, --app-name, --neo4j-uri/-user/-password/-database. -i/--input optional for --emit schema.

Tests — always-on schema conformance guard + opt-in (RUN_CONTAINER_TESTS=1) Neo4j Testcontainers bolt integration test.

Packaging / release / docscurl | sh installer, release-asset publishing of schema.json + installer, README/CHANGELOG, schema-uml.drawio, version 0.2.0.

Verification

8/8 non-container tests pass (3 existing CLI + 5 schema). --emit schema and --emit neo4j exercised end-to-end.

Port the codeanalyzer-typescript v0.4.0 Neo4j feature to Python under the
neo4j feature branch, with the same CLI arg entrypoints.
- codeanalyzer/neo4j: catalog (schema source of truth), project (pure IR ->
graph rows), cypher snapshot writer, incremental Bolt writer, and the
output-agnostic rows intermediate. Lazy neo4j-driver import keeps it off the
default json path.
- CLI: --emit {json,neo4j,schema}, --app-name, --neo4j-uri/-user/-password/
-database; -i/--input now optional for --emit schema.
- --emit neo4j writes a self-contained graph.cypher, or pushes incrementally to
a live Neo4j over Bolt; --emit schema emits the version-stamped schema.json
contract (checked in as schema.neo4j.json).
- Tests: schema-conformance (always runs, anti-drift guard) + opt-in Neo4j
Testcontainers bolt integration test (RUN_CONTAINER_TESTS=1).
- packaging/install/codeanalyzer-installer.sh: curl|sh installer (uv/pipx/pip).
- release.yml: sync schema.neo4j.json + publish schema.json and installer as
release assets. README/CHANGELOG updates; schema-uml.drawio. Version 0.2.0.
@rahlk
rahlkforce-pushed the claude/python-codeanalyzer-neo4j-o2vwjh branch from 9943e1a to 1e5f3c9CompareJune 20, 2026 04:10
@rahlkrahlk closed this Jun 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@rahlk