-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Problem / Background
20+ __init__.py files across the codebase are completely empty. This means:
- IDEs cannot provide accurate autocomplete for these packages
from cognee.modules import *imports nothing- The public API surface is implicit rather than explicit
- Static analysis tools cannot verify import correctness
Affected files (partial list):
cognee/modules/__init__.pycognee/modules/visualization/__init__.pycognee/modules/ontology/__init__.pycognee/modules/cognify/__init__.pycognee/modules/retrieval/__init__.pycognee/modules/data/__init__.pycognee/api/__init__.pycognee/api/v1/__init__.pycognee/tasks/graph/cascade_extract/__init__.py- And 10+ more in
cognee/eval_framework/
Goal
Add meaningful __all__ exports to empty __init__.py files so each package explicitly declares its public API.
Proposed Solution
For each empty __init__.py, identify the key symbols that should be importable from that package and add them:
# cognee/modules/chunking/__init__.py
from .TextChunker import TextChunker
from .LangchainChunker import LangchainChunker
__all__ = ["TextChunker", "LangchainChunker"]Note: Not all __init__.py files need exports — some are legitimately namespace-only packages. Focus on modules where users/developers would reasonably do from cognee.modules.X import Y.
Acceptance Criteria
- At least 10 of the most important empty
__init__.pyfiles are populated - Each populated file has an
__all__list - Imports are validated (no circular import issues introduced)
-
ruff check .passes - Existing imports throughout the codebase still work
Dependencies / Blockers
None. This can be done incrementally — one module at a time.
Relevant Links / Resources
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed