Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/datajoint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"Top",
"U",
"Diagram",
"kill",
"MatCell",
"MatStruct",
# Codec API
Expand Down Expand Up @@ -94,8 +93,6 @@
# Diagram imports networkx and matplotlib
"Diagram": (".diagram", "Diagram"),
"diagram": (".diagram", None), # Return the module itself
# kill imports pymysql via connection
"kill": (".admin", "kill"),
# cli imports click
"cli": (".cli", "cli"),
}
Expand Down
101 changes: 0 additions & 101 deletions src/datajoint/admin.py

This file was deleted.

6 changes: 0 additions & 6 deletions src/datajoint/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@
)


class _RenameMap(tuple):
"""for internal use"""

pass


@dataclass
class ValidationResult:
"""
Expand Down
20 changes: 0 additions & 20 deletions tests/unit/test_lazy_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,6 @@ def test_lazy_diagram_import():
assert Diagram.__name__ == "Diagram"


def test_lazy_admin_import():
"""Admin module should not be loaded until dj.kill is accessed."""
# Remove datajoint from sys.modules to get fresh import
modules_to_remove = [key for key in sys.modules if key.startswith("datajoint")]
for mod in modules_to_remove:
del sys.modules[mod]

# Import datajoint
import datajoint as dj

# Admin module should not be loaded yet
assert "datajoint.admin" not in sys.modules, "admin module loaded eagerly"

# Access kill - should trigger lazy load
kill = dj.kill
assert "datajoint.admin" in sys.modules, "admin module not loaded after access"
assert callable(kill)


def test_lazy_cli_import():
"""CLI module should not be loaded until dj.cli is accessed."""
# Remove datajoint from sys.modules to get fresh import
Expand Down Expand Up @@ -103,5 +84,4 @@ def test_core_imports_available():

# Heavy modules should still not be loaded
assert "datajoint.diagram" not in sys.modules
assert "datajoint.admin" not in sys.modules
assert "datajoint.cli" not in sys.modules
Loading