mvn-tree-visualizer 1.0.1__tar.gz → 1.0.3b1__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.
Potentially problematic release.
This version of mvn-tree-visualizer might be problematic. Click here for more details.
- mvn_tree_visualizer-1.0.3b1/LICENSE +21 -0
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/PKG-INFO +12 -2
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/README.md +1 -1
- mvn_tree_visualizer-1.0.3b1/pyproject.toml +46 -0
- mvn_tree_visualizer-1.0.3b1/src/mvn_tree_visualizer/__main__.py +4 -0
- mvn_tree_visualizer-1.0.1/src/mvn_tree_visualizer/__main__.py → mvn_tree_visualizer-1.0.3b1/src/mvn_tree_visualizer/cli.py +5 -5
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer/diagram.py +73 -73
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer.egg-info/PKG-INFO +12 -2
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer.egg-info/SOURCES.txt +3 -0
- mvn_tree_visualizer-1.0.3b1/src/mvn_tree_visualizer.egg-info/entry_points.txt +2 -0
- mvn_tree_visualizer-1.0.1/pyproject.toml +0 -12
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/setup.cfg +0 -0
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer/get_dependencies_in_one_file.py +0 -0
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer.egg-info/dependency_links.txt +0 -0
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer.egg-info/requires.txt +0 -0
- {mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hercules Konsoulas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mvn-tree-visualizer
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3b1
|
|
4
4
|
Summary: A simple command line tool to visualize the dependency tree of a Maven project in a graphical format.
|
|
5
5
|
Author-email: Iraklis Konsoulas <dyka3773@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: source, https://github.com/dyka3773/mvn-tree-visualizer
|
|
8
|
+
Keywords: maven,dependency,visualization,tree,cli,command-line,tool,graph,mermaid
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
6
14
|
Requires-Python: >=3.13
|
|
7
15
|
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
8
17
|
Requires-Dist: jinja2>=3.1.6
|
|
18
|
+
Dynamic: license-file
|
|
9
19
|
|
|
10
20
|
# mvn-tree-visualizer
|
|
11
21
|
|
|
@@ -19,7 +29,7 @@ This project provides a simple command line tool to visualize the dependency tre
|
|
|
19
29
|
> Feel free to add other options to the command as needed. eg `-Dincludes="org.example"`
|
|
20
30
|
2. Use the `mvn-tree-visualizer` command to visualize the dependency tree:
|
|
21
31
|
```bash
|
|
22
|
-
|
|
32
|
+
python -m mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html"
|
|
23
33
|
```
|
|
24
34
|
3. Open the generated `diagram.html` file in your web browser to view the dependency tree.
|
|
25
35
|
|
|
@@ -10,7 +10,7 @@ This project provides a simple command line tool to visualize the dependency tre
|
|
|
10
10
|
> Feel free to add other options to the command as needed. eg `-Dincludes="org.example"`
|
|
11
11
|
2. Use the `mvn-tree-visualizer` command to visualize the dependency tree:
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
python -m mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html"
|
|
14
14
|
```
|
|
15
15
|
3. Open the generated `diagram.html` file in your web browser to view the dependency tree.
|
|
16
16
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "mvn-tree-visualizer"
|
|
3
|
+
version = "1.0.3b1"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name = "Iraklis Konsoulas", email = "dyka3773@gmail.com" },
|
|
6
|
+
]
|
|
7
|
+
description = "A simple command line tool to visualize the dependency tree of a Maven project in a graphical format."
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.13"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
keywords = [
|
|
12
|
+
"maven",
|
|
13
|
+
"dependency",
|
|
14
|
+
"visualization",
|
|
15
|
+
"tree",
|
|
16
|
+
"cli",
|
|
17
|
+
"command-line",
|
|
18
|
+
"tool",
|
|
19
|
+
"graph",
|
|
20
|
+
"mermaid",
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Development Status :: 4 - Beta",
|
|
24
|
+
"Intended Audience :: Developers",
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Topic :: Software Development :: Build Tools",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"jinja2>=3.1.6",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
source = "https://github.com/dyka3773/mvn-tree-visualizer"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
mvn-tree-visualizer = "mvn_tree_visualizer.cli:cli"
|
|
38
|
+
|
|
39
|
+
[dependency-groups]
|
|
40
|
+
dev = [
|
|
41
|
+
"twine>=6.1.0",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["setuptools >= 77.0.3"]
|
|
46
|
+
build-backend = "setuptools.build_meta"
|
|
@@ -5,11 +5,7 @@ from .diagram import create_diagram
|
|
|
5
5
|
from .get_dependencies_in_one_file import merge_files
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
def
|
|
9
|
-
pass
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if __name__ == "__main__":
|
|
8
|
+
def cli():
|
|
13
9
|
parser = argparse.ArgumentParser(
|
|
14
10
|
prog="mvn-tree-visualizer",
|
|
15
11
|
description="Generate a dependency diagram from a file.",
|
|
@@ -69,3 +65,7 @@ if __name__ == "__main__":
|
|
|
69
65
|
print(f"Diagram generated and saved to {output_file}")
|
|
70
66
|
print("You can open it in your browser to view the dependency tree.")
|
|
71
67
|
print("Thank you for using mvn-tree-visualizer!")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
if __name__ == "__main__":
|
|
71
|
+
cli()
|
{mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer/diagram.py
RENAMED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
from jinja2 import Environment, FileSystemLoader
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def _convert_to_mermaid(dependency_tree: str) -> str:
|
|
7
|
-
# generate a `graph LR` format for Mermaid
|
|
8
|
-
lines = dependency_tree.strip().split("\n")
|
|
9
|
-
mermaid_lines = set()
|
|
10
|
-
|
|
11
|
-
previous_dependency = []
|
|
12
|
-
|
|
13
|
-
for line in lines:
|
|
14
|
-
if not line or line.startswith("[INFO]"):
|
|
15
|
-
continue
|
|
16
|
-
parts = line.split(":")
|
|
17
|
-
|
|
18
|
-
if len(parts) < 3:
|
|
19
|
-
continue
|
|
20
|
-
|
|
21
|
-
if len(parts) == 4:
|
|
22
|
-
group_id, artifact_id, app, version = parts
|
|
23
|
-
mermaid_lines.add(f"\t{artifact_id};")
|
|
24
|
-
|
|
25
|
-
if previous_dependency: # Re initialize the list if it wasn't empty
|
|
26
|
-
previous_dependency = []
|
|
27
|
-
|
|
28
|
-
previous_dependency.append((artifact_id, 0)) # The second element is the depth
|
|
29
|
-
else:
|
|
30
|
-
depth = len(parts[0].split(" ")) - 1
|
|
31
|
-
|
|
32
|
-
if len(parts) == 6:
|
|
33
|
-
dirty_group_id, artifact_id, app, ejb_client, version, dependency = parts
|
|
34
|
-
else:
|
|
35
|
-
dirty_group_id, artifact_id, app, version, dependency = parts
|
|
36
|
-
|
|
37
|
-
if previous_dependency[-1][1] < depth:
|
|
38
|
-
mermaid_lines.add(f"\t{previous_dependency[-1][0]} --> {artifact_id};")
|
|
39
|
-
previous_dependency.append((artifact_id, depth))
|
|
40
|
-
else:
|
|
41
|
-
# remove all dependencies that are deeper or equal to the current depth
|
|
42
|
-
while previous_dependency and previous_dependency[-1][1] >= depth:
|
|
43
|
-
previous_dependency.pop()
|
|
44
|
-
|
|
45
|
-
mermaid_lines.add(f"\t{previous_dependency[-1][0]} --> {artifact_id};")
|
|
46
|
-
previous_dependency.append((artifact_id, depth))
|
|
47
|
-
|
|
48
|
-
mermaid_diagram = f"graph LR\n{'\n'.join(sorted(mermaid_lines))}"
|
|
49
|
-
return mermaid_diagram
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def create_diagram(keep_tree: bool = False, intermediate_filename: str = "dependency_tree.txt", output_filename: str = "diagram.html"):
|
|
53
|
-
with open(intermediate_filename, "r") as file:
|
|
54
|
-
dependency_tree = file.read()
|
|
55
|
-
|
|
56
|
-
mermaid_diagram = _convert_to_mermaid(dependency_tree)
|
|
57
|
-
|
|
58
|
-
env = Environment(loader=FileSystemLoader("./src/mvn_tree_visualizer"))
|
|
59
|
-
template = env.get_template("dependency_diagram_template.j2")
|
|
60
|
-
rendered = template.render(diagram_definition=mermaid_diagram)
|
|
61
|
-
|
|
62
|
-
parent_dir = Path(output_filename).parent
|
|
63
|
-
|
|
64
|
-
if not parent_dir.exists():
|
|
65
|
-
parent_dir.mkdir(parents=True, exist_ok=True)
|
|
66
|
-
|
|
67
|
-
with open(output_filename, "w") as f:
|
|
68
|
-
f.write(rendered)
|
|
69
|
-
|
|
70
|
-
if not keep_tree:
|
|
71
|
-
import os
|
|
72
|
-
|
|
73
|
-
os.remove(intermediate_filename)
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from jinja2 import Environment, FileSystemLoader
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def _convert_to_mermaid(dependency_tree: str) -> str:
|
|
7
|
+
# generate a `graph LR` format for Mermaid
|
|
8
|
+
lines = dependency_tree.strip().split("\n")
|
|
9
|
+
mermaid_lines = set()
|
|
10
|
+
|
|
11
|
+
previous_dependency = []
|
|
12
|
+
|
|
13
|
+
for line in lines:
|
|
14
|
+
if not line or line.startswith("[INFO]"):
|
|
15
|
+
continue
|
|
16
|
+
parts = line.split(":")
|
|
17
|
+
|
|
18
|
+
if len(parts) < 3:
|
|
19
|
+
continue
|
|
20
|
+
|
|
21
|
+
if len(parts) == 4:
|
|
22
|
+
group_id, artifact_id, app, version = parts
|
|
23
|
+
mermaid_lines.add(f"\t{artifact_id};")
|
|
24
|
+
|
|
25
|
+
if previous_dependency: # Re initialize the list if it wasn't empty
|
|
26
|
+
previous_dependency = []
|
|
27
|
+
|
|
28
|
+
previous_dependency.append((artifact_id, 0)) # The second element is the depth
|
|
29
|
+
else:
|
|
30
|
+
depth = len(parts[0].split(" ")) - 1
|
|
31
|
+
|
|
32
|
+
if len(parts) == 6:
|
|
33
|
+
dirty_group_id, artifact_id, app, ejb_client, version, dependency = parts
|
|
34
|
+
else:
|
|
35
|
+
dirty_group_id, artifact_id, app, version, dependency = parts
|
|
36
|
+
|
|
37
|
+
if previous_dependency[-1][1] < depth:
|
|
38
|
+
mermaid_lines.add(f"\t{previous_dependency[-1][0]} --> {artifact_id};")
|
|
39
|
+
previous_dependency.append((artifact_id, depth))
|
|
40
|
+
else:
|
|
41
|
+
# remove all dependencies that are deeper or equal to the current depth
|
|
42
|
+
while previous_dependency and previous_dependency[-1][1] >= depth:
|
|
43
|
+
previous_dependency.pop()
|
|
44
|
+
|
|
45
|
+
mermaid_lines.add(f"\t{previous_dependency[-1][0]} --> {artifact_id};")
|
|
46
|
+
previous_dependency.append((artifact_id, depth))
|
|
47
|
+
|
|
48
|
+
mermaid_diagram = f"graph LR\n{'\n'.join(sorted(mermaid_lines))}"
|
|
49
|
+
return mermaid_diagram
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def create_diagram(keep_tree: bool = False, intermediate_filename: str = "dependency_tree.txt", output_filename: str = "diagram.html"):
|
|
53
|
+
with open(intermediate_filename, "r") as file:
|
|
54
|
+
dependency_tree = file.read()
|
|
55
|
+
|
|
56
|
+
mermaid_diagram = _convert_to_mermaid(dependency_tree)
|
|
57
|
+
|
|
58
|
+
env = Environment(loader=FileSystemLoader("./src/mvn_tree_visualizer"))
|
|
59
|
+
template = env.get_template("dependency_diagram_template.j2")
|
|
60
|
+
rendered = template.render(diagram_definition=mermaid_diagram)
|
|
61
|
+
|
|
62
|
+
parent_dir = Path(output_filename).parent
|
|
63
|
+
|
|
64
|
+
if not parent_dir.exists():
|
|
65
|
+
parent_dir.mkdir(parents=True, exist_ok=True)
|
|
66
|
+
|
|
67
|
+
with open(output_filename, "w") as f:
|
|
68
|
+
f.write(rendered)
|
|
69
|
+
|
|
70
|
+
if not keep_tree:
|
|
71
|
+
import os
|
|
72
|
+
|
|
73
|
+
os.remove(intermediate_filename)
|
{mvn_tree_visualizer-1.0.1 → mvn_tree_visualizer-1.0.3b1}/src/mvn_tree_visualizer.egg-info/PKG-INFO
RENAMED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mvn-tree-visualizer
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3b1
|
|
4
4
|
Summary: A simple command line tool to visualize the dependency tree of a Maven project in a graphical format.
|
|
5
5
|
Author-email: Iraklis Konsoulas <dyka3773@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: source, https://github.com/dyka3773/mvn-tree-visualizer
|
|
8
|
+
Keywords: maven,dependency,visualization,tree,cli,command-line,tool,graph,mermaid
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
6
14
|
Requires-Python: >=3.13
|
|
7
15
|
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
8
17
|
Requires-Dist: jinja2>=3.1.6
|
|
18
|
+
Dynamic: license-file
|
|
9
19
|
|
|
10
20
|
# mvn-tree-visualizer
|
|
11
21
|
|
|
@@ -19,7 +29,7 @@ This project provides a simple command line tool to visualize the dependency tre
|
|
|
19
29
|
> Feel free to add other options to the command as needed. eg `-Dincludes="org.example"`
|
|
20
30
|
2. Use the `mvn-tree-visualizer` command to visualize the dependency tree:
|
|
21
31
|
```bash
|
|
22
|
-
|
|
32
|
+
python -m mvn_tree_visualizer --filename "maven_dependency_file" --output "diagram.html"
|
|
23
33
|
```
|
|
24
34
|
3. Open the generated `diagram.html` file in your web browser to view the dependency tree.
|
|
25
35
|
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
LICENSE
|
|
1
2
|
README.md
|
|
2
3
|
pyproject.toml
|
|
3
4
|
src/mvn_tree_visualizer/__main__.py
|
|
5
|
+
src/mvn_tree_visualizer/cli.py
|
|
4
6
|
src/mvn_tree_visualizer/diagram.py
|
|
5
7
|
src/mvn_tree_visualizer/get_dependencies_in_one_file.py
|
|
6
8
|
src/mvn_tree_visualizer.egg-info/PKG-INFO
|
|
7
9
|
src/mvn_tree_visualizer.egg-info/SOURCES.txt
|
|
8
10
|
src/mvn_tree_visualizer.egg-info/dependency_links.txt
|
|
11
|
+
src/mvn_tree_visualizer.egg-info/entry_points.txt
|
|
9
12
|
src/mvn_tree_visualizer.egg-info/requires.txt
|
|
10
13
|
src/mvn_tree_visualizer.egg-info/top_level.txt
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "mvn-tree-visualizer"
|
|
3
|
-
version = "1.0.1"
|
|
4
|
-
authors = [
|
|
5
|
-
{ name = "Iraklis Konsoulas", email = "dyka3773@gmail.com" },
|
|
6
|
-
]
|
|
7
|
-
description = "A simple command line tool to visualize the dependency tree of a Maven project in a graphical format."
|
|
8
|
-
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.13"
|
|
10
|
-
dependencies = [
|
|
11
|
-
"jinja2>=3.1.6",
|
|
12
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|