fastapi-voyager 0.15.0__tar.gz → 0.15.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 (88) hide show
  1. fastapi_voyager-0.15.1/.githooks/README.md +48 -0
  2. fastapi_voyager-0.15.1/.githooks/pre-commit +29 -0
  3. fastapi_voyager-0.15.1/.prettierignore +33 -0
  4. fastapi_voyager-0.15.1/.prettierrc +11 -0
  5. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/PKG-INFO +16 -4
  6. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/README.md +15 -3
  7. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/docs/changelog.md +5 -0
  8. fastapi_voyager-0.15.1/package-lock.json +1186 -0
  9. fastapi_voyager-0.15.1/setup-hooks.sh +23 -0
  10. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/er_diagram.py +57 -109
  11. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/render.py +12 -2
  12. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/server.py +1 -0
  13. fastapi_voyager-0.15.1/src/fastapi_voyager/templates/dot/er_diagram.j2 +29 -0
  14. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/version.py +1 -1
  15. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/component/demo.js +5 -5
  16. fastapi_voyager-0.15.1/src/fastapi_voyager/web/component/render-graph.js +86 -0
  17. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/component/route-code-display.js +35 -37
  18. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/component/schema-code-display.js +50 -53
  19. fastapi_voyager-0.15.1/src/fastapi_voyager/web/graph-ui.js +202 -0
  20. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/graphviz.svg.css +10 -10
  21. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/graphviz.svg.js +306 -316
  22. fastapi_voyager-0.15.1/src/fastapi_voyager/web/icon/site.webmanifest +11 -0
  23. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/index.html +225 -109
  24. fastapi_voyager-0.15.1/src/fastapi_voyager/web/store.js +115 -0
  25. fastapi_voyager-0.15.1/src/fastapi_voyager/web/vue-main.js +588 -0
  26. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/demo.py +10 -6
  27. fastapi_voyager-0.15.0/src/fastapi_voyager/web/component/render-graph.js +0 -87
  28. fastapi_voyager-0.15.0/src/fastapi_voyager/web/graph-ui.js +0 -213
  29. fastapi_voyager-0.15.0/src/fastapi_voyager/web/icon/site.webmanifest +0 -1
  30. fastapi_voyager-0.15.0/src/fastapi_voyager/web/store.js +0 -119
  31. fastapi_voyager-0.15.0/src/fastapi_voyager/web/vue-main.js +0 -559
  32. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  33. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  34. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/.github/workflows/publish.yml +0 -0
  35. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/.gitignore +0 -0
  36. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/.python-version +0 -0
  37. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/CONTRIBUTING.md +0 -0
  38. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/LICENSE +0 -0
  39. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/docs/claude/0_REFACTORING_RENDER_NOTES.md +0 -0
  40. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/docs/idea.md +0 -0
  41. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/pyproject.toml +0 -0
  42. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/release.md +0 -0
  43. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/__init__.py +0 -0
  44. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/cli.py +0 -0
  45. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/filter.py +0 -0
  46. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/module.py +0 -0
  47. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/pydantic_resolve_util.py +0 -0
  48. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/render_style.py +0 -0
  49. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/cluster.j2 +0 -0
  50. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/cluster_container.j2 +0 -0
  51. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/digraph.j2 +0 -0
  52. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/link.j2 +0 -0
  53. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/route_node.j2 +0 -0
  54. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/schema_node.j2 +0 -0
  55. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/dot/tag_node.j2 +0 -0
  56. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/html/colored_text.j2 +0 -0
  57. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/html/pydantic_meta.j2 +0 -0
  58. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/html/schema_field_row.j2 +0 -0
  59. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/html/schema_header.j2 +0 -0
  60. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/templates/html/schema_table.j2 +0 -0
  61. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/type.py +0 -0
  62. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/type_helper.py +0 -0
  63. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/voyager.py +0 -0
  64. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/icon/android-chrome-192x192.png +0 -0
  65. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/icon/android-chrome-512x512.png +0 -0
  66. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/icon/apple-touch-icon.png +0 -0
  67. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/icon/favicon-16x16.png +0 -0
  68. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/icon/favicon-32x32.png +0 -0
  69. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/icon/favicon.ico +0 -0
  70. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/quasar.min.css +0 -0
  71. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/src/fastapi_voyager/web/quasar.min.js +0 -0
  72. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/__init__.py +0 -0
  73. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/demo_anno.py +0 -0
  74. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/programatic.py +0 -0
  75. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/service/__init__.py +0 -0
  76. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/service/schema/__init__.py +0 -0
  77. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/service/schema/base_entity.py +0 -0
  78. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/service/schema/extra.py +0 -0
  79. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/service/schema/schema.py +0 -0
  80. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_analysis.py +0 -0
  81. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_filter.py +0 -0
  82. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_generic.py +0 -0
  83. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_import.py +0 -0
  84. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_module.py +0 -0
  85. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_resolve_util_impl.py +0 -0
  86. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/tests/test_type_helper.py +0 -0
  87. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/uv.lock +0 -0
  88. {fastapi_voyager-0.15.0 → fastapi_voyager-0.15.1}/voyager.jpg +0 -0
