node-walk 0.2.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. node_walk-0.3.1/.github/workflows/release.yml +142 -0
  2. {node_walk-0.2.0 → node_walk-0.3.1}/CHANGELOG.md +8 -0
  3. {node_walk-0.2.0 → node_walk-0.3.1}/PKG-INFO +11 -1
  4. {node_walk-0.2.0 → node_walk-0.3.1}/README.md +10 -0
  5. node_walk-0.3.1/plans/binding-and-receiver-resolution-plan.md +629 -0
  6. node_walk-0.3.1/plans/graph-explorer-ux-plan.md +746 -0
  7. node_walk-0.3.1/plans/relationship-resolution-redesign.md +1330 -0
  8. {node_walk-0.2.0 → node_walk-0.3.1}/pyproject.toml +5 -2
  9. node_walk-0.3.1/src/node_walk/__init__.py +8 -0
  10. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/python/analyzer.py +1 -0
  11. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/python/scope.py +7 -1
  12. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/python/visitor.py +294 -39
  13. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/indexer.py +122 -6
  14. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/ir/enums.py +20 -0
  15. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/ir/models.py +36 -1
  16. node_walk-0.3.1/src/node_walk/resolution/__init__.py +7 -0
  17. node_walk-0.3.1/src/node_walk/resolution/base.py +79 -0
  18. node_walk-0.3.1/src/node_walk/resolution/bindings.py +105 -0
  19. node_walk-0.3.1/src/node_walk/resolution/calls.py +330 -0
  20. node_walk-0.3.1/src/node_walk/resolution/imports.py +71 -0
  21. node_walk-0.3.1/src/node_walk/resolution/inheritance.py +93 -0
  22. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/storage/base.py +38 -2
  23. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/storage/schema.py +29 -1
  24. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/storage/sqlite_store.py +149 -2
  25. node_walk-0.3.1/src/node_walk/web/app.js +1177 -0
  26. node_walk-0.3.1/src/node_walk/web/index.html +350 -0
  27. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/web/server.py +45 -4
  28. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/web/style.css +475 -90
  29. node_walk-0.3.1/tests/test_indexer.py +151 -0
  30. {node_walk-0.2.0 → node_walk-0.3.1}/tests/test_python_analyzer.py +15 -22
  31. node_walk-0.3.1/tests/test_resolution.py +30 -0
  32. node_walk-0.3.1/tests/test_resolution_bindings.py +90 -0
  33. {node_walk-0.2.0 → node_walk-0.3.1}/tests/test_storage.py +52 -0
  34. {node_walk-0.2.0 → node_walk-0.3.1}/tests/test_web_server.py +4 -3
  35. node_walk-0.2.0/.github/workflows/release.yml +0 -158
  36. node_walk-0.2.0/src/node_walk/__init__.py +0 -3
  37. node_walk-0.2.0/src/node_walk/web/app.js +0 -704
  38. node_walk-0.2.0/src/node_walk/web/index.html +0 -157
  39. {node_walk-0.2.0 → node_walk-0.3.1}/.github/workflows/ci.yml +0 -0
  40. {node_walk-0.2.0 → node_walk-0.3.1}/.gitignore +0 -0
  41. {node_walk-0.2.0 → node_walk-0.3.1}/LICENSE +0 -0
  42. {node_walk-0.2.0 → node_walk-0.3.1}/plans/plan.md +0 -0
  43. {node_walk-0.2.0 → node_walk-0.3.1}/plans/traversable-graph.md +0 -0
  44. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/__init__.py +0 -0
  45. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/base.py +0 -0
  46. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/python/__init__.py +0 -0
  47. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/analysis/python_analyzer.py +0 -0
  48. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/cli/__init__.py +0 -0
  49. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/cli/main.py +0 -0
  50. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/ir/__init__.py +0 -0
  51. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/query/__init__.py +0 -0
  52. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/query/engine.py +0 -0
  53. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/query/tree_formatter.py +0 -0
  54. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/storage/__init__.py +0 -0
  55. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/storage/repository.py +0 -0
  56. {node_walk-0.2.0 → node_walk-0.3.1}/src/node_walk/web/__init__.py +0 -0
  57. {node_walk-0.2.0 → node_walk-0.3.1}/tests/fixtures/nested_project/base.py +0 -0
  58. {node_walk-0.2.0 → node_walk-0.3.1}/tests/fixtures/nested_project/impl.py +0 -0
  59. {node_walk-0.2.0 → node_walk-0.3.1}/tests/fixtures/simple_project/services.py +0 -0
  60. {node_walk-0.2.0 → node_walk-0.3.1}/tests/test_ir.py +0 -0
  61. {node_walk-0.2.0 → node_walk-0.3.1}/tests/test_query_engine.py +0 -0
@@ -0,0 +1,142 @@
1
+ name: Release & Publish
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ bump_type:
7
+ description: "Version bump type"
8
+ required: true
9
+ default: "patch"
10
+ type: choice
11
+ options:
12
+ - "patch"
13
+ - "minor"
14
+ - "major"
15
+ target:
16
+ description: "Publish destination"
17
+ required: true
18
+ default: "pypi"
19
+ type: choice
20
+ options:
21
+ - "pypi"
22
+ - "testpypi"
23
+
24
+ permissions:
25
+ contents: write
26
+ id-token: write
27
+
28
+ jobs:
29
+ release:
30
+ name: Auto-bump, Tag, Build & Publish
31
+ runs-on: ubuntu-latest
32
+ environment:
33
+ name: ${{ inputs.target == 'testpypi' && 'testpypi' || 'pypi' }}
34
+ url: ${{ inputs.target == 'testpypi' && 'https://test.pypi.org/project/node-walk/' || 'https://pypi.org/project/node-walk/' }}
35
+ steps:
36
+ - name: Generate GitHub App Token
37
+ id: app_token
38
+ uses: actions/create-github-app-token@v1
39
+ with:
40
+ app-id: ${{ secrets.RELEASE_APP_ID }}
41
+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
42
+
43
+ - name: Check out repository
44
+ uses: actions/checkout@v4
45
+ with:
46
+ fetch-depth: 0
47
+ token: ${{ steps.app_token.outputs.token }}
48
+
49
+ - name: Set up Python
50
+ uses: actions/setup-python@v5
51
+ with:
52
+ python-version: "3.11"
53
+
54
+ - name: Install build tools
55
+ run: |
56
+ python -m pip install --upgrade pip
57
+ pip install build hatchling hatch-vcs
58
+
59
+ - name: Calculate Version, Update Changelog & Create Tag
60
+ id: auto_tag
61
+ run: |
62
+ python - << 'EOF'
63
+ import os, re, subprocess, datetime
64
+
65
+ bump = os.environ.get("INPUT_BUMP_TYPE", "patch")
66
+
67
+ # 1. Find latest git tag
68
+ try:
69
+ latest_tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"], text=True).strip()
70
+ except Exception:
71
+ latest_tag = "v0.1.0"
72
+
73
+ current_ver = latest_tag.lstrip("v")
74
+ parts = [int(p) for p in re.findall(r'\d+', current_ver)]
75
+ while len(parts) < 3:
76
+ parts.append(0)
77
+
78
+ # 2. Calculate target version
79
+ if bump == "major":
80
+ target_ver = f"{parts[0]+1}.0.0"
81
+ elif bump == "minor":
82
+ target_ver = f"{parts[0]}.{parts[1]+1}.0"
83
+ else:
84
+ target_ver = f"{parts[0]}.{parts[1]}.{parts[2]+1}"
85
+
86
+ new_tag = f"v{target_ver}"
87
+ today = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d")
88
+
89
+ print(f"Release version: {target_ver} (from {current_ver} via {bump} bump)")
90
+
91
+ # 3. Update CHANGELOG.md automatically
92
+ changelog_path = "CHANGELOG.md"
93
+ if os.path.exists(changelog_path):
94
+ with open(changelog_path, "r", encoding="utf-8") as f:
95
+ content = f.read()
96
+
97
+ replacement = f"## [Unreleased]\n\n---\n\n## [{target_ver}] - {today}"
98
+ if "## [Unreleased]" in content:
99
+ new_content = content.replace("## [Unreleased]", replacement, 1)
100
+ with open(changelog_path, "w", encoding="utf-8") as f:
101
+ f.write(new_content)
102
+ print(f"Updated {changelog_path} with header [{target_ver}] - {today}")
103
+
104
+ # 4. Configure git bot, commit changelog, and push tag + commit
105
+ subprocess.run(["git", "config", "user.name", "github-actions[bot]"], check=True)
106
+ subprocess.run(["git", "config", "user.email", "github-actions[bot]@users.noreply.github.com"], check=True)
107
+
108
+ # Commit CHANGELOG update
109
+ subprocess.run(["git", "add", "CHANGELOG.md"], check=True)
110
+ subprocess.run(["git", "commit", "-m", f"chore(release): release {new_tag} [skip ci]"], check=True)
111
+
112
+ # Tag the commit
113
+ subprocess.run(["git", "tag", "-a", new_tag, "-m", f"Release {new_tag}"], check=True)
114
+
115
+ # Push commit and tag back to repository
116
+ branch = os.environ.get("GITHUB_REF_NAME", "main")
117
+ subprocess.run(["git", "push", "origin", f"HEAD:{branch}"], check=True)
118
+ subprocess.run(["git", "push", "origin", new_tag], check=True)
119
+
120
+ with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as out:
121
+ out.write(f"version={target_ver}\n")
122
+ out.write(f"tag={new_tag}\n")
123
+ EOF
124
+ env:
125
+ INPUT_BUMP_TYPE: ${{ inputs.bump_type }}
126
+
127
+ - name: Build package distributions
128
+ run: python -m build
129
+
130
+ - name: Publish to PyPI
131
+ uses: pypa/gh-action-pypi-publish@release/v1
132
+ with:
133
+ repository-url: ${{ (inputs.target == 'testpypi') && 'https://test.pypi.org/legacy/' || '' }}
134
+ skip-existing: true
135
+
136
+ - name: Create GitHub Release
137
+ uses: softprops/action-gh-release@v2
138
+ with:
139
+ token: ${{ steps.app_token.outputs.token }}
140
+ tag_name: ${{ steps.auto_tag.outputs.tag }}
141
+ files: dist/*
142
+ generate_release_notes: true
@@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ---
13
13
 
14
+ ## [0.3.1] - 2026-08-25
15
+
16
+ ---
17
+
18
+ ## [0.3.0] - 2026-08-23
19
+
20
+ ---
21
+
14
22
  ## [0.2.0] - 2026-08-23
15
23
  ### Added
16
24
  - **`node-walk serve` command**: Launches an embedded local HTTP server (`localhost:7777` by default) and auto-opens the browser to the interactive graph explorer. Accepts `--port`, `--host`, and `--no-open` flags.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: node-walk
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: Semantic code intelligence — local-first graph of your codebase for humans and LLMs
5
5
  Author: CodeGraph Contributors
6
6
  License: MIT
@@ -163,6 +163,16 @@ pytest tests/ -v
163
163
 
164
164
  ---
165
165
 
166
+ ## Release Automation Setup
167
+
168
+ The `Release & Publish` workflow can push release commits/tags to `main`.
169
+
170
+ If your repository ruleset requires pull requests for `main`, create a `RELEASE_PUSH_TOKEN` secret with a PAT from a user/app that is explicitly allowed to bypass that ruleset, then add that actor to the ruleset bypass list.
171
+
172
+ If `RELEASE_PUSH_TOKEN` is not set, the workflow falls back to `GITHUB_TOKEN`.
173
+
174
+ ---
175
+
166
176
  ## Graph Storage & Lifecycle
167
177
 
168
178
  The generated graph is stored in `.node_walk/graph.db` inside your indexed repository. It is disposable and can be re-indexed at any time with `node-walk index .`.
@@ -139,6 +139,16 @@ pytest tests/ -v
139
139
 
140
140
  ---
141
141
 
142
+ ## Release Automation Setup
143
+
144
+ The `Release & Publish` workflow can push release commits/tags to `main`.
145
+
146
+ If your repository ruleset requires pull requests for `main`, create a `RELEASE_PUSH_TOKEN` secret with a PAT from a user/app that is explicitly allowed to bypass that ruleset, then add that actor to the ruleset bypass list.
147
+
148
+ If `RELEASE_PUSH_TOKEN` is not set, the workflow falls back to `GITHUB_TOKEN`.
149
+
150
+ ---
151
+
142
152
  ## Graph Storage & Lifecycle
143
153
 
144
154
  The generated graph is stored in `.node_walk/graph.db` inside your indexed repository. It is disposable and can be re-indexed at any time with `node-walk index .`.