-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__init__.py
More file actions
75 lines (63 loc) · 2.06 KB
/
__init__.py
File metadata and controls
75 lines (63 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
"""
GNN Pipeline Core Module
This module provides the core functionality for the GNN processing pipeline.
"""
from pathlib import Path
from typing import List
# Package-level metadata expected by tests
__version__ = "1.6.0"
FEATURES = {
"pipeline_orchestration": True,
"mcp_integration": True,
}
def _discover_top_level_modules() -> List[str]:
"""Discover all top-level subpackages under the src package.
Returns a sorted list of directory names that contain an __init__.py file
and do not start with an underscore.
"""
base_dir = Path(__file__).parent
module_names: List[str] = []
for entry in base_dir.iterdir():
if not entry.is_dir():
continue
name = entry.name
if name.startswith('_'):
continue
if (entry / '__init__.py').exists():
module_names.append(name)
return sorted(module_names)
def get_module_info() -> dict[str, object]:
"""Get information about the core GNN package.
Returns a dictionary with high-level metadata about the overall package.
"""
return {
"name": "GNN Pipeline Core",
"version": __version__,
"description": "Core functionality for GNN processing pipeline",
"modules": _discover_top_level_modules(),
"features": [
"Pipeline orchestration",
"GNN processing",
"Analysis and statistics",
"LLM integration",
"Code generation",
"Website generation",
"Security validation",
"Advanced visualization",
],
}
# Expose submodules expected by tests and users via `import src`
# Use lazy/guarded import to avoid import-time failures when optional deps are missing in test isolation
import importlib
# Import SAPF module directly now that it is fully implemented and robust
try:
sapf = importlib.import_module('src.sapf')
except ImportError:
# Recovery to relative import if package context differs
from . import sapf
__all__ = [
'get_module_info',
'sapf',
'__version__',
'FEATURES',
]