@@ -0,0 +1,48 @@
1
+ # Git Hooks Setup
2
+
3
+ This repository uses Git hooks to automatically format code with Prettier before each commit.
4
+
5
+ ## One-time Setup
6
+
7
+ After cloning the repository, run this command to enable the hooks:
8
+
9
+ ```bash
10
+ git config core.hooksPath .githooks
11
+ ```
12
+
13
+ That's it! The hooks will now run automatically before each commit.
14
+
15
+ ## What it does
16
+
17
+ The `pre-commit` hook will:
18
+ - Automatically run `npx prettier --write .` before each commit
19
+ - Format all supported files (JS, CSS, HTML, JSON, Markdown)
20
+ - Stage the formatted files automatically
21
+ - Continue with the commit
22
+
23
+ ## Skip the hook (if needed)
24
+
25
+ If you need to skip the formatting for a particular commit:
26
+
27
+ ```bash
28
+ git commit --no-verify -m "your message"
29
+ ```
30
+
31
+ ## Troubleshooting
32
+
33
+ ### Hook not running?
34
+
35
+ Check if the hooks path is set correctly:
36
+
37
+ ```bash
38
+ git config core.hooksPath
39
+ # Should output: .githooks
40
+ ```
41
+
42
+ ### npx not found?
43
+
44
+ Make sure Node.js and npm are installed:
45
+ ```bash
46
+ node --version
47
+ npm --version
48
+ ```
@@ -0,0 +1,29 @@
1
+ #!/bin/sh
2
+ # Git pre-commit hook to run Prettier on staged files
3
+
4
+ # Get the project root directory using Git command (works in all shells)
5
+ PROJECT_ROOT="$(git rev-parse --show-toplevel)"
6
+ cd "$PROJECT_ROOT" || exit 1
7
+
8
+ # Check if npx is available
9
+ if ! command -v npx >/dev/null 2>&1; then
10
+ echo "Warning: npx not found. Skipping Prettier formatting."
11
+ echo "Please install Node.js and npm to use pre-commit formatting."
12
+ exit 0
13
+ fi
14
+
15
+ echo "Running Prettier on staged files..."
16
+
17
+ # Check if .prettierignore exists and run prettier
18
+ if [ -f "$PROJECT_ROOT/.prettierignore" ]; then
19
+ echo "Found .prettierignore, applying rules..."
20
+ npx prettier --write . --log-level=warn --ignore-path="$PROJECT_ROOT/.prettierignore"
21
+ else
22
+ echo "No .prettierignore found, formatting all files..."
23
+ npx prettier --write . --log-level=warn
24
+ fi
25
+
26
+ # Add any newly formatted files to the staging area
27
+ git add .
28
+
29
+ echo "Prettier formatting complete."
@@ -0,0 +1,33 @@
1
+ # Dependencies
2
+ node_modules/
3
+ .venv/
4
+ __pycache__/
5
+ *.pyc
6
+
7
+ # Build outputs
8
+ dist/
9
+ build/
10
+ *.egg-info/
11
+
12
+ # Static assets
13
+ *.min.js
14
+ *.min.css
15
+
16
+ # Generated files
17
+ package-lock.json
18
+ yarn.lock
19
+ pnpm-lock.yaml
20
+
21
+ # Cache
22
+ .ruff_cache/
23
+ .pytest_cache/
24
+ .vscode/
25
+
26
+ # Git
27
+ .git/
28
+ .github/
29
+
30
+ # Misc
31
+ *.md
32
+ .env
33
+ .env.*
@@ -0,0 +1,11 @@
1
+ {
2
+ "semi": false,
3
+ "singleQuote": false,
4
+ "tabWidth": 2,
5
+ "useTabs": false,
6
+ "trailingComma": "es5",
7
+ "printWidth": 100,
8
+ "arrowParens": "always",
9
+ "endOfLine": "lf",
10
+ "htmlWhitespaceSensitivity": "css"
11
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-voyager
3
- Version: 0.15.0
3
+ Version: 0.15.1
4
4
  Summary: Visualize FastAPI application's routing tree and dependencies
5
5
  Project-URL: Homepage, https://github.com/allmonday/fastapi-voyager
6
6
  Project-URL: Source, https://github.com/allmonday/fastapi-voyager
@@ -232,13 +232,25 @@ uv pip install ".[dev]"
232
232
  uvicorn tests.programatic:app --reload
233
233
  ```
234
234
 
235
+ ### Setup Git Hooks (Optional)
236
+
237
+ Enable automatic code formatting before commits:
238
+
239
+ ```shell
240
+ ./setup-hooks.sh
241
+ # or manually:
242
+ git config core.hooksPath .githooks
243
+ ```
244
+
245
+ This will run Prettier automatically before each commit. See [`.githooks/README.md`](./.githooks/README.md) for details.
246
+
235
247
  open `localhost:8000/voyager`
236
248
 
237
249
 
238
- frontend:
239
- - `src/web/vue-main.js`: main js
250
+ frontend:
251
+ - `src/fastapi_voyager/web/vue-main.js`: main js
240
252
 
241
- backend:
253
+ backend:
242
254
  - `voyager.py`: main entry
243
255
  - `render.py`: generate dot file
244
256
  - `server.py`: serve mode
@@ -203,13 +203,25 @@ uv pip install ".[dev]"
203
203
  uvicorn tests.programatic:app --reload
204
204
  ```
205
205
 
206
+ ### Setup Git Hooks (Optional)
207
+
208
+ Enable automatic code formatting before commits:
209
+
210
+ ```shell
211
+ ./setup-hooks.sh
212
+ # or manually:
213
+ git config core.hooksPath .githooks
214
+ ```
215
+
216
+ This will run Prettier automatically before each commit. See [`.githooks/README.md`](./.githooks/README.md) for details.
217
+
206
218
  open `localhost:8000/voyager`
207
219
 
208
220
 
209
- frontend:
210
- - `src/web/vue-main.js`: main js
221
+ frontend:
222
+ - `src/fastapi_voyager/web/vue-main.js`: main js
211
223
 
212
- backend:
224
+ backend:
213
225
  - `voyager.py`: main entry
214
226
  - `render.py`: generate dot file
215
227
  - `server.py`: serve mode
@@ -156,6 +156,11 @@
156
156
  - 0.15.0
157
157
  - [x] refactor render.py
158
158
  - 0.15.1
159
+ - [x] add prettier (npx prettier --write .) and pre-commit hooks
160
+ - [x] add localstorage for toggle items
161
+ - [x] refactor er diagram renderer
162
+ - [x] fix error in search function
163
+ - 0.15.2
159
164
  - [ ] add tests
160
165
  - [ ] left panel can be toggled.
161
166
  - [ ] refactor vue-main.js, move methods to store