@@ -747,1418 +791,2396 @@
Highlight Settings
const graphData = {
"nodes": [
{
- "id": "core.py",
+ "id": "codegraph/core",
+ "label": "core",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\codegraph\\core.py",
- "lines": 347
- },
- {
- "id": "core.py:parse_code_file",
+ "fullPath": "codegraph/core.py",
+ "lines": 601,
+ "imports": [
+ "codegraph",
+ "logging",
+ "codegraph",
+ "typing",
+ "collections",
+ "typing",
+ "collections",
+ "typing",
+ "codegraph",
+ "codegraph",
+ "codegraph",
+ "os",
+ "argparse",
+ "typing",
+ "typing",
+ "typing",
+ "codegraph",
+ "codegraph"
+ ]
+ },
+ {
+ "id": "codegraph/core:parse_code_file",
"label": "parse_code_file",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 5,
"entityType": "function"
},
{
- "id": "core.py:CodeGraph",
+ "id": "codegraph/core:CodeGraph",
"label": "CodeGraph",
"type": "entity",
- "parent": "core.py",
- "lines": 121,
+ "parent": "codegraph/core",
+ "lines": 341,
"entityType": "class"
},
{
- "id": "core.py:collect_entities_usage_in_modules",
+ "id": "codegraph/core:collect_entities_usage_in_modules",
"label": "collect_entities_usage_in_modules",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 32,
"entityType": "function"
},
{
- "id": "core.py:get_code_objects",
+ "id": "codegraph/core:get_code_objects",
"label": "get_code_objects",
"type": "entity",
- "parent": "core.py",
- "lines": 11,
+ "parent": "codegraph/core",
+ "lines": 12,
"entityType": "function"
},
{
- "id": "core.py:get_imports_and_entities_lines",
+ "id": "codegraph/core:get_imports_and_entities_lines",
"label": "get_imports_and_entities_lines",
"type": "entity",
- "parent": "core.py",
- "lines": 65,
+ "parent": "codegraph/core",
+ "lines": 77,
"entityType": "function"
},
{
- "id": "core.py:search_entities_from_list_in_code",
+ "id": "codegraph/core:search_entities_from_list_in_code",
"label": "search_entities_from_list_in_code",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 8,
"entityType": "function"
},
{
- "id": "core.py:search_entities_from_module_in_code",
+ "id": "codegraph/core:search_entities_from_module_in_code",
"label": "search_entities_from_module_in_code",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 20,
"entityType": "function"
},
{
- "id": "core.py:_",
+ "id": "codegraph/core:_",
"label": "_",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 0,
"entityType": "function"
},
{
- "id": "core.py:read_file_content",
+ "id": "codegraph/core:read_file_content",
"label": "read_file_content",
"type": "entity",
- "parent": "core.py",
- "lines": 5,
+ "parent": "codegraph/core",
+ "lines": 10,
"entityType": "function"
},
{
- "id": "core.py:get_module_name",
+ "id": "codegraph/core:get_module_name",
"label": "get_module_name",
"type": "entity",
- "parent": "core.py",
- "lines": 3,
+ "parent": "codegraph/core",
+ "lines": 19,
"entityType": "function"
},
{
- "id": "core.py:module_name_in_imports",
+ "id": "codegraph/core:module_name_in_imports",
"label": "module_name_in_imports",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 5,
"entityType": "function"
},
{
- "id": "core.py:populate_free_nodes",
+ "id": "codegraph/core:populate_free_nodes",
"label": "populate_free_nodes",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 57,
"entityType": "function"
},
{
- "id": "core.py:search_entity_usage",
+ "id": "codegraph/core:search_entity_usage",
"label": "search_entity_usage",
"type": "entity",
- "parent": "core.py",
+ "parent": "codegraph/core",
"lines": 15,
"entityType": "function"
},
{
- "id": "main.py",
+ "id": "codegraph/main",
+ "label": "main",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\codegraph\\main.py",
- "lines": 43
- },
- {
- "id": "main.py:main",
+ "fullPath": "codegraph/main.py",
+ "lines": 47,
+ "imports": [
+ "pprint",
+ "logging",
+ "sys",
+ "codegraph",
+ "argparse",
+ "click",
+ "codegraph",
+ "codegraph"
+ ]
+ },
+ {
+ "id": "codegraph/main:main",
"label": "main",
"type": "entity",
- "parent": "main.py",
- "lines": 27,
+ "parent": "codegraph/main",
+ "lines": 31,
"entityType": "function"
},
{
- "id": "main.py:_",
+ "id": "codegraph/main:_",
"label": "_",
"type": "entity",
- "parent": "main.py",
+ "parent": "codegraph/main",
"lines": 0,
"entityType": "function"
},
{
- "id": "main.py:cli",
+ "id": "codegraph/main:cli",
"label": "cli",
"type": "entity",
- "parent": "main.py",
+ "parent": "codegraph/main",
"lines": 16,
"entityType": "function"
},
{
- "id": "parser.py",
+ "id": "codegraph/parser",
+ "label": "parser",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\codegraph\\parser.py",
- "lines": 283
- },
- {
- "id": "parser.py:Function",
+ "fullPath": "codegraph/parser.py",
+ "lines": 289,
+ "imports": [
+ "token",
+ "tokenize",
+ "typing",
+ "typing",
+ "token",
+ "io",
+ "token",
+ "token"
+ ]
+ },
+ {
+ "id": "codegraph/parser:Function",
"label": "Function",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 7,
"entityType": "class"
},
{
- "id": "parser.py:AsyncFunction",
+ "id": "codegraph/parser:AsyncFunction",
"label": "AsyncFunction",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 7,
"entityType": "class"
},
{
- "id": "parser.py:Class",
+ "id": "codegraph/parser:Class",
"label": "Class",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 16,
"entityType": "class"
},
{
- "id": "parser.py:_nest_function",
+ "id": "codegraph/parser:_nest_function",
"label": "_nest_function",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 10,
"entityType": "function"
},
{
- "id": "parser.py:create_objects_array",
+ "id": "codegraph/parser:create_objects_array",
"label": "create_objects_array",
"type": "entity",
- "parent": "parser.py",
- "lines": 206,
+ "parent": "codegraph/parser",
+ "lines": 212,
"entityType": "function"
},
{
- "id": "parser.py:_nest_class",
+ "id": "codegraph/parser:_nest_class",
"label": "_nest_class",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 5,
"entityType": "function"
},
{
- "id": "parser.py:_Object",
+ "id": "codegraph/parser:_Object",
"label": "_Object",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 22,
"entityType": "class"
},
{
- "id": "parser.py:Import",
+ "id": "codegraph/parser:Import",
"label": "Import",
"type": "entity",
- "parent": "parser.py",
+ "parent": "codegraph/parser",
"lines": 10,
"entityType": "class"
},
{
- "id": "utils.py",
+ "id": "codegraph/utils",
+ "label": "utils",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\codegraph\\utils.py",
- "lines": 25
+ "fullPath": "codegraph/utils.py",
+ "lines": 61,
+ "imports": [
+ "typing",
+ "os",
+ "pathlib",
+ "typing",
+ "glob"
+ ]
+ },
+ {
+ "id": "codegraph/utils:get_relative_path",
+ "label": "get_relative_path",
+ "type": "entity",
+ "parent": "codegraph/utils",
+ "lines": 29,
+ "entityType": "function"
},
{
- "id": "utils.py:get_python_paths_list",
+ "id": "codegraph/utils:get_python_paths_list",
"label": "get_python_paths_list",
"type": "entity",
- "parent": "utils.py",
- "lines": 25,
+ "parent": "codegraph/utils",
+ "lines": 32,
"entityType": "function"
},
{
- "id": "vizualyzer.py",
+ "id": "codegraph/vizualyzer",
+ "label": "vizualyzer",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\codegraph\\vizualyzer.py",
- "lines": 392
- },
- {
- "id": "vizualyzer.py:draw_graph_matplotlib",
+ "fullPath": "codegraph/vizualyzer.py",
+ "lines": 491,
+ "imports": [
+ "logging",
+ "json",
+ "typing",
+ "csv",
+ "codegraph",
+ "os",
+ "matplotlib",
+ "networkx",
+ "click",
+ "typing",
+ "typing",
+ "codegraph",
+ "webbrowser"
+ ]
+ },
+ {
+ "id": "codegraph/vizualyzer:draw_graph_matplotlib",
"label": "draw_graph_matplotlib",
"type": "entity",
- "parent": "vizualyzer.py",
- "lines": 86,
+ "parent": "codegraph/vizualyzer",
+ "lines": 93,
"entityType": "function"
},
{
- "id": "vizualyzer.py:_read_template_file",
+ "id": "codegraph/vizualyzer:_read_template_file",
"label": "_read_template_file",
"type": "entity",
- "parent": "vizualyzer.py",
+ "parent": "codegraph/vizualyzer",
"lines": 7,
"entityType": "function"
},
{
- "id": "vizualyzer.py:get_d3_html_template",
+ "id": "codegraph/vizualyzer:get_d3_html_template",
"label": "get_d3_html_template",
"type": "entity",
- "parent": "vizualyzer.py",
+ "parent": "codegraph/vizualyzer",
"lines": 10,
"entityType": "function"
},
{
- "id": "vizualyzer.py:draw_graph",
+ "id": "codegraph/vizualyzer:draw_graph",
"label": "draw_graph",
"type": "entity",
- "parent": "vizualyzer.py",
- "lines": 26,
+ "parent": "codegraph/vizualyzer",
+ "lines": 29,
"entityType": "function"
},
{
- "id": "vizualyzer.py:export_to_csv",
+ "id": "codegraph/vizualyzer:export_to_csv",
"label": "export_to_csv",
"type": "entity",
- "parent": "vizualyzer.py",
- "lines": 83,
+ "parent": "codegraph/vizualyzer",
+ "lines": 90,
"entityType": "function"
},
{
- "id": "vizualyzer.py:process_module_in_graph",
+ "id": "codegraph/vizualyzer:_",
+ "label": "_",
+ "type": "entity",
+ "parent": "codegraph/vizualyzer",
+ "lines": 0,
+ "entityType": "function"
+ },
+ {
+ "id": "codegraph/vizualyzer:process_module_in_graph",
"label": "process_module_in_graph",
"type": "entity",
- "parent": "vizualyzer.py",
- "lines": 17,
+ "parent": "codegraph/vizualyzer",
+ "lines": 22,
"entityType": "function"
},
{
- "id": "vizualyzer.py:convert_to_d3_format",
+ "id": "codegraph/vizualyzer:convert_to_d3_format",
"label": "convert_to_d3_format",
"type": "entity",
- "parent": "vizualyzer.py",
- "lines": 160,
+ "parent": "codegraph/vizualyzer",
+ "lines": 237,
"entityType": "function"
},
{
- "id": "vizualyzer.py:_get_template_dir",
+ "id": "codegraph/vizualyzer:_get_template_dir",
"label": "_get_template_dir",
"type": "entity",
- "parent": "vizualyzer.py",
+ "parent": "codegraph/vizualyzer",
"lines": 3,
"entityType": "function"
},
{
- "id": "__init__.py",
+ "id": "codegraph/__init__",
+ "label": "__init__",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\codegraph\\__init__.py",
- "lines": 0
+ "fullPath": "codegraph/__init__.py",
+ "lines": 0,
+ "imports": []
},
{
- "id": "test_codegraph.py",
+ "id": "tests/test_codegraph",
+ "label": "test_codegraph",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_codegraph.py",
- "lines": 6
+ "fullPath": "tests/test_codegraph.py",
+ "lines": 6,
+ "imports": [
+ "codegraph",
+ "argparse",
+ "pathlib"
+ ]
},
{
- "id": "test_codegraph.py:test_main",
+ "id": "tests/test_codegraph:test_main",
"label": "test_main",
"type": "entity",
- "parent": "test_codegraph.py",
+ "parent": "tests/test_codegraph",
"lines": 6,
"entityType": "function"
},
{
- "id": "test_codegraph.py:_",
+ "id": "tests/test_codegraph:_",
"label": "_",
"type": "entity",
- "parent": "test_codegraph.py",
+ "parent": "tests/test_codegraph",
"lines": 0,
"entityType": "function"
},
{
- "id": "test_graph_generation.py",
+ "id": "tests/test_graph_generation",
+ "label": "test_graph_generation",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_graph_generation.py",
- "lines": 499
+ "fullPath": "tests/test_graph_generation.py",
+ "lines": 621,
+ "imports": [
+ "codegraph",
+ "codegraph",
+ "tempfile",
+ "pathlib",
+ "csv",
+ "codegraph",
+ "argparse",
+ "codegraph",
+ "codegraph"
+ ]
+ },
+ {
+ "id": "tests/test_graph_generation:TestCodeGraphConnections",
+ "label": "TestCodeGraphConnections",
+ "type": "entity",
+ "parent": "tests/test_graph_generation",
+ "lines": 25,
+ "entityType": "class"
},
{
- "id": "test_graph_generation.py:TestImportParsing",
- "label": "TestImportParsing",
+ "id": "tests/test_graph_generation:TestCodeGraphOnItself",
+ "label": "TestCodeGraphOnItself",
"type": "entity",
- "parent": "test_graph_generation.py",
- "lines": 120,
+ "parent": "tests/test_graph_generation",
+ "lines": 58,
"entityType": "class"
},
{
- "id": "test_graph_generation.py:TestCodeGraphConnections",
- "label": "TestCodeGraphConnections",
+ "id": "tests/test_graph_generation:TestCSVExport",
+ "label": "TestCSVExport",
"type": "entity",
- "parent": "test_graph_generation.py",
- "lines": 25,
+ "parent": "tests/test_graph_generation",
+ "lines": 179,
"entityType": "class"
},
{
- "id": "test_graph_generation.py:TestCodeGraphOnItself",
- "label": "TestCodeGraphOnItself",
+ "id": "tests/test_graph_generation:TestDuplicateFilenames",
+ "label": "TestDuplicateFilenames",
"type": "entity",
- "parent": "test_graph_generation.py",
- "lines": 58,
+ "parent": "tests/test_graph_generation",
+ "lines": 119,
"entityType": "class"
},
{
- "id": "test_graph_generation.py:TestCSVExport",
- "label": "TestCSVExport",
+ "id": "tests/test_graph_generation:TestImportParsing",
+ "label": "TestImportParsing",
"type": "entity",
- "parent": "test_graph_generation.py",
- "lines": 177,
+ "parent": "tests/test_graph_generation",
+ "lines": 120,
"entityType": "class"
},
{
- "id": "test_graph_generation.py:_",
+ "id": "tests/test_graph_generation:_",
"label": "_",
"type": "entity",
- "parent": "test_graph_generation.py",
+ "parent": "tests/test_graph_generation",
"lines": 0,
"entityType": "function"
},
{
- "id": "test_graph_generation.py:TestD3FormatConversion",
+ "id": "tests/test_graph_generation:TestD3FormatConversion",
"label": "TestD3FormatConversion",
"type": "entity",
- "parent": "test_graph_generation.py",
- "lines": 119,
+ "parent": "tests/test_graph_generation",
+ "lines": 120,
"entityType": "class"
},
{
- "id": "test_package_install.py",
+ "id": "tests/test_package_install",
+ "label": "test_package_install",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_package_install.py",
- "lines": 66
- },
- {
- "id": "test_package_install.py:test_codegraph_on_itself_without_matplotlib",
- "label": "test_codegraph_on_itself_without_matplotlib",
+ "fullPath": "tests/test_package_install.py",
+ "lines": 66,
+ "imports": [
+ "codegraph",
+ "codegraph",
+ "tempfile",
+ "os",
+ "click",
+ "argparse",
+ "codegraph",
+ "codegraph",
+ "codegraph"
+ ]
+ },
+ {
+ "id": "tests/test_package_install:test_d3_visualization_without_matplotlib",
+ "label": "test_d3_visualization_without_matplotlib",
"type": "entity",
- "parent": "test_package_install.py",
- "lines": 12,
+ "parent": "tests/test_package_install",
+ "lines": 33,
"entityType": "function"
},
{
- "id": "test_package_install.py:test_d3_visualization_without_matplotlib",
- "label": "test_d3_visualization_without_matplotlib",
+ "id": "tests/test_package_install:test_codegraph_on_itself_without_matplotlib",
+ "label": "test_codegraph_on_itself_without_matplotlib",
"type": "entity",
- "parent": "test_package_install.py",
- "lines": 33,
+ "parent": "tests/test_package_install",
+ "lines": 12,
"entityType": "function"
},
{
- "id": "test_package_install.py:_",
+ "id": "tests/test_package_install:_",
"label": "_",
"type": "entity",
- "parent": "test_package_install.py",
+ "parent": "tests/test_package_install",
"lines": 0,
"entityType": "function"
},
{
- "id": "test_package_install.py:test_import_codegraph",
+ "id": "tests/test_package_install:test_import_codegraph",
"label": "test_import_codegraph",
"type": "entity",
- "parent": "test_package_install.py",
+ "parent": "tests/test_package_install",
"lines": 4,
"entityType": "function"
},
{
- "id": "test_package_install.py:test_import_core",
+ "id": "tests/test_package_install:test_import_core",
"label": "test_import_core",
"type": "entity",
- "parent": "test_package_install.py",
+ "parent": "tests/test_package_install",
"lines": 4,
"entityType": "function"
},
{
- "id": "test_package_install.py:test_import_vizualyzer",
+ "id": "tests/test_package_install:test_import_vizualyzer",
"label": "test_import_vizualyzer",
"type": "entity",
- "parent": "test_package_install.py",
+ "parent": "tests/test_package_install",
"lines": 5,
"entityType": "function"
},
{
- "id": "test_package_install.py:test_cli_help",
+ "id": "tests/test_package_install:test_cli_help",
"label": "test_cli_help",
"type": "entity",
- "parent": "test_package_install.py",
+ "parent": "tests/test_package_install",
"lines": 8,
"entityType": "function"
},
{
- "id": "test_utils.py",
+ "id": "tests/test_utils",
+ "label": "test_utils",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_utils.py",
- "lines": 11
+ "fullPath": "tests/test_utils.py",
+ "lines": 11,
+ "imports": [
+ "pytest",
+ "pathlib",
+ "codegraph"
+ ]
},
{
- "id": "test_utils.py:test_get_python_paths_list_error",
- "label": "test_get_python_paths_list_error",
+ "id": "tests/test_utils:_",
+ "label": "_",
"type": "entity",
- "parent": "test_utils.py",
- "lines": 6,
+ "parent": "tests/test_utils",
+ "lines": 0,
"entityType": "function"
},
{
- "id": "test_utils.py:_",
- "label": "_",
+ "id": "tests/test_utils:test_get_python_paths_list_error",
+ "label": "test_get_python_paths_list_error",
"type": "entity",
- "parent": "test_utils.py",
- "lines": 0,
+ "parent": "tests/test_utils",
+ "lines": 6,
"entityType": "function"
},
{
- "id": "test_utils.py:test_get_python_paths_list",
+ "id": "tests/test_utils:test_get_python_paths_list",
"label": "test_get_python_paths_list",
"type": "entity",
- "parent": "test_utils.py",
+ "parent": "tests/test_utils",
"lines": 5,
"entityType": "function"
},
{
- "id": "alias_imports.py",
+ "id": "tests/__init__",
+ "label": "__init__",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_data\\alias_imports.py",
- "lines": 4
+ "fullPath": "tests/__init__.py",
+ "lines": 0,
+ "imports": []
+ },
+ {
+ "id": "tests/test_data/alias_imports",
+ "label": "alias_imports",
+ "type": "module",
+ "collapsed": false,
+ "fullPath": "tests/test_data/alias_imports.py",
+ "lines": 4,
+ "imports": [
+ "tests",
+ "tests"
+ ]
},
{
- "id": "alias_imports.py:use_aliases",
+ "id": "tests/test_data/alias_imports:use_aliases",
"label": "use_aliases",
"type": "entity",
- "parent": "alias_imports.py",
+ "parent": "tests/test_data/alias_imports",
"lines": 4,
"entityType": "function"
},
{
- "id": "alias_imports.py:_",
+ "id": "tests/test_data/alias_imports:_",
"label": "_",
"type": "entity",
- "parent": "alias_imports.py",
+ "parent": "tests/test_data/alias_imports",
"lines": 0,
"entityType": "function"
},
{
- "id": "comma_imports.py",
+ "id": "tests/test_data/comma_imports",
+ "label": "comma_imports",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_data\\comma_imports.py",
- "lines": 5
+ "fullPath": "tests/test_data/comma_imports.py",
+ "lines": 5,
+ "imports": [
+ "tests",
+ "tests",
+ "tests"
+ ]
},
{
- "id": "comma_imports.py:use_all",
+ "id": "tests/test_data/comma_imports:use_all",
"label": "use_all",
"type": "entity",
- "parent": "comma_imports.py",
+ "parent": "tests/test_data/comma_imports",
"lines": 5,
"entityType": "function"
},
{
- "id": "comma_imports.py:_",
+ "id": "tests/test_data/comma_imports:_",
"label": "_",
"type": "entity",
- "parent": "comma_imports.py",
+ "parent": "tests/test_data/comma_imports",
"lines": 0,
"entityType": "function"
},
{
- "id": "module_a.py",
+ "id": "tests/test_data/module_a",
+ "label": "module_a",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_data\\module_a.py",
- "lines": 7
+ "fullPath": "tests/test_data/module_a.py",
+ "lines": 7,
+ "imports": [
+ "tests",
+ "tests"
+ ]
},
{
- "id": "module_a.py:func_a",
+ "id": "tests/test_data/module_a:func_a",
"label": "func_a",
"type": "entity",
- "parent": "module_a.py",
+ "parent": "tests/test_data/module_a",
"lines": 4,
"entityType": "function"
},
{
- "id": "module_a.py:_",
+ "id": "tests/test_data/module_a:_",
"label": "_",
"type": "entity",
- "parent": "module_a.py",
+ "parent": "tests/test_data/module_a",
"lines": 0,
"entityType": "function"
},
{
- "id": "module_a.py:func_a2",
+ "id": "tests/test_data/module_a:func_a2",
"label": "func_a2",
"type": "entity",
- "parent": "module_a.py",
+ "parent": "tests/test_data/module_a",
"lines": 3,
"entityType": "function"
},
{
- "id": "module_b.py",
+ "id": "tests/test_data/module_b",
+ "label": "module_b",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_data\\module_b.py",
- "lines": 6
+ "fullPath": "tests/test_data/module_b.py",
+ "lines": 6,
+ "imports": [
+ "tests"
+ ]
},
{
- "id": "module_b.py:func_b",
+ "id": "tests/test_data/module_b:func_b",
"label": "func_b",
"type": "entity",
- "parent": "module_b.py",
+ "parent": "tests/test_data/module_b",
"lines": 3,
"entityType": "function"
},
{
- "id": "module_b.py:_",
+ "id": "tests/test_data/module_b:_",
"label": "_",
"type": "entity",
- "parent": "module_b.py",
+ "parent": "tests/test_data/module_b",
"lines": 0,
"entityType": "function"
},
{
- "id": "module_b.py:func_b2",
+ "id": "tests/test_data/module_b:func_b2",
"label": "func_b2",
"type": "entity",
- "parent": "module_b.py",
+ "parent": "tests/test_data/module_b",
"lines": 3,
"entityType": "function"
},
{
- "id": "module_c.py",
+ "id": "tests/test_data/module_c",
+ "label": "module_c",
"type": "module",
"collapsed": false,
- "fullPath": "codegraph\\tests\\test_data\\module_c.py",
- "lines": 6
+ "fullPath": "tests/test_data/module_c.py",
+ "lines": 6,
+ "imports": []
},
{
- "id": "module_c.py:func_c1",
+ "id": "tests/test_data/module_c:func_c1",
"label": "func_c1",
"type": "entity",
- "parent": "module_c.py",
+ "parent": "tests/test_data/module_c",
"lines": 3,
"entityType": "function"
},
{
- "id": "module_c.py:func_c2",
+ "id": "tests/test_data/module_c:func_c2",
"label": "func_c2",
"type": "entity",
- "parent": "module_c.py",
+ "parent": "tests/test_data/module_c",
+ "lines": 3,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/vizualyzer",
+ "label": "vizualyzer",
+ "type": "module",
+ "collapsed": false,
+ "fullPath": "tests/test_data/vizualyzer.py",
+ "lines": 90,
+ "imports": [
+ "os",
+ "matplotlib",
+ "networkx",
+ "typing"
+ ]
+ },
+ {
+ "id": "tests/test_data/vizualyzer:draw_graph",
+ "label": "draw_graph",
+ "type": "entity",
+ "parent": "tests/test_data/vizualyzer",
+ "lines": 73,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/vizualyzer:process_module_in_graph",
+ "label": "process_module_in_graph",
+ "type": "entity",
+ "parent": "tests/test_data/vizualyzer",
+ "lines": 17,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/src/main",
+ "label": "main",
+ "type": "module",
+ "collapsed": false,
+ "fullPath": "tests/test_data/duplicate_names/src/main.py",
+ "lines": 5,
+ "imports": [
+ "src",
+ "src"
+ ]
+ },
+ {
+ "id": "tests/test_data/duplicate_names/src/main:main",
+ "label": "main",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/src/main",
+ "lines": 5,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/src/main:_",
+ "label": "_",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/src/main",
+ "lines": 0,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/src/utils",
+ "label": "utils",
+ "type": "module",
+ "collapsed": false,
+ "fullPath": "tests/test_data/duplicate_names/src/utils.py",
+ "lines": 6,
+ "imports": []
+ },
+ {
+ "id": "tests/test_data/duplicate_names/src/utils:src_helper",
+ "label": "src_helper",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/src/utils",
+ "lines": 3,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/src/utils:common_function",
+ "label": "common_function",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/src/utils",
+ "lines": 3,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/tests/sample_test",
+ "label": "sample_test",
+ "type": "module",
+ "collapsed": false,
+ "fullPath": "tests/test_data/duplicate_names/tests/sample_test.py",
+ "lines": 5,
+ "imports": [
+ "tests",
+ "tests"
+ ]
+ },
+ {
+ "id": "tests/test_data/duplicate_names/tests/sample_test:test_something",
+ "label": "test_something",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/tests/sample_test",
+ "lines": 5,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/tests/sample_test:_",
+ "label": "_",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/tests/sample_test",
+ "lines": 0,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/tests/utils",
+ "label": "utils",
+ "type": "module",
+ "collapsed": false,
+ "fullPath": "tests/test_data/duplicate_names/tests/utils.py",
+ "lines": 6,
+ "imports": []
+ },
+ {
+ "id": "tests/test_data/duplicate_names/tests/utils:test_helper",
+ "label": "test_helper",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/tests/utils",
+ "lines": 3,
+ "entityType": "function"
+ },
+ {
+ "id": "tests/test_data/duplicate_names/tests/utils:common_function",
+ "label": "common_function",
+ "type": "entity",
+ "parent": "tests/test_data/duplicate_names/tests/utils",
"lines": 3,
"entityType": "function"
},
+ {
+ "id": "codegraph",
+ "type": "external",
+ "label": "codegraph",
+ "fullPath": "codegraph"
+ },
+ {
+ "id": "logging",
+ "type": "external",
+ "label": "logging",
+ "fullPath": "logging"
+ },
+ {
+ "id": "typing",
+ "type": "external",
+ "label": "typing",
+ "fullPath": "typing"
+ },
+ {
+ "id": "collections",
+ "type": "external",
+ "label": "collections",
+ "fullPath": "collections"
+ },
+ {
+ "id": "os",
+ "type": "external",
+ "label": "os",
+ "fullPath": "os"
+ },
+ {
+ "id": "argparse",
+ "type": "external",
+ "label": "argparse",
+ "fullPath": "argparse"
+ },
+ {
+ "id": "pprint",
+ "type": "external",
+ "label": "pprint",
+ "fullPath": "pprint"
+ },
+ {
+ "id": "sys",
+ "type": "external",
+ "label": "sys",
+ "fullPath": "sys"
+ },
+ {
+ "id": "click",
+ "type": "external",
+ "label": "click",
+ "fullPath": "click"
+ },
{
"id": "object",
"type": "external",
"label": "object"
+ },
+ {
+ "id": "token",
+ "type": "external",
+ "label": "token",
+ "fullPath": "token"
+ },
+ {
+ "id": "tokenize",
+ "type": "external",
+ "label": "tokenize",
+ "fullPath": "tokenize"
+ },
+ {
+ "id": "io",
+ "type": "external",
+ "label": "io",
+ "fullPath": "io"
+ },
+ {
+ "id": "pathlib",
+ "type": "external",
+ "label": "pathlib",
+ "fullPath": "pathlib"
+ },
+ {
+ "id": "glob",
+ "type": "external",
+ "label": "glob",
+ "fullPath": "glob"
+ },
+ {
+ "id": "json",
+ "type": "external",
+ "label": "json",
+ "fullPath": "json"
+ },
+ {
+ "id": "csv",
+ "type": "external",
+ "label": "csv",
+ "fullPath": "csv"
+ },
+ {
+ "id": "matplotlib",
+ "type": "external",
+ "label": "matplotlib",
+ "fullPath": "matplotlib"
+ },
+ {
+ "id": "networkx",
+ "type": "external",
+ "label": "networkx",
+ "fullPath": "networkx"
+ },
+ {
+ "id": "webbrowser",
+ "type": "external",
+ "label": "webbrowser",
+ "fullPath": "webbrowser"
+ },
+ {
+ "id": "tempfile",
+ "type": "external",
+ "label": "tempfile",
+ "fullPath": "tempfile"
+ },
+ {
+ "id": "pytest",
+ "type": "external",
+ "label": "pytest",
+ "fullPath": "pytest"
+ },
+ {
+ "id": "tests",
+ "type": "external",
+ "label": "tests",
+ "fullPath": "tests"
+ },
+ {
+ "id": "src",
+ "type": "external",
+ "label": "src",
+ "fullPath": "src"
}
],
"links": [
{
- "source": "core.py",
- "target": "core.py:parse_code_file",
+ "source": "codegraph/core",
+ "target": "codegraph/core:parse_code_file",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:parse_code_file",
+ "target": "codegraph/parser:create_objects_array",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:parse_code_file",
+ "target": "codegraph/core:read_file_content",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:CodeGraph",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:read_file_content",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:read_file_content",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:parse_code_file",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:parse_code_file",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:get_code_objects",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:get_imports_and_entities_lines",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:collect_entities_usage_in_modules",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:CodeGraph",
+ "target": "codegraph/core:populate_free_nodes",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:collect_entities_usage_in_modules",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:collect_entities_usage_in_modules",
+ "target": "codegraph/core:read_file_content",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:collect_entities_usage_in_modules",
+ "target": "codegraph/core:get_module_name",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:collect_entities_usage_in_modules",
+ "target": "codegraph/core:search_entities_from_module_in_code",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:collect_entities_usage_in_modules",
+ "target": "codegraph/core:search_entities_from_module_in_code",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:get_code_objects",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:get_code_objects",
+ "target": "codegraph/core:parse_code_file",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:get_imports_and_entities_lines",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:get_imports_and_entities_lines",
+ "target": "codegraph/core:get_module_name",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:get_imports_and_entities_lines",
+ "target": "codegraph/core:get_module_name",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:search_entities_from_list_in_code",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:search_entities_from_list_in_code",
+ "target": "codegraph/core:search_entity_usage",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:search_entities_from_module_in_code",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:search_entities_from_module_in_code",
+ "target": "codegraph/core:search_entities_from_list_in_code",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:_",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:read_file_content",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:get_module_name",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:module_name_in_imports",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:populate_free_nodes",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/core",
+ "target": "codegraph/core:search_entity_usage",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/main",
+ "target": "codegraph/main:main",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/main:main",
+ "target": "codegraph/vizualyzer:draw_graph",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main:main",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main:main",
+ "target": "codegraph/main:cli",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main",
+ "target": "codegraph/main:_",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/main:_",
+ "target": "codegraph/main:main",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/main",
+ "target": "codegraph/main:cli",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:Function",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:Function",
+ "target": "codegraph/parser:_Object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:Function",
+ "target": "codegraph/parser:_Object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:AsyncFunction",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:AsyncFunction",
+ "target": "codegraph/parser:_Object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:AsyncFunction",
+ "target": "codegraph/parser:_Object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:Class",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:Class",
+ "target": "codegraph/parser:_Object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:Class",
+ "target": "codegraph/parser:_Object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:_nest_function",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:_nest_function",
+ "target": "codegraph/parser:Function",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:create_objects_array",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:Function",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:Function",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:Class",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:Import",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:Import",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:_nest_function",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:_nest_function",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:AsyncFunction",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser:create_objects_array",
+ "target": "codegraph/parser:_nest_class",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:_nest_class",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:_nest_class",
+ "target": "codegraph/parser:Class",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:_Object",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser",
+ "target": "codegraph/parser:Import",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/parser:Import",
+ "target": "object",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/utils",
+ "target": "codegraph/utils:get_relative_path",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/utils",
+ "target": "codegraph/utils:get_python_paths_list",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:draw_graph_matplotlib",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer:draw_graph_matplotlib",
+ "target": "codegraph/vizualyzer:process_module_in_graph",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:_read_template_file",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer:_read_template_file",
+ "target": "codegraph/vizualyzer:_get_template_dir",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:get_d3_html_template",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer:get_d3_html_template",
+ "target": "codegraph/vizualyzer:_read_template_file",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer:get_d3_html_template",
+ "target": "codegraph/vizualyzer:_read_template_file",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer:get_d3_html_template",
+ "target": "codegraph/vizualyzer:_read_template_file",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:draw_graph",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer:draw_graph",
+ "target": "codegraph/vizualyzer:convert_to_d3_format",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer:draw_graph",
+ "target": "codegraph/vizualyzer:get_d3_html_template",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:export_to_csv",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer:export_to_csv",
+ "target": "codegraph/vizualyzer:convert_to_d3_format",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:_",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:process_module_in_graph",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:convert_to_d3_format",
+ "type": "module-entity"
+ },
+ {
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/vizualyzer:_get_template_dir",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_codegraph",
+ "target": "tests/test_codegraph:test_main",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_codegraph:test_main",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_codegraph",
+ "target": "tests/test_codegraph:_",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_codegraph:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:TestCodeGraphConnections",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_graph_generation:TestCodeGraphConnections",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation:TestCodeGraphConnections",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:TestCodeGraphOnItself",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_graph_generation:TestCodeGraphOnItself",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation:TestCodeGraphOnItself",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation:TestCodeGraphOnItself",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:TestCSVExport",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_graph_generation:TestCSVExport",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:TestDuplicateFilenames",
"type": "module-entity"
},
{
- "source": "core.py:parse_code_file",
- "target": "parser.py:create_objects_array",
+ "source": "tests/test_graph_generation:TestDuplicateFilenames",
+ "target": "codegraph/core:CodeGraph",
"type": "dependency"
},
{
- "source": "core.py:parse_code_file",
- "target": "core.py:read_file_content",
+ "source": "tests/test_graph_generation:TestDuplicateFilenames",
+ "target": "codegraph/core:CodeGraph",
"type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:CodeGraph",
+ "source": "tests/test_graph_generation:TestDuplicateFilenames",
+ "target": "codegraph/core:CodeGraph",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:TestImportParsing",
"type": "module-entity"
},
{
- "source": "core.py:CodeGraph",
- "target": "utils.py:get_python_paths_list",
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
"type": "dependency"
},
{
- "source": "core.py:CodeGraph",
- "target": "core.py:get_code_objects",
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
"type": "dependency"
},
{
- "source": "core.py:CodeGraph",
- "target": "core.py:get_imports_and_entities_lines",
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
"type": "dependency"
},
{
- "source": "core.py:CodeGraph",
- "target": "core.py:collect_entities_usage_in_modules",
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
"type": "dependency"
},
{
- "source": "core.py:CodeGraph",
- "target": "core.py:populate_free_nodes",
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
"type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:collect_entities_usage_in_modules",
- "type": "module-entity"
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
+ "type": "dependency"
},
{
- "source": "core.py:collect_entities_usage_in_modules",
- "target": "core.py:read_file_content",
+ "source": "tests/test_graph_generation:TestImportParsing",
+ "target": "codegraph/parser:create_objects_array",
"type": "dependency"
},
{
- "source": "core.py:collect_entities_usage_in_modules",
- "target": "core.py:get_module_name",
- "type": "dependency"
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:_",
+ "type": "module-entity"
},
{
- "source": "core.py:collect_entities_usage_in_modules",
- "target": "core.py:search_entities_from_module_in_code",
+ "source": "tests/test_graph_generation:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "core.py:collect_entities_usage_in_modules",
- "target": "core.py:search_entities_from_module_in_code",
+ "source": "tests/test_graph_generation:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:get_code_objects",
- "type": "module-entity"
+ "source": "tests/test_graph_generation:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
},
{
- "source": "core.py:get_code_objects",
- "target": "core.py:parse_code_file",
- "type": "dependency"
+ "source": "tests/test_graph_generation",
+ "target": "tests/test_graph_generation:TestD3FormatConversion",
+ "type": "module-entity"
},
{
- "source": "core.py",
- "target": "core.py:get_imports_and_entities_lines",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:test_d3_visualization_without_matplotlib",
"type": "module-entity"
},
{
- "source": "core.py:get_imports_and_entities_lines",
- "target": "core.py:get_module_name",
+ "source": "tests/test_package_install:test_d3_visualization_without_matplotlib",
+ "target": "codegraph/vizualyzer:draw_graph",
"type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:search_entities_from_list_in_code",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:test_codegraph_on_itself_without_matplotlib",
"type": "module-entity"
},
{
- "source": "core.py:search_entities_from_list_in_code",
- "target": "core.py:search_entity_usage",
+ "source": "tests/test_package_install:test_codegraph_on_itself_without_matplotlib",
+ "target": "codegraph/core:CodeGraph",
"type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:search_entities_from_module_in_code",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:_",
"type": "module-entity"
},
{
- "source": "core.py:search_entities_from_module_in_code",
- "target": "core.py:search_entities_from_list_in_code",
+ "source": "tests/test_package_install:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:_",
- "type": "module-entity"
+ "source": "tests/test_package_install:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:read_file_content",
- "type": "module-entity"
+ "source": "tests/test_package_install:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:get_module_name",
- "type": "module-entity"
+ "source": "tests/test_package_install:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
},
{
- "source": "core.py",
- "target": "core.py:module_name_in_imports",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:test_import_codegraph",
"type": "module-entity"
},
{
- "source": "core.py",
- "target": "core.py:populate_free_nodes",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:test_import_core",
"type": "module-entity"
},
{
- "source": "core.py",
- "target": "core.py:search_entity_usage",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:test_import_vizualyzer",
"type": "module-entity"
},
{
- "source": "main.py",
- "target": "main.py:main",
+ "source": "tests/test_package_install",
+ "target": "tests/test_package_install:test_cli_help",
"type": "module-entity"
},
{
- "source": "main.py:main",
- "target": "vizualyzer.py:draw_graph",
- "type": "dependency"
- },
- {
- "source": "main.py:main",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "tests/test_utils",
+ "target": "tests/test_utils:_",
+ "type": "module-entity"
},
{
- "source": "main.py:main",
- "target": "main.py:cli",
+ "source": "tests/test_utils:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "main.py",
- "target": "main.py:_",
+ "source": "tests/test_utils",
+ "target": "tests/test_utils:test_get_python_paths_list_error",
"type": "module-entity"
},
{
- "source": "main.py:_",
- "target": "main.py:main",
- "type": "dependency"
- },
- {
- "source": "main.py",
- "target": "main.py:cli",
+ "source": "tests/test_utils",
+ "target": "tests/test_utils:test_get_python_paths_list",
"type": "module-entity"
},
{
- "source": "parser.py",
- "target": "parser.py:Function",
+ "source": "tests/test_data/alias_imports",
+ "target": "tests/test_data/alias_imports:use_aliases",
"type": "module-entity"
},
{
- "source": "parser.py:Function",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/alias_imports:use_aliases",
+ "target": "tests/test_data/module_a:func_a",
"type": "dependency"
},
{
- "source": "parser.py:Function",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/alias_imports:use_aliases",
+ "target": "tests/test_data/module_b:func_b",
"type": "dependency"
},
{
- "source": "parser.py",
- "target": "parser.py:AsyncFunction",
+ "source": "tests/test_data/alias_imports",
+ "target": "tests/test_data/alias_imports:_",
"type": "module-entity"
},
{
- "source": "parser.py:AsyncFunction",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/alias_imports:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py:AsyncFunction",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/alias_imports:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py",
- "target": "parser.py:Class",
+ "source": "tests/test_data/comma_imports",
+ "target": "tests/test_data/comma_imports:use_all",
"type": "module-entity"
},
{
- "source": "parser.py:Class",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/comma_imports:use_all",
+ "target": "tests/test_data/module_c:func_c1",
"type": "dependency"
},
{
- "source": "parser.py:Class",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/comma_imports:use_all",
+ "target": "tests/test_data/module_b:func_b",
"type": "dependency"
},
{
- "source": "parser.py",
- "target": "parser.py:_nest_function",
- "type": "module-entity"
- },
- {
- "source": "parser.py:_nest_function",
- "target": "parser.py:Function",
+ "source": "tests/test_data/comma_imports:use_all",
+ "target": "tests/test_data/module_a:func_a",
"type": "dependency"
},
{
- "source": "parser.py",
- "target": "parser.py:create_objects_array",
+ "source": "tests/test_data/comma_imports",
+ "target": "tests/test_data/comma_imports:_",
"type": "module-entity"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:Function",
+ "source": "tests/test_data/comma_imports:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:Function",
+ "source": "tests/test_data/comma_imports:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:Class",
+ "source": "tests/test_data/comma_imports:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:Import",
- "type": "dependency"
+ "source": "tests/test_data/module_a",
+ "target": "tests/test_data/module_a:func_a",
+ "type": "module-entity"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:Import",
+ "source": "tests/test_data/module_a:func_a",
+ "target": "tests/test_data/module_c:func_c1",
"type": "dependency"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:_nest_function",
+ "source": "tests/test_data/module_a:func_a",
+ "target": "tests/test_data/module_b:func_b",
"type": "dependency"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:_nest_function",
- "type": "dependency"
+ "source": "tests/test_data/module_a",
+ "target": "tests/test_data/module_a:_",
+ "type": "module-entity"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:AsyncFunction",
+ "source": "tests/test_data/module_a:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py:create_objects_array",
- "target": "parser.py:_nest_class",
+ "source": "tests/test_data/module_a:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "parser.py",
- "target": "parser.py:_nest_class",
+ "source": "tests/test_data/module_a",
+ "target": "tests/test_data/module_a:func_a2",
"type": "module-entity"
},
{
- "source": "parser.py:_nest_class",
- "target": "parser.py:Class",
+ "source": "tests/test_data/module_b",
+ "target": "tests/test_data/module_b:func_b",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_data/module_b:func_b",
+ "target": "tests/test_data/module_c:func_c2",
"type": "dependency"
},
{
- "source": "parser.py",
- "target": "parser.py:_Object",
+ "source": "tests/test_data/module_b",
+ "target": "tests/test_data/module_b:_",
"type": "module-entity"
},
{
- "source": "parser.py",
- "target": "parser.py:Import",
+ "source": "tests/test_data/module_b:_",
+ "target": "codegraph/core:_",
+ "type": "dependency"
+ },
+ {
+ "source": "tests/test_data/module_b",
+ "target": "tests/test_data/module_b:func_b2",
"type": "module-entity"
},
{
- "source": "parser.py:Import",
- "target": "object",
- "type": "dependency"
+ "source": "tests/test_data/module_c",
+ "target": "tests/test_data/module_c:func_c1",
+ "type": "module-entity"
},
{
- "source": "utils.py",
- "target": "utils.py:get_python_paths_list",
+ "source": "tests/test_data/module_c",
+ "target": "tests/test_data/module_c:func_c2",
"type": "module-entity"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:draw_graph_matplotlib",
+ "source": "tests/test_data/vizualyzer",
+ "target": "tests/test_data/vizualyzer:draw_graph",
"type": "module-entity"
},
{
- "source": "vizualyzer.py:draw_graph_matplotlib",
- "target": "vizualyzer.py:process_module_in_graph",
+ "source": "tests/test_data/vizualyzer:draw_graph",
+ "target": "codegraph/vizualyzer:process_module_in_graph",
"type": "dependency"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:_read_template_file",
+ "source": "tests/test_data/vizualyzer",
+ "target": "tests/test_data/vizualyzer:process_module_in_graph",
+ "type": "module-entity"
+ },
+ {
+ "source": "tests/test_data/duplicate_names/src/main",
+ "target": "tests/test_data/duplicate_names/src/main:main",
"type": "module-entity"
},
{
- "source": "vizualyzer.py:_read_template_file",
- "target": "vizualyzer.py:_get_template_dir",
+ "source": "tests/test_data/duplicate_names/src/main:main",
+ "target": "tests/test_data/duplicate_names/src/utils:common_function",
"type": "dependency"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:get_d3_html_template",
+ "source": "tests/test_data/duplicate_names/src/main",
+ "target": "tests/test_data/duplicate_names/src/main:_",
"type": "module-entity"
},
{
- "source": "vizualyzer.py:get_d3_html_template",
- "target": "vizualyzer.py:_read_template_file",
+ "source": "tests/test_data/duplicate_names/src/main:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "vizualyzer.py:get_d3_html_template",
- "target": "vizualyzer.py:_read_template_file",
- "type": "dependency"
+ "source": "tests/test_data/duplicate_names/src/utils",
+ "target": "tests/test_data/duplicate_names/src/utils:src_helper",
+ "type": "module-entity"
},
{
- "source": "vizualyzer.py:get_d3_html_template",
- "target": "vizualyzer.py:_read_template_file",
- "type": "dependency"
+ "source": "tests/test_data/duplicate_names/src/utils",
+ "target": "tests/test_data/duplicate_names/src/utils:common_function",
+ "type": "module-entity"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:draw_graph",
+ "source": "tests/test_data/duplicate_names/tests/sample_test",
+ "target": "tests/test_data/duplicate_names/tests/sample_test:test_something",
"type": "module-entity"
},
{
- "source": "vizualyzer.py:draw_graph",
- "target": "vizualyzer.py:convert_to_d3_format",
+ "source": "tests/test_data/duplicate_names/tests/sample_test:test_something",
+ "target": "tests/test_data/duplicate_names/tests/utils:test_helper",
"type": "dependency"
},
{
- "source": "vizualyzer.py:draw_graph",
- "target": "vizualyzer.py:get_d3_html_template",
+ "source": "tests/test_data/duplicate_names/tests/sample_test:test_something",
+ "target": "tests/test_data/duplicate_names/src/utils:common_function",
"type": "dependency"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:export_to_csv",
+ "source": "tests/test_data/duplicate_names/tests/sample_test",
+ "target": "tests/test_data/duplicate_names/tests/sample_test:_",
"type": "module-entity"
},
{
- "source": "vizualyzer.py:export_to_csv",
- "target": "vizualyzer.py:convert_to_d3_format",
+ "source": "tests/test_data/duplicate_names/tests/sample_test:_",
+ "target": "codegraph/core:_",
"type": "dependency"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:process_module_in_graph",
+ "source": "tests/test_data/duplicate_names/tests/utils",
+ "target": "tests/test_data/duplicate_names/tests/utils:test_helper",
"type": "module-entity"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:convert_to_d3_format",
+ "source": "tests/test_data/duplicate_names/tests/utils",
+ "target": "tests/test_data/duplicate_names/tests/utils:common_function",
"type": "module-entity"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:_get_template_dir",
- "type": "module-entity"
+ "source": "tests/test_data/duplicate_names/src/utils",
+ "target": "tests/test_data/duplicate_names/tests/sample_test",
+ "type": "module-module"
},
{
- "source": "test_codegraph.py",
- "target": "test_codegraph.py:test_main",
- "type": "module-entity"
+ "source": "os",
+ "target": "codegraph/core",
+ "type": "module-module"
},
{
- "source": "test_codegraph.py:test_main",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "tempfile",
+ "target": "tests/test_graph_generation",
+ "type": "module-module"
},
{
- "source": "test_codegraph.py",
- "target": "test_codegraph.py:_",
- "type": "module-entity"
+ "source": "webbrowser",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "test_graph_generation.py:TestImportParsing",
- "type": "module-entity"
+ "source": "tests",
+ "target": "tests/test_data/duplicate_names/tests/sample_test",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "csv",
+ "target": "tests/test_graph_generation",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "codegraph",
+ "target": "tests/test_graph_generation",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "argparse",
+ "target": "tests/test_package_install",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "codegraph/core",
+ "target": "tests/test_data/module_a",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "networkx",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "codegraph/core",
+ "target": "tests/test_graph_generation",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestImportParsing",
- "target": "parser.py:create_objects_array",
- "type": "dependency"
+ "source": "os",
+ "target": "tests/test_package_install",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "test_graph_generation.py:TestCodeGraphConnections",
- "type": "module-entity"
+ "source": "pprint",
+ "target": "codegraph/main",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestCodeGraphConnections",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "pathlib",
+ "target": "tests/test_codegraph",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestCodeGraphConnections",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "csv",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "test_graph_generation.py:TestCodeGraphOnItself",
- "type": "module-entity"
+ "source": "tests/test_data/module_a",
+ "target": "tests/test_data/alias_imports",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestCodeGraphOnItself",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "argparse",
+ "target": "tests/test_codegraph",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestCodeGraphOnItself",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "tests/test_data/module_c",
+ "target": "tests/test_data/module_a",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestCodeGraphOnItself",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "typing",
+ "target": "codegraph/core",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "test_graph_generation.py:TestCSVExport",
- "type": "module-entity"
+ "source": "matplotlib",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py:TestCSVExport",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "token",
+ "target": "codegraph/parser",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "test_graph_generation.py:_",
- "type": "module-entity"
+ "source": "codegraph/core",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "test_graph_generation.py:TestD3FormatConversion",
- "type": "module-entity"
+ "source": "io",
+ "target": "codegraph/parser",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:test_codegraph_on_itself_without_matplotlib",
- "type": "module-entity"
+ "source": "logging",
+ "target": "codegraph/core",
+ "type": "module-module"
},
{
- "source": "test_package_install.py:test_codegraph_on_itself_without_matplotlib",
- "target": "core.py:CodeGraph",
- "type": "dependency"
+ "source": "codegraph/parser",
+ "target": "tests/test_graph_generation",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:test_d3_visualization_without_matplotlib",
- "type": "module-entity"
+ "source": "argparse",
+ "target": "codegraph/main",
+ "type": "module-module"
},
{
- "source": "test_package_install.py:test_d3_visualization_without_matplotlib",
- "target": "vizualyzer.py:draw_graph",
- "type": "dependency"
+ "source": "codegraph",
+ "target": "tests/test_utils",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:_",
- "type": "module-entity"
+ "source": "matplotlib",
+ "target": "tests/test_data/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:test_import_codegraph",
- "type": "module-entity"
+ "source": "tests/test_data/module_b",
+ "target": "tests/test_data/module_a",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:test_import_core",
- "type": "module-entity"
+ "source": "tests",
+ "target": "tests/test_data/module_a",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:test_import_vizualyzer",
- "type": "module-entity"
+ "source": "codegraph/core",
+ "target": "tests/test_data/comma_imports",
+ "type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "test_package_install.py:test_cli_help",
- "type": "module-entity"
+ "source": "logging",
+ "target": "codegraph/main",
+ "type": "module-module"
},
{
- "source": "test_utils.py",
- "target": "test_utils.py:test_get_python_paths_list_error",
- "type": "module-entity"
+ "source": "typing",
+ "target": "codegraph/utils",
+ "type": "module-module"
},
{
- "source": "test_utils.py:test_get_python_paths_list_error",
- "target": "utils.py:get_python_paths_list",
- "type": "dependency"
+ "source": "codegraph/core",
+ "target": "tests/test_data/alias_imports",
+ "type": "module-module"
},
{
- "source": "test_utils.py",
- "target": "test_utils.py:_",
- "type": "module-entity"
+ "source": "pathlib",
+ "target": "tests/test_graph_generation",
+ "type": "module-module"
},
{
- "source": "test_utils.py:_",
- "target": "utils.py:get_python_paths_list",
- "type": "dependency"
+ "source": "json",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "test_utils.py",
- "target": "test_utils.py:test_get_python_paths_list",
- "type": "module-entity"
+ "source": "pathlib",
+ "target": "codegraph/utils",
+ "type": "module-module"
},
{
- "source": "alias_imports.py",
- "target": "alias_imports.py:use_aliases",
- "type": "module-entity"
+ "source": "click",
+ "target": "codegraph/main",
+ "type": "module-module"
},
{
- "source": "alias_imports.py:use_aliases",
- "target": "module_b.py:func_b",
- "type": "dependency"
+ "source": "codegraph",
+ "target": "tests/test_codegraph",
+ "type": "module-module"
},
{
- "source": "alias_imports.py:use_aliases",
- "target": "module_a.py:func_a",
- "type": "dependency"
+ "source": "click",
+ "target": "tests/test_package_install",
+ "type": "module-module"
},
{
- "source": "alias_imports.py",
- "target": "alias_imports.py:_",
- "type": "module-entity"
+ "source": "tests/test_data/module_c",
+ "target": "tests/test_data/comma_imports",
+ "type": "module-module"
},
{
- "source": "comma_imports.py",
- "target": "comma_imports.py:use_all",
- "type": "module-entity"
+ "source": "networkx",
+ "target": "tests/test_data/vizualyzer",
+ "type": "module-module"
},
{
- "source": "comma_imports.py:use_all",
- "target": "module_b.py:func_b",
- "type": "dependency"
+ "source": "os",
+ "target": "codegraph/utils",
+ "type": "module-module"
},
{
- "source": "comma_imports.py:use_all",
- "target": "module_a.py:func_a",
- "type": "dependency"
+ "source": "typing",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "comma_imports.py:use_all",
- "target": "module_c.py:func_c1",
- "type": "dependency"
+ "source": "codegraph",
+ "target": "codegraph/core",
+ "type": "module-module"
},
{
- "source": "comma_imports.py",
- "target": "comma_imports.py:_",
- "type": "module-entity"
+ "source": "pytest",
+ "target": "tests/test_utils",
+ "type": "module-module"
},
{
- "source": "module_a.py",
- "target": "module_a.py:func_a",
- "type": "module-entity"
+ "source": "codegraph/core",
+ "target": "tests/test_data/duplicate_names/src/main",
+ "type": "module-module"
},
{
- "source": "module_a.py:func_a",
- "target": "module_b.py:func_b",
- "type": "dependency"
+ "source": "codegraph/parser",
+ "target": "codegraph/core",
+ "type": "module-module"
},
{
- "source": "module_a.py:func_a",
- "target": "module_c.py:func_c1",
- "type": "dependency"
+ "source": "codegraph/vizualyzer",
+ "target": "tests/test_data/vizualyzer",
+ "type": "module-module"
},
{
- "source": "module_a.py",
- "target": "module_a.py:_",
- "type": "module-entity"
+ "source": "tests/test_data/duplicate_names/tests/utils",
+ "target": "tests/test_data/duplicate_names/tests/sample_test",
+ "type": "module-module"
},
{
- "source": "module_a.py",
- "target": "module_a.py:func_a2",
- "type": "module-entity"
+ "source": "sys",
+ "target": "codegraph/main",
+ "type": "module-module"
},
{
- "source": "module_b.py",
- "target": "module_b.py:func_b",
- "type": "module-entity"
+ "source": "tempfile",
+ "target": "tests/test_package_install",
+ "type": "module-module"
},
{
- "source": "module_b.py:func_b",
- "target": "module_c.py:func_c2",
- "type": "dependency"
+ "source": "os",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "module_b.py",
- "target": "module_b.py:_",
- "type": "module-entity"
+ "source": "glob",
+ "target": "codegraph/utils",
+ "type": "module-module"
},
{
- "source": "module_b.py",
- "target": "module_b.py:func_b2",
- "type": "module-entity"
+ "source": "codegraph",
+ "target": "codegraph/main",
+ "type": "module-module"
},
{
- "source": "module_c.py",
- "target": "module_c.py:func_c1",
- "type": "module-entity"
+ "source": "logging",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
},
{
- "source": "module_c.py",
- "target": "module_c.py:func_c2",
- "type": "module-entity"
+ "source": "codegraph",
+ "target": "tests/test_package_install",
+ "type": "module-module"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:draw_graph",
- "type": "module-entity"
+ "source": "codegraph/core",
+ "target": "tests/test_data/module_b",
+ "type": "module-module"
},
{
- "source": "vizualyzer.py:draw_graph",
- "target": "vizualyzer.py:process_module_in_graph",
- "type": "dependency"
+ "source": "codegraph/core",
+ "target": "tests/test_utils",
+ "type": "module-module"
},
{
- "source": "vizualyzer.py",
- "target": "vizualyzer.py:process_module_in_graph",
- "type": "module-entity"
+ "source": "tests/test_data/module_b",
+ "target": "tests/test_data/comma_imports",
+ "type": "module-module"
},
{
- "source": "core.py",
- "target": "utils.py",
+ "source": "codegraph/core",
+ "target": "codegraph/main",
"type": "module-module"
},
{
- "source": "test_codegraph.py",
- "target": "core.py",
+ "source": "codegraph/core",
+ "target": "tests/test_data/duplicate_names/tests/sample_test",
"type": "module-module"
},
{
- "source": "main.py",
- "target": "__init__.py",
+ "source": "tests",
+ "target": "tests/test_data/comma_imports",
"type": "module-module"
},
{
- "source": "test_utils.py",
- "target": "utils.py",
+ "source": "codegraph/core",
+ "target": "tests/test_package_install",
"type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "main.py",
+ "source": "tests/test_data/module_b",
+ "target": "tests/test_data/alias_imports",
"type": "module-module"
},
{
- "source": "module_a.py",
- "target": "module_b.py",
+ "source": "argparse",
+ "target": "tests/test_graph_generation",
"type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "parser.py",
+ "source": "src",
+ "target": "tests/test_data/duplicate_names/src/main",
"type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "__init__.py",
+ "source": "tests/test_data/module_c",
+ "target": "tests/test_data/module_b",
"type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "core.py",
+ "source": "pathlib",
+ "target": "tests/test_utils",
"type": "module-module"
},
{
- "source": "module_b.py",
- "target": "module_c.py",
+ "source": "tokenize",
+ "target": "codegraph/parser",
"type": "module-module"
},
{
- "source": "main.py",
- "target": "core.py",
+ "source": "tests",
+ "target": "tests/test_data/alias_imports",
"type": "module-module"
},
{
- "source": "core.py",
- "target": "parser.py",
+ "source": "os",
+ "target": "tests/test_data/vizualyzer",
"type": "module-module"
},
{
- "source": "main.py",
- "target": "vizualyzer.py",
+ "source": "codegraph/core",
+ "target": "tests/test_codegraph",
"type": "module-module"
},
{
- "source": "comma_imports.py",
- "target": "module_c.py",
+ "source": "tests/test_data/module_a",
+ "target": "tests/test_data/comma_imports",
"type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "core.py",
+ "source": "tests/test_data/duplicate_names/src/utils",
+ "target": "tests/test_data/duplicate_names/src/main",
"type": "module-module"
},
{
- "source": "test_graph_generation.py",
- "target": "vizualyzer.py",
+ "source": "collections",
+ "target": "codegraph/core",
"type": "module-module"
},
{
- "source": "alias_imports.py",
- "target": "module_b.py",
+ "source": "typing",
+ "target": "codegraph/parser",
"type": "module-module"
},
{
- "source": "alias_imports.py",
- "target": "module_a.py",
+ "source": "codegraph",
+ "target": "codegraph/vizualyzer",
"type": "module-module"
},
{
- "source": "test_package_install.py",
- "target": "vizualyzer.py",
+ "source": "codegraph/vizualyzer",
+ "target": "codegraph/main",
"type": "module-module"
},
{
- "source": "comma_imports.py",
- "target": "module_b.py",
+ "source": "codegraph/vizualyzer",
+ "target": "tests/test_package_install",
"type": "module-module"
},
{
- "source": "comma_imports.py",
- "target": "module_a.py",
+ "source": "typing",
+ "target": "tests/test_data/vizualyzer",
"type": "module-module"
},
{
- "source": "module_a.py",
- "target": "module_c.py",
+ "source": "argparse",
+ "target": "codegraph/core",
+ "type": "module-module"
+ },
+ {
+ "source": "click",
+ "target": "codegraph/vizualyzer",
+ "type": "module-module"
+ },
+ {
+ "source": "tests",
+ "target": "tests/test_data/module_b",
"type": "module-module"
}
],
- "unlinkedModules": []
+ "unlinkedModules": [
+ {
+ "id": "codegraph/__init__",
+ "fullPath": "codegraph/__init__.py"
+ },
+ {
+ "id": "tests/__init__",
+ "fullPath": "tests/__init__.py"
+ }
+ ]
};
// Panel drag and collapse functionality
@@ -2308,7 +3330,7 @@
Highlight Settings
updateLinksCount();
// Size scaling state
-let sizeByCode = true;
+let sizeByCode = false;
// Calculate max lines for scaling
const maxLines = Math.max(...graphData.nodes.map(n => n.lines || 0), 1);
@@ -2393,11 +3415,14 @@
Highlight Settings
node.each(function(d) {
const el = d3.select(this);
const isHighlighted = el.classed('highlighted-main') || el.classed('highlighted');
- const multiplier = isHighlighted ? iconWireScaleFactor / scale : 1;
+ const isDimmed = el.classed('dimmed');
+ const multiplier = (isHighlighted && !isDimmed) ? iconWireScaleFactor / scale : 1;
if (d.type === "module") {
const baseSize = getNodeSize(d, 30);
const size = baseSize * multiplier;
- const clampedSize = Math.max(10, Math.min(200, size));
+ // Use scale factor to determine reasonable max (higher scale factor = higher max)
+ const maxSize = 200 * iconWireScaleFactor;
+ const clampedSize = Math.max(10, Math.min(maxSize, size));
el.select("rect")
.attr("width", clampedSize)
.attr("height", clampedSize)
@@ -2406,7 +3431,9 @@
Highlight Settings
} else if (d.type === "entity" || d.type === "external") {
const baseR = getNodeSize(d, 10);
const r = baseR * multiplier;
- const clampedR = Math.max(5, Math.min(100, r));
+ // Use scale factor to determine reasonable max (higher scale factor = higher max)
+ const maxR = 100 * iconWireScaleFactor;
+ const clampedR = Math.max(5, Math.min(maxR, r));
el.select("circle").attr("r", clampedR);
}
});
@@ -2414,10 +3441,18 @@
Highlight Settings
link.each(function(d) {
const el = d3.select(this);
const isHighlighted = el.classed('highlighted');
- const multiplier = isHighlighted ? iconWireScaleFactor / scale : 1;
+ const isDimmed = el.classed('dimmed');
+
+ // Use same multiplier as icons - only highlighted arrows scale with zoom
+ const multiplier = (isHighlighted && !isDimmed) ? iconWireScaleFactor / scale : 1;
+
+ // Use same base width for all link types for consistent arrow scaling
const baseWidth = 2;
+
const width = baseWidth * multiplier;
- const clampedWidth = Math.max(1, Math.min(10, width));
+ // Reduce max for better balance
+ const maxWidth = 18.75 * iconWireScaleFactor;
+ const clampedWidth = Math.max(1, Math.min(maxWidth, width));
el.style("stroke-width", clampedWidth + "px");
});
// Update labels position
@@ -2444,6 +3479,10 @@
Highlight Settings
} else if (d.type === 'module-entity') {
if (isOut && highlightLinkFilters.meOut) return true;
if (isIn && highlightLinkFilters.meIn) return true;
+ } else if (d.type === 'dependency') {
+ // Entity-to-entity or entity-to-external dependencies
+ // Always highlight these when the entity is selected
+ if (isOut || isIn) return true;
}
return false;
}
@@ -2512,10 +3551,10 @@
Highlight Settings
defs.append("marker")
.attr("id", "arrow-module-module")
.attr("viewBox", "0 -5 10 10")
- .attr("refX", 25)
+ .attr("refX", 18)
.attr("refY", 0)
- .attr("markerWidth", 8)
- .attr("markerHeight", 8)
+ .attr("markerWidth", 6)
+ .attr("markerHeight", 6)
.attr("orient", "auto")
.append("path")
.attr("fill", "#ff9800")
@@ -2651,8 +3690,8 @@
Highlight Settings
// Display filter state
const displayFilters = {
showModules: true,
- showClasses: true,
- showFunctions: true,
+ showClasses: false,
+ showFunctions: false,
showExternal: true,
showLinkModule: true,
showLinkEntity: true,
@@ -2663,30 +3702,37 @@
Highlight Settings
document.getElementById('show-modules').addEventListener('change', function() {
displayFilters.showModules = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('show-classes').addEventListener('change', function() {
displayFilters.showClasses = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('show-functions').addEventListener('change', function() {
displayFilters.showFunctions = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('show-external').addEventListener('change', function() {
displayFilters.showExternal = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('show-link-module').addEventListener('change', function() {
displayFilters.showLinkModule = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('show-link-entity').addEventListener('change', function() {
displayFilters.showLinkEntity = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('show-link-dependency').addEventListener('change', function() {
displayFilters.showLinkDependency = this.checked;
updateDisplayFilters();
+ if (currentHighlightedNode) highlightNode(currentHighlightedNode);
});
document.getElementById('max-highlight-font').addEventListener('input', function() {
maxHighlightFontSize = parseInt(this.value) || 32;
@@ -2698,6 +3744,15 @@
Highlight Settings
// Update icon and wire sizes immediately
updateIconWireSizes(currentScale);
});
+document.getElementById('highlight-focus-mode').addEventListener('change', function() {
+ highlightFocusMode = this.checked;
+ if (currentHighlightedNode) {
+ highlightNode(currentHighlightedNode);
+ } else if (!this.checked) {
+ // When turning off focus mode without active highlight, restore display filters
+ updateDisplayFilters();
+ }
+});
document.getElementById('highlight-link-mm-out').addEventListener('change', function() {
highlightLinkFilters.mmOut = this.checked;
if (currentHighlightedNode) highlightNode(currentHighlightedNode);
@@ -2789,6 +3844,9 @@
Highlight Settings
// Initialize font sizes
updateFontSizes(1);
+// Apply initial display filters
+updateDisplayFilters();
+
// Node interactions
node.on("mouseover", function(event, d) {
// Highlight connected links
@@ -2995,17 +4053,83 @@
Highlight Settings
const searchClear = document.getElementById('searchClear');
const autocompleteList = document.getElementById('autocompleteList');
+// Navigation history
+let highlightHistory = [];
+let historyIndex = -1;
+let isNavigating = false; // Flag to prevent adding to history during navigation
+
+const backButton = document.getElementById('backButton');
+const forwardButton = document.getElementById('forwardButton');
+
+function updateNavigationButtons() {
+ backButton.disabled = historyIndex <= 0;
+ forwardButton.disabled = historyIndex >= highlightHistory.length - 1;
+}
+
+function addToHistory(nodeId) {
+ if (isNavigating) return; // Don't add to history during back/forward navigation
+
+ // Remove any forward history when a new node is selected
+ highlightHistory = highlightHistory.slice(0, historyIndex + 1);
+
+ // Add new node (avoid duplicates of the same node in a row)
+ if (highlightHistory[historyIndex] !== nodeId) {
+ highlightHistory.push(nodeId);
+ historyIndex++;
+ }
+
+ updateNavigationButtons();
+}
+
+function navigateBack() {
+ if (historyIndex > 0) {
+ isNavigating = true;
+ historyIndex--;
+ const nodeId = highlightHistory[historyIndex];
+ highlightNode(nodeId);
+ isNavigating = false;
+ updateNavigationButtons();
+ }
+}
+
+function navigateForward() {
+ if (historyIndex < highlightHistory.length - 1) {
+ isNavigating = true;
+ historyIndex++;
+ const nodeId = highlightHistory[historyIndex];
+ highlightNode(nodeId);
+ isNavigating = false;
+ updateNavigationButtons();
+ }
+}
+
+backButton.addEventListener('click', navigateBack);
+forwardButton.addEventListener('click', navigateForward);
+
+// Keyboard shortcuts for navigation
+document.addEventListener('keydown', (e) => {
+ if (e.altKey && e.key === 'ArrowLeft') {
+ e.preventDefault();
+ navigateBack();
+ } else if (e.altKey && e.key === 'ArrowRight') {
+ e.preventDefault();
+ navigateForward();
+ }
+});
+
+
let selectedAutocompleteIndex = -1;
let currentHighlightedNode = null;
-let maxHighlightFontSize = 32;
+let maxHighlightFontSize = 256;
let iconWireScaleFactor = 1.0;
let currentScale = 1;
let filteredNodes = [];
+let highlightFocusMode = false;
let highlightLinkFilters = {
mmOut: true,
- mmIn: true,
+ mmIn: false,
meOut: true,
- meIn: true
+ meIn: false
};
let showHighlightedPath = true;
let pathSubfolderLevels = 0;
@@ -3016,7 +4140,15 @@
Highlight Settings
label: n.label || n.id,
type: n.type,
parent: n.parent || null,
- searchText: ((n.label || n.id) + ' ' + (n.parent || '')).toLowerCase()
+ fullPath: n.fullPath || null,
+ // For modules, include both 'modulename' and 'modulename.py' as separate searchable terms, plus imports
+ // For entities, search by label and parent
+ searchText: n.type === 'module'
+ ? (n.label || n.id).toLowerCase() + ' ' +
+ (n.label || n.id).toLowerCase() + '.py ' +
+ (n.fullPath || '').toLowerCase() + ' ' +
+ ((n.imports || []).join(' ')).toLowerCase()
+ : ((n.label || n.id) + ' ' + (n.parent || '')).toLowerCase()
}));
// Get connected nodes for a given node
@@ -3087,7 +4219,19 @@
Highlight Settings
// Highlight a node and its connections
function highlightNode(nodeId) {
- const connectedLinks = graphData.links.filter(d => isLinkHighlighted(d, nodeId));
+ // Add to history (unless we're navigating)
+ addToHistory(nodeId);
+
+ // In focus mode, build chain from ALL dependency links
+ // In normal mode, use filtered links based on highlight settings
+ const connectedLinks = highlightFocusMode
+ ? graphData.links.filter(d => {
+ const sourceId = typeof d.source === 'object' ? d.source.id : d.source;
+ const targetId = typeof d.target === 'object' ? d.target.id : d.target;
+ return sourceId === nodeId || targetId === nodeId;
+ })
+ : graphData.links.filter(d => isLinkHighlighted(d, nodeId));
+
const connectedNodes = new Set();
connectedLinks.forEach(l => {
const sourceId = typeof l.source === 'object' ? l.source.id : l.source;
@@ -3097,18 +4241,137 @@
Highlight Settings
});
currentHighlightedNode = nodeId;
- // Update nodes
- node.classed('dimmed', d => d.id !== nodeId && !connectedNodes.has(d.id))
- .classed('highlighted', d => connectedNodes.has(d.id) && d.id !== nodeId)
- .classed('highlighted-main', d => d.id === nodeId);
+ if (highlightFocusMode) {
+ // Focus mode: show all chain nodes (ignore filters), hide background nodes completely
+ node.each(function(d) {
+ const el = d3.select(this);
+ if (d.id === nodeId) {
+ el.classed('dimmed', false)
+ .classed('highlighted', false)
+ .classed('highlighted-main', true)
+ .classed('node-hidden', false);
+ } else if (connectedNodes.has(d.id)) {
+ // Check if this node should be highlighted or dimmed
+ const shouldHighlight = connectedLinks.some(l => {
+ const sourceId = typeof l.source === 'object' ? l.source.id : l.source;
+ const targetId = typeof l.target === 'object' ? l.target.id : l.target;
+ return (sourceId === d.id || targetId === d.id) && isLinkHighlighted(l, nodeId);
+ });
+ el.classed('dimmed', !shouldHighlight)
+ .classed('highlighted', shouldHighlight)
+ .classed('highlighted-main', false)
+ .classed('node-hidden', false);
+ } else {
+ // Background nodes - completely hidden
+ el.classed('dimmed', false)
+ .classed('highlighted', false)
+ .classed('highlighted-main', false)
+ .classed('node-hidden', true);
+ }
+ });
+ } else {
+ // Normal mode: respect filters, only dim background
+ // First, clear node-hidden from all nodes to undo focus mode
+ node.classed('node-hidden', d => isNodeFilteredOut(d) || isNodeHidden(d));
+
+ // Then apply highlight classes only to visible nodes
+ node.filter(d => !isNodeFilteredOut(d) && !isNodeHidden(d))
+ .classed('dimmed', d => d.id !== nodeId && !connectedNodes.has(d.id))
+ .classed('highlighted', d => connectedNodes.has(d.id) && d.id !== nodeId)
+ .classed('highlighted-main', d => d.id === nodeId);
+ }
// Update links
- link.classed('dimmed', d => !isLinkHighlighted(d, nodeId))
- .classed('highlighted', d => isLinkHighlighted(d, nodeId));
+ if (highlightFocusMode) {
+ // Focus mode: show only links between chain nodes
+ link.each(function(d) {
+ const el = d3.select(this);
+ const sourceId = typeof d.source === 'object' ? d.source.id : d.source;
+ const targetId = typeof d.target === 'object' ? d.target.id : d.target;
+ const sourceInChain = sourceId === nodeId || connectedNodes.has(sourceId);
+ const targetInChain = targetId === nodeId || connectedNodes.has(targetId);
+
+ if (sourceInChain && targetInChain) {
+ // Link is part of the chain
+ const isHighlighted = isLinkHighlighted(d, nodeId);
+ el.classed('dimmed', !isHighlighted)
+ .classed('highlighted', isHighlighted)
+ .classed('link-hidden', false)
+ .style('stroke-opacity', isHighlighted ? 1 : 0.4);
+ } else {
+ // Background link - completely hidden
+ el.classed('dimmed', false)
+ .classed('highlighted', false)
+ .classed('link-hidden', true)
+ .style('stroke-opacity', null);
+ }
+ });
+ } else {
+ // Normal mode: filter out links connected to hidden nodes
+ // First, clear any inline stroke-opacity styles from focus mode
+ link.style('stroke-opacity', null);
+
+ link.filter(d => {
+ // First check if the link type is filtered out
+ if (isLinkFilteredOut(d)) return false;
+
+ const sourceId = typeof d.source === 'object' ? d.source.id : d.source;
+ const targetId = typeof d.target === 'object' ? d.target.id : d.target;
+ const sourceNode = graphData.nodes.find(n => n.id === sourceId);
+ const targetNode = graphData.nodes.find(n => n.id === targetId);
+ const sourceVisible = sourceNode && !isNodeFilteredOut(sourceNode) && !isNodeHidden(sourceNode);
+ const targetVisible = targetNode && !isNodeFilteredOut(targetNode) && !isNodeHidden(targetNode);
+ return sourceVisible && targetVisible;
+ })
+ .classed('dimmed', d => !isLinkHighlighted(d, nodeId))
+ .classed('highlighted', d => isLinkHighlighted(d, nodeId));
+
+ // Reapply link-hidden to ALL links to ensure hidden links stay hidden (normal mode only)
+ link.classed('link-hidden', d => {
+ if (isLinkFilteredOut(d)) return true;
+ const sourceId = typeof d.source === 'object' ? d.source.id : d.source;
+ const targetId = typeof d.target === 'object' ? d.target.id : d.target;
+ const sourceNode = graphData.nodes.find(n => n.id === sourceId);
+ const targetNode = graphData.nodes.find(n => n.id === targetId);
+ if (sourceNode && isNodeFilteredOut(sourceNode)) return true;
+ if (targetNode && isNodeFilteredOut(targetNode)) return true;
+ if (d.type === 'module-module') return false;
+ if (sourceNode && isNodeHidden(sourceNode)) return true;
+ if (targetNode && isNodeHidden(targetNode)) return true;
+ if (d.type === 'module-entity' && collapsedNodes.has(sourceId)) return true;
+ if (d.type === 'dependency' && collapsedNodes.has(sourceId)) return true;
+ return false;
+ });
+ }
// Update labels
- labels.classed('dimmed', d => d.id !== nodeId && !connectedNodes.has(d.id))
- .classed('highlighted-label', d => d.id === nodeId || connectedNodes.has(d.id));
+ if (highlightFocusMode) {
+ // Focus mode: show all chain labels (ignore filters), hide background labels
+ labels.each(function(d) {
+ const el = d3.select(this);
+ const nodeEl = node.filter(n => n.id === d.id);
+ const isNodeDimmed = nodeEl.classed('dimmed');
+
+ if (d.id === nodeId || connectedNodes.has(d.id)) {
+ el.classed('dimmed', isNodeDimmed)
+ .classed('highlighted-label', !isNodeDimmed)
+ .classed('label-hidden', false);
+ } else {
+ el.classed('dimmed', false)
+ .classed('highlighted-label', false)
+ .classed('label-hidden', true);
+ }
+ });
+ } else {
+ // Normal mode: respect filters
+ // First, clear label-hidden from all labels and reapply based on filters
+ labels.classed('label-hidden', d => isNodeFilteredOut(d) || isNodeHidden(d));
+
+ // Then apply highlight classes only to visible labels
+ labels.filter(d => !isNodeFilteredOut(d) && !isNodeHidden(d))
+ .classed('dimmed', d => d.id !== nodeId && !connectedNodes.has(d.id))
+ .classed('highlighted-label', d => d.id === nodeId || connectedNodes.has(d.id));
+ }
// Zoom to fit all connected nodes
zoomToFitNodes(connectedNodes);
@@ -3120,15 +4383,26 @@
Highlight Settings
function clearHighlight() {
currentHighlightedNode = null;
+ // Clear highlight classes from all nodes and restore filter state
node.classed('dimmed', false)
.classed('highlighted', false)
.classed('highlighted-main', false);
+
+ // Restore node-hidden based on filters
+ node.classed('node-hidden', d => isNodeFilteredOut(d) || isNodeHidden(d));
link.classed('dimmed', false)
.classed('highlighted', false);
+ // Clear highlight classes from all labels and restore filter state
labels.classed('dimmed', false)
.classed('highlighted-label', false);
+
+ // Restore label-hidden based on filters
+ labels.classed('label-hidden', d => isNodeFilteredOut(d) || isNodeHidden(d));
+
+ // Restore display filters
+ updateDisplayFilters();
searchInput.value = '';
searchClear.classList.remove('visible');
@@ -3141,9 +4415,36 @@
Highlight Settings
function filterNodes(query) {
if (!query) return [];
const lowerQuery = query.toLowerCase();
- return searchIndex
- .filter(n => n.searchText.includes(lowerQuery))
- .slice(0, 10); // Limit to 10 results
+ const results = searchIndex.filter(n => n.searchText.includes(lowerQuery));
+
+ // Sort results: prioritize exact label matches, then label starts with query, then path matches
+ results.sort((a, b) => {
+ const aLabel = (a.label || a.id).toLowerCase();
+ const bLabel = (b.label || b.id).toLowerCase();
+ const aLabelWithPy = aLabel + '.py';
+ const bLabelWithPy = bLabel + '.py';
+
+ // Exact matches come first
+ if (aLabel === lowerQuery || aLabelWithPy === lowerQuery) return -1;
+ if (bLabel === lowerQuery || bLabelWithPy === lowerQuery) return 1;
+
+ // Label starts with query comes next
+ const aStarts = aLabel.startsWith(lowerQuery) || aLabelWithPy.startsWith(lowerQuery);
+ const bStarts = bLabel.startsWith(lowerQuery) || bLabelWithPy.startsWith(lowerQuery);
+ if (aStarts && !bStarts) return -1;
+ if (!aStarts && bStarts) return 1;
+
+ // Label contains query comes before path contains query
+ const aLabelContains = aLabel.includes(lowerQuery) || aLabelWithPy.includes(lowerQuery);
+ const bLabelContains = bLabel.includes(lowerQuery) || bLabelWithPy.includes(lowerQuery);
+ if (aLabelContains && !bLabelContains) return -1;
+ if (!aLabelContains && bLabelContains) return 1;
+
+ // Otherwise alphabetical
+ return aLabel.localeCompare(bLabel);
+ });
+
+ return results.slice(0, 50); // Limit to 50 results
}
// Render autocomplete list
@@ -3156,13 +4457,20 @@
Highlight Settings
filteredNodes = results;
selectedAutocompleteIndex = -1;
- autocompleteList.innerHTML = results.map((n, i) => `
-
- ${n.type}
- ${n.label}
- ${n.parent ? `${n.parent}` : ''}
-
- `).join('');
+ autocompleteList.innerHTML = results.map((n, i) => {
+ // For modules, show fullPath; for entities, show parent
+ const pathInfo = n.type === 'module' && n.fullPath
+ ? `
${n.fullPath}`
+ : n.parent ? `
${n.parent}` : '';
+
+ return `
+
+ ${n.type}
+ ${n.label}
+ ${pathInfo}
+
+ `;
+ }).join('');
autocompleteList.classList.add('visible');
diff --git a/tests/test_data/duplicate_names/src/main.py b/tests/test_data/duplicate_names/src/main.py
new file mode 100644
index 0000000..57fabcb
--- /dev/null
+++ b/tests/test_data/duplicate_names/src/main.py
@@ -0,0 +1,7 @@
+from src.utils import src_helper, common_function
+
+def main():
+ """Main function that uses src utils"""
+ result = src_helper()
+ common = common_function()
+ return result + common
diff --git a/tests/test_data/duplicate_names/src/utils.py b/tests/test_data/duplicate_names/src/utils.py
new file mode 100644
index 0000000..02d0db6
--- /dev/null
+++ b/tests/test_data/duplicate_names/src/utils.py
@@ -0,0 +1,8 @@
+# Source utils module
+def src_helper():
+ """Helper function in src/utils.py"""
+ return "src helper"
+
+def common_function():
+ """Common function name in src"""
+ return "src common"
diff --git a/tests/test_data/duplicate_names/tests/__pycache__/test_main.cpython-311-pytest-8.3.3.pyc b/tests/test_data/duplicate_names/tests/__pycache__/test_main.cpython-311-pytest-8.3.3.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3f90f87f7d7715abc653aef2c16c1a0235cc2c35
GIT binary patch
literal 714
zcmZuuJ8RrP5Z=|v_lyz(De}SyQeC4eqzEAi_&9flyc!`RHqypg&}zl*3UkJRE7BNJ
zxbr`7F#aKF9SFfJqzWn09bD%svwM#s@ksh+W@k0uw>w{gppU@V*M0T_{4blV%v%QY
zClH*V9Obw~F?QbLt<1xS`|$?06|ZdbPTb+$xC?pf6N-B|euIYoAKPT-%rgT`l}-y<
z)>N8Xnc!Sh>4&DuG!s>}q;k&kw&0tO08Ws`Zq>ml;Q2cJh_v0ew0~;&5FO$JsDTQ6
z@aQeDhby{J7et4RqAIkiRM==%DruVyJ=2y{HKjJ~g-B)fgyEIgdYZgbRH{T5A}VPz
z5?RA(rByN(Qqxho&Gc(pi)2gWbX$_TNHU1_T;zBXcLzDqB*~k)WEs&ktq7;k)9P5%
zIbl^)Ps~lXTM15e!KyuJCuJq75MYXa2X~KlKkrV*KZA$gg3a&2=5%~HxP3f6dU4_3
zpTizB?3?cUhLxIC%G`KaPttXEFRdrGe?%0V$<82>bYC(}O>ezqI;*ul{OsfqxtOGi
z7I)?Yjoh$c<((lpuyGIIs{4$Kyea8(c?VKEMfD0`*1{NH+7n#=T%gC-zBAv)4`%3p
HaFl-mzoo_d
literal 0
HcmV?d00001
diff --git a/tests/test_data/duplicate_names/tests/sample_test.py b/tests/test_data/duplicate_names/tests/sample_test.py
new file mode 100644
index 0000000..e6605f5
--- /dev/null
+++ b/tests/test_data/duplicate_names/tests/sample_test.py
@@ -0,0 +1,7 @@
+from tests.utils import test_helper, common_function
+
+def test_something():
+ """Test function that uses tests utils"""
+ result = test_helper()
+ common = common_function()
+ return result + common
diff --git a/tests/test_data/duplicate_names/tests/utils.py b/tests/test_data/duplicate_names/tests/utils.py
new file mode 100644
index 0000000..f7dced5
--- /dev/null
+++ b/tests/test_data/duplicate_names/tests/utils.py
@@ -0,0 +1,8 @@
+# Test utils module
+def test_helper():
+ """Helper function in tests/utils.py"""
+ return "test helper"
+
+def common_function():
+ """Common function name in tests"""
+ return "test common"
diff --git a/tests/test_graph_generation.py b/tests/test_graph_generation.py
index 7c917c5..3154438 100644
--- a/tests/test_graph_generation.py
+++ b/tests/test_graph_generation.py
@@ -173,11 +173,11 @@ def test_convert_simple_graph(self):
assert "nodes" in result
assert "links" in result
- # Check nodes - entity IDs use format module.py:entity_name
+ # Check nodes - module IDs now use format 'module' (no .py), entity IDs use 'module:entity_name'
node_ids = [n["id"] for n in result["nodes"]]
- assert "module.py" in node_ids
- assert "module.py:func_a" in node_ids
- assert "module.py:func_b" in node_ids
+ assert "module" in node_ids
+ assert "module:func_a" in node_ids
+ assert "module:func_b" in node_ids
# Check links
links = result["links"]
@@ -196,8 +196,9 @@ def test_convert_multi_module_graph(self):
result = convert_to_d3_format(usage_graph)
node_ids = [n["id"] for n in result["nodes"]]
- assert "a.py" in node_ids
- assert "b.py" in node_ids
+ # Module IDs are now without .py extension
+ assert "a" in node_ids
+ assert "b" in node_ids
# Check module types
module_nodes = [n for n in result["nodes"] if n["type"] == "module"]
@@ -511,3 +512,124 @@ def test_export_codegraph_on_itself(self):
assert int(codegraph_row['lines']) > 0
pathlib.Path(output_path).unlink()
+
+
+class TestDuplicateFilenames:
+ """Tests for handling duplicate filenames in different directories."""
+
+ def test_duplicate_filename_handling(self):
+ """Test that files with same basename in different directories are handled correctly."""
+ test_dir = TEST_DATA_DIR / "duplicate_names"
+ args = Namespace(paths=[str(test_dir)])
+
+ code_graph = CodeGraph(args)
+ usage_graph = code_graph.usage_graph()
+ entity_metadata = code_graph.get_entity_metadata()
+
+ # Get all module paths
+ module_paths = list(usage_graph.keys())
+
+ # Should have both utils.py files
+ src_utils = [p for p in module_paths if p.endswith('src\\utils.py') or p.endswith('src/utils.py')]
+ test_utils = [p for p in module_paths if p.endswith('tests\\utils.py') or p.endswith('tests/utils.py')]
+
+ assert len(src_utils) == 1, "Should find src/utils.py"
+ assert len(test_utils) == 1, "Should find tests/utils.py"
+
+ # Convert to D3 format to check node IDs
+ graph_data = convert_to_d3_format(usage_graph, entity_metadata, code_graph.base_paths)
+ nodes = graph_data["nodes"]
+
+ # Extract module nodes
+ module_nodes = [n for n in nodes if n["type"] == "module"]
+ module_ids = [n["id"] for n in module_nodes]
+
+ # Should have unique IDs for both utils modules
+ utils_nodes = [n for n in module_nodes if "utils" in n["id"]]
+ assert len(utils_nodes) == 2, f"Should have 2 utils module nodes, got {len(utils_nodes)}"
+
+ # IDs should be different (path-based)
+ utils_ids = [n["id"] for n in utils_nodes]
+ assert utils_ids[0] != utils_ids[1], f"Utils module IDs should be different: {utils_ids}"
+
+ # Both should have path information in their IDs
+ assert any("src" in uid for uid in utils_ids), "One utils should have 'src' in ID"
+ assert any("tests" in uid or "test" in uid for uid in utils_ids), "One utils should have 'tests' in ID"
+
+ # Labels should show basename for readability
+ for utils_node in utils_nodes:
+ assert utils_node["label"] == "utils", f"Label should be 'utils', got {utils_node['label']}"
+
+ # fullPath should be different
+ utils_paths = [n["fullPath"] for n in utils_nodes]
+ assert utils_paths[0] != utils_paths[1], f"Full paths should be different: {utils_paths}"
+
+ def test_duplicate_filename_dependencies(self):
+ """Test that dependencies are correctly attributed when filenames are duplicated."""
+ test_dir = TEST_DATA_DIR / "duplicate_names"
+ args = Namespace(paths=[str(test_dir)])
+
+ code_graph = CodeGraph(args)
+ usage_graph = code_graph.usage_graph()
+ entity_metadata = code_graph.get_entity_metadata()
+
+ # Convert to D3 format
+ graph_data = convert_to_d3_format(usage_graph, entity_metadata, code_graph.base_paths)
+ links = graph_data["links"]
+
+ # Find links involving utils modules
+ # src/main.py should link to src/utils.py entities
+ # tests/test_main.py should link to tests/utils.py entities
+
+ # Get all dependency links (exclude module-entity structural links)
+ dep_links = [l for l in links if l["type"] == "dependency"]
+
+ # Should have some dependency links
+ assert len(dep_links) > 0, "Should have dependency links"
+
+ # Check that src/main links to src/utils functions
+ src_main_links = [l for l in dep_links if "main" in str(l["source"]) and "src" in str(l["source"])]
+ if src_main_links:
+ # These should target src/utils entities, not tests/utils
+ for link in src_main_links:
+ target = link["target"]
+ if "utils" in str(target):
+ assert "src" in str(target) or "test" not in str(target).lower(), \
+ f"src/main should link to src/utils, not tests/utils: {target}"
+
+ def test_duplicate_filename_csv_export(self):
+ """Test that CSV export correctly handles duplicate filenames."""
+ test_dir = TEST_DATA_DIR / "duplicate_names"
+ args = Namespace(paths=[str(test_dir)])
+
+ code_graph = CodeGraph(args)
+ usage_graph = code_graph.usage_graph()
+ entity_metadata = code_graph.get_entity_metadata()
+
+ with tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) as f:
+ output_path = f.name
+
+ export_to_csv(usage_graph, entity_metadata=entity_metadata,
+ output_path=output_path, base_paths=code_graph.base_paths)
+
+ # Read and verify CSV
+ with open(output_path, 'r', encoding='utf-8') as csvfile:
+ reader = csv.DictReader(csvfile)
+ rows = list(reader)
+
+ # Find both utils modules in CSV
+ utils_modules = [r for r in rows if r['type'] == 'module' and 'utils' in r['name']]
+
+ # Should have 2 utils module entries
+ assert len(utils_modules) >= 2, f"Should have at least 2 utils modules in CSV, got {len(utils_modules)}"
+
+ # Their full paths should be different
+ utils_paths = [r['full_path'] for r in utils_modules]
+ assert len(set(utils_paths)) >= 2, f"Utils modules should have different full paths: {utils_paths}"
+
+ # Verify one is in src and one is in tests
+ path_strs = ' '.join(utils_paths)
+ assert 'src' in path_strs.lower(), "Should have src/utils in paths"
+ assert 'test' in path_strs.lower(), "Should have tests/utils in paths"
+
+ pathlib.Path(output_path).unlink()
From d02260537d1cb0f037e0bb6432ee0a3fb95e9815 Mon Sep 17 00:00:00 2001
From: ForteD <57673412+ForteDexe@users.noreply.github.com>
Date: Wed, 28 Jan 2026 07:45:00 +0000
Subject: [PATCH 4/4] Delete HIDDENLOG.md
---
HIDDENLOG.md | 44 --------------------------------------------
1 file changed, 44 deletions(-)
delete mode 100644 HIDDENLOG.md
diff --git a/HIDDENLOG.md b/HIDDENLOG.md
deleted file mode 100644
index 9cd1d9d..0000000
--- a/HIDDENLOG.md
+++ /dev/null
@@ -1,44 +0,0 @@
-1. Core Module (core.py)
-Updated parse_code_file() to pass full paths (instead of basename) to the parser
-Modified get_module_name() to return relative path-based keys (e.g., src/utils instead of utils)
-Changed get_code_objects() and CodeGraph.__init__() to track and pass base_paths
-Updated get_imports_and_entities_lines() to build module_names_set and names_map using relative paths
-2. Visualization Module (vizualyzer.py)
-Modified convert_to_d3_format() to generate unique node IDs from relative paths
-Module node IDs are now path-based (e.g., src/utils, tests/utils) without .py extension
-Entity node IDs use format path/module:entity_name (e.g., src/utils:helper)
-Updated entity_to_module mappings to use path-based identifiers
-Fixed dependency resolution loops to correctly attribute dependencies using relative paths
-Updated draw_graph(), draw_graph_matplotlib(), and export_to_csv() to accept and use base_paths
-CSV export now shows basenames with .py extension in the name column for backward compatibility
-3. Parser Module (parser.py)
-Updated create_objects_array() to accept full paths in the fname parameter
-Added base_paths parameter for future path-relative calculations
-4. Utilities Module (utils.py)
-Added get_relative_path() helper function to calculate relative paths from a list of base paths
-Normalizes path separators to forward slashes for cross-platform consistency
-5. Main Module (main.py)
-Updated to extract base_paths from CodeGraph instance
-Passes base_paths to all visualization functions
-6. Frontend (main.js)
-Already handles n.label || n.id pattern correctly
-Module nodes now display basename in labels while using path-based IDs internally
-fullPath attribute available in tooltips for disambiguation
-
-For modules: Shows the full file path (e.g., utils.py or utils.py)
-For entities: Shows the parent module (e.g., src/utils for src_helper function)
-
-Design Decisions Implemented:
-Clean relative paths for readability ✓
-
-Node IDs use sanitized relative paths: src/utils instead of utils.py
-Easy to read and understand in visualizations
-Basename for node labels + full path in tooltips ✓
-
-Module nodes show just the filename (e.g., utils) in the UI
-Full relative path available in the fullPath attribute for tooltips
-Users see familiar names while the system maintains unique identifiers
-Acceptable to break saved HTML files ✓
-
-Node ID format changed from module.py to module (relative path without extension)
-Existing visualizations will need to be regenerated
\ No newline at end of file