dataform-dependency-visualizer 0.1.0__tar.gz → 0.2.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 (19) hide show
  1. {dataform_dependency_visualizer-0.1.0/src/dataform_dependency_visualizer.egg-info → dataform_dependency_visualizer-0.2.1}/PKG-INFO +168 -170
  2. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/README_PACKAGE.md +2 -2
  3. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/pyproject.toml +20 -20
  4. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/src/dataform_viz/cli.py +33 -0
  5. dataform_dependency_visualizer-0.2.1/src/dataform_viz/dataform_check.py +357 -0
  6. dataform_dependency_visualizer-0.1.0/PKG-INFO +0 -170
  7. dataform_dependency_visualizer-0.1.0/README.md +0 -144
  8. dataform_dependency_visualizer-0.1.0/setup.cfg +0 -4
  9. dataform_dependency_visualizer-0.1.0/src/dataform_dependency_visualizer.egg-info/SOURCES.txt +0 -16
  10. dataform_dependency_visualizer-0.1.0/src/dataform_dependency_visualizer.egg-info/dependency_links.txt +0 -1
  11. dataform_dependency_visualizer-0.1.0/src/dataform_dependency_visualizer.egg-info/entry_points.txt +0 -2
  12. dataform_dependency_visualizer-0.1.0/src/dataform_dependency_visualizer.egg-info/top_level.txt +0 -1
  13. dataform_dependency_visualizer-0.1.0/src/dataform_viz/dataform_check.py +0 -175
  14. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/LICENSE +0 -0
  15. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/src/dataform_viz/__init__.py +0 -0
  16. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/src/dataform_viz/master_index.py +0 -0
  17. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/src/dataform_viz/parser.py +0 -0
  18. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/src/dataform_viz/svg_generator.py +0 -0
  19. {dataform_dependency_visualizer-0.1.0 → dataform_dependency_visualizer-0.2.1}/src/dataform_viz/visualizer.py +0 -0
@@ -1,170 +1,168 @@
1
- Metadata-Version: 2.4
2
- Name: dataform-dependency-visualizer
3
- Version: 0.1.0
4
- Summary: Visualize Dataform table dependencies as interactive SVG diagrams
5
- Author-email: Thamo <thamo@example.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/thamo/dataform-dependency-visualizer
8
- Project-URL: Repository, https://github.com/thamo/dataform-dependency-visualizer
9
- Keywords: dataform,dependencies,visualization,bigquery,sql
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Classifier: Topic :: Database
21
- Requires-Python: >=3.8
22
- Description-Content-Type: text/markdown
23
- License-File: LICENSE
24
- Dynamic: license-file
25
-
26
- # Dataform Dependency Visualizer
27
-
28
- Generate beautiful, interactive SVG diagrams showing dependencies between Dataform tables.
29
-
30
- ## Features
31
-
32
- - 📊 **Individual table diagrams** - One SVG per table showing immediate dependencies
33
- - 🎨 **Color-coded by type** - Tables, views, and operations visually distinct
34
- - 🔍 **Master index viewer** - Browse all tables in single interface
35
- - 📁 **Schema organization** - Organized by schema with collapsible sections
36
- - ⚡ **Pure Python SVGs** - No Graphviz required
37
- - 🎯 **Orthogonal routing** - Clean, professional arrow paths
38
- - 📝 **Smart text wrapping** - Long table names split across lines
39
-
40
- ## Installation
41
-
42
- ```bash
43
- pip install dataform-dependency-visualizer
44
- ```
45
-
46
- ## Quick Start
47
-
48
- ### 1. Generate dependency report
49
-
50
- In your Dataform project directory:
51
-
52
- ```bash
53
- dataform compile --json > dependencies_report.txt
54
- ```
55
-
56
- ### 2. Generate SVG diagrams
57
-
58
- ```bash
59
- # Generate for specific schema
60
- dataform-deps generate dashboard_wwim
61
-
62
- # Generate for all schemas (excluding refined_*)
63
- dataform-deps generate-all
64
-
65
- # Generate master index
66
- dataform-deps index
67
- ```
68
-
69
- ### 3. View diagrams
70
-
71
- Open `output/dependencies_master_index.html` in your browser to browse all tables and their dependencies.
72
-
73
- ## Usage
74
-
75
- ### Command Line
76
-
77
- **Generate diagrams for a specific schema:**
78
-
79
- ```bash
80
- dataform-deps generate SCHEMA_NAME
81
- ```
82
-
83
- Example:
84
- ```bash
85
- dataform-deps generate dashboard_wwim
86
- ```
87
-
88
- **Generate for all schemas:**
89
-
90
- ```bash
91
- dataform-deps generate-all
92
- ```
93
-
94
- By default, schemas starting with `refined_` are excluded. To include them:
95
-
96
- ```bash
97
- dataform-deps generate-all --include-refined
98
- ```
99
-
100
- **Generate master index:**
101
-
102
- ```bash
103
- dataform-deps index
104
- ```
105
-
106
- Creates `output/dependencies_master_index.html` with links to all tables.
107
-
108
- **Check prerequisites:**
109
-
110
- ```bash
111
- dataform-deps check
112
- ```
113
-
114
- Verifies that:
115
- - You're in a Dataform project directory
116
- - `dependencies_report.txt` exists
117
- - The report contains valid dependency data
118
-
119
- ## Example Output
120
-
121
- ### Individual Table Diagram
122
-
123
- Each table gets its own SVG showing:
124
- - **Dependencies (upstream)** - Tables this table depends on
125
- - **Dependents (downstream)** - Tables that depend on this table
126
- - **Color coding** - Tables (blue), views (green), operations (orange)
127
-
128
- ### Master Index
129
-
130
- The master index organizes all tables by schema with:
131
- - Clickable table names that open their SVG
132
- - Expandable/collapsible schemas
133
- - Type badges (table/view/incremental)
134
- - Search functionality
135
-
136
- ## Requirements
137
-
138
- - Python 3.8+
139
- - Dataform project with compiled dependencies
140
-
141
- ## How It Works
142
-
143
- 1. Parse `dependencies_report.txt` generated by Dataform
144
- 2. Extract table dependencies and metadata
145
- 3. Generate SVG diagrams with orthogonal routing
146
- 4. Create master index HTML for easy navigation
147
-
148
- ## Project Structure
149
-
150
- ```
151
- output/
152
- ├── dependencies_master_index.html # Main entry point
153
- └── dependencies/
154
- ├── schema1_table1.svg
155
- ├── schema1_table2.svg
156
- └── ...
157
- ```
158
-
159
- ## License
160
-
161
- MIT License - see LICENSE file for details.
162
-
163
- ## Contributing
164
-
165
- Contributions welcome! Please open an issue or PR on GitHub.
166
-
167
- ## Links
168
-
169
- - [GitHub Repository](https://github.com/yourusername/dataform-dependency-visualizer)
170
- - [Issue Tracker](https://github.com/yourusername/dataform-dependency-visualizer/issues)
1
+ Metadata-Version: 2.1
2
+ Name: dataform-dependency-visualizer
3
+ Version: 0.2.1
4
+ Summary: Visualize Dataform table dependencies as interactive SVG diagrams
5
+ Home-page: https://github.com/OshigeAkito/dataform-dependency-visualizer
6
+ License: MIT
7
+ Keywords: dataform,dependencies,visualization,bigquery,sql
8
+ Author: Thamo
9
+ Author-email: thamo@example.com
10
+ Requires-Python: >=3.10,<4.0
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Database
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Project-URL: Repository, https://github.com/OshigeAkito/dataform-dependency-visualizer
21
+ Description-Content-Type: text/markdown
22
+
23
+ # Dataform Dependency Visualizer
24
+
25
+ Generate beautiful, interactive SVG diagrams showing dependencies between Dataform tables.
26
+
27
+ ## Features
28
+
29
+ - 📊 **Individual table diagrams** - One SVG per table showing immediate dependencies
30
+ - 🎨 **Color-coded by type** - Tables, views, and operations visually distinct
31
+ - 🔍 **Master index viewer** - Browse all tables in single interface
32
+ - 📁 **Schema organization** - Organized by schema with collapsible sections
33
+ - **Pure Python SVGs** - No Graphviz required
34
+ - 🎯 **Orthogonal routing** - Clean, professional arrow paths
35
+ - 📝 **Smart text wrapping** - Long table names split across lines
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ pip install dataform-dependency-visualizer
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ ### 1. Generate dependency report
46
+
47
+ In your Dataform project directory:
48
+
49
+ ```bash
50
+ dataform compile --json > dependencies_report.txt
51
+ ```
52
+
53
+ ### 2. Generate SVG diagrams
54
+
55
+ ```bash
56
+ # Generate for specific schema
57
+ dataform-deps generate dashboard_wwim
58
+
59
+ # Generate for all schemas (excluding refined_*)
60
+ dataform-deps generate-all
61
+
62
+ # Generate master index
63
+ dataform-deps index
64
+ ```
65
+
66
+ ### 3. View diagrams
67
+
68
+ Open `output/dependencies_master_index.html` in your browser to browse all tables and their dependencies.
69
+
70
+ ## Usage
71
+
72
+ ### Command Line
73
+
74
+ **Generate diagrams for a specific schema:**
75
+
76
+ ```bash
77
+ dataform-deps generate SCHEMA_NAME
78
+ ```
79
+
80
+ Example:
81
+ ```bash
82
+ dataform-deps generate dashboard_wwim
83
+ ```
84
+
85
+ **Generate for all schemas:**
86
+
87
+ ```bash
88
+ dataform-deps generate-all
89
+ ```
90
+
91
+ By default, schemas starting with `refined_` are excluded. To include them:
92
+
93
+ ```bash
94
+ dataform-deps generate-all --include-refined
95
+ ```
96
+
97
+ **Generate master index:**
98
+
99
+ ```bash
100
+ dataform-deps index
101
+ ```
102
+
103
+ Creates `output/dependencies_master_index.html` with links to all tables.
104
+
105
+ **Check prerequisites:**
106
+
107
+ ```bash
108
+ dataform-deps check
109
+ ```
110
+
111
+ Verifies that:
112
+ - You're in a Dataform project directory
113
+ - `dependencies_report.txt` exists
114
+ - The report contains valid dependency data
115
+
116
+ ## Example Output
117
+
118
+ ### Individual Table Diagram
119
+
120
+ Each table gets its own SVG showing:
121
+ - **Dependencies (upstream)** - Tables this table depends on
122
+ - **Dependents (downstream)** - Tables that depend on this table
123
+ - **Color coding** - Tables (blue), views (green), operations (orange)
124
+
125
+ ### Master Index
126
+
127
+ The master index organizes all tables by schema with:
128
+ - Clickable table names that open their SVG
129
+ - Expandable/collapsible schemas
130
+ - Type badges (table/view/incremental)
131
+ - Search functionality
132
+
133
+ ## Requirements
134
+
135
+ - Python 3.8+
136
+ - Dataform project with compiled dependencies
137
+
138
+ ## How It Works
139
+
140
+ 1. Parse `dependencies_report.txt` generated by Dataform
141
+ 2. Extract table dependencies and metadata
142
+ 3. Generate SVG diagrams with orthogonal routing
143
+ 4. Create master index HTML for easy navigation
144
+
145
+ ## Project Structure
146
+
147
+ ```
148
+ output/
149
+ ├── dependencies_master_index.html # Main entry point
150
+ └── dependencies/
151
+ ├── schema1_table1.svg
152
+ ├── schema1_table2.svg
153
+ └── ...
154
+ ```
155
+
156
+ ## License
157
+
158
+ MIT License - see LICENSE file for details.
159
+
160
+ ## Contributing
161
+
162
+ Contributions welcome! Please open an issue or PR on GitHub.
163
+
164
+ ## Links
165
+
166
+ - [GitHub Repository](https://github.com/OshigeAkito/dataform-dependency-visualizer)
167
+ - [Issue Tracker](https://github.com/OshigeAkito/dataform-dependency-visualizer/issues)
168
+
@@ -141,5 +141,5 @@ Contributions welcome! Please open an issue or PR on GitHub.
141
141
 
142
142
  ## Links
143
143
 
144
- - [GitHub Repository](https://github.com/yourusername/dataform-dependency-visualizer)
145
- - [Issue Tracker](https://github.com/yourusername/dataform-dependency-visualizer/issues)
144
+ - [GitHub Repository](https://github.com/OshigeAkito/dataform-dependency-visualizer)
145
+ - [Issue Tracker](https://github.com/OshigeAkito/dataform-dependency-visualizer/issues)
@@ -1,39 +1,39 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
1
+ [tool.poetry]
6
2
  name = "dataform-dependency-visualizer"
7
- version = "0.1.0"
3
+ version = "0.2.1"
8
4
  description = "Visualize Dataform table dependencies as interactive SVG diagrams"
9
5
  readme = "README_PACKAGE.md"
10
- requires-python = ">=3.8"
11
- license = {text = "MIT"}
12
- authors = [
13
- {name = "Thamo", email = "thamo@example.com"}
14
- ]
6
+ authors = ["Thamo <thamo@example.com>"]
7
+ license = "MIT"
15
8
  keywords = ["dataform", "dependencies", "visualization", "bigquery", "sql"]
9
+ homepage = "https://github.com/OshigeAkito/dataform-dependency-visualizer"
10
+ repository = "https://github.com/OshigeAkito/dataform-dependency-visualizer"
16
11
  classifiers = [
17
12
  "Development Status :: 4 - Beta",
18
13
  "Intended Audience :: Developers",
19
14
  "License :: OSI Approved :: MIT License",
20
15
  "Programming Language :: Python :: 3",
21
- "Programming Language :: Python :: 3.8",
22
- "Programming Language :: Python :: 3.9",
23
16
  "Programming Language :: Python :: 3.10",
24
17
  "Programming Language :: Python :: 3.11",
25
18
  "Programming Language :: Python :: 3.12",
26
19
  "Topic :: Software Development :: Libraries :: Python Modules",
27
20
  "Topic :: Database",
28
21
  ]
22
+ packages = [{include = "dataform_viz", from = "src"}]
29
23
 
30
- [project.urls]
31
- Homepage = "https://github.com/thamo/dataform-dependency-visualizer"
32
- Repository = "https://github.com/thamo/dataform-dependency-visualizer"
24
+ [tool.poetry.dependencies]
25
+ python = "^3.10"
33
26
 
34
- [project.scripts]
27
+ [tool.poetry.group.dev.dependencies]
28
+ pytest = "^9.0.2"
29
+ pytest-cov = "^7.0.0"
30
+ black = "^25.12.0"
31
+ flake8 = "^7.3.0"
32
+ mypy = "^1.19.1"
33
+
34
+ [tool.poetry.scripts]
35
35
  dataform-deps = "dataform_viz.cli:main"
36
36
 
37
- [tool.setuptools.packages.find]
38
- where = ["src"]
39
- include = ["dataform_viz*"]
37
+ [build-system]
38
+ requires = ["poetry-core>=1.0.0"]
39
+ build-backend = "poetry.core.masonry.api"
@@ -63,6 +63,25 @@ def cmd_index(args):
63
63
  return 1
64
64
 
65
65
 
66
+ def cmd_cleanup(args):
67
+ """Clean up .sqlx files before compilation"""
68
+ from .dataform_check import cleanup_sqlx_files
69
+
70
+ try:
71
+ cleaned = cleanup_sqlx_files(
72
+ definitions_dir=args.definitions,
73
+ backup=not args.no_backup
74
+ )
75
+
76
+ if cleaned > 0:
77
+ print(f"\n✓ Ready for dataform compile --json")
78
+
79
+ return 0
80
+ except Exception as e:
81
+ print(f"✗ Error: {e}", file=sys.stderr)
82
+ return 1
83
+
84
+
66
85
  def cmd_setup(args):
67
86
  """Full setup pipeline"""
68
87
  from .dataform_check import check_prerequisites
@@ -137,6 +156,20 @@ def main():
137
156
  )
138
157
  idx_parser.set_defaults(func=cmd_index)
139
158
 
159
+ # Cleanup command
160
+ cleanup_parser = subparsers.add_parser('cleanup', help='Clean up .sqlx files (remove *_utils.PROJECT_ID from config)')
161
+ cleanup_parser.add_argument(
162
+ '--definitions',
163
+ default='definitions',
164
+ help='Path to definitions directory (default: definitions)'
165
+ )
166
+ cleanup_parser.add_argument(
167
+ '--no-backup',
168
+ action='store_true',
169
+ help='Skip creating .bak backup files'
170
+ )
171
+ cleanup_parser.set_defaults(func=cmd_cleanup)
172
+
140
173
  # Setup command
141
174
  setup_parser = subparsers.add_parser('setup', help='Full setup pipeline')
142
175
  setup_parser.add_argument(