Skip to content

Version 0.0.3

Choose a tag to compare

@doubleinfinity doubleinfinity released this 27 Jun 02:56
· 48 commits to main since this release

Added

  • Introduced modular __init__.py using __getattr__() for PEP 562-style lazy loading of database backends like VectorDatabase. This change improves robustness for partial installations and prepares the master package for a plugin-based or modular architecture.

  • Added version constant __version__ = "0.0.3".

  • Implemented module-level __getattr__ to support lazy loading of database backends (PEP 562).

  • Added __dir__() for better introspection and tab-completion in REPLs and IDEs.

  • Included clear and actionable error messages when optional submodules are accessed but not installed.

  • Added helpful runtime warnings when installed packages are outdated compared to PyPI.

  • Added import_database_class() to dynamically import database classes based on configuration.

  • Added _utils.py containing:

    • get_latest_pypi_version() for cached PyPI version retrieval.
    • check_package_version() for installed package validation and warning if outdated.
    • should_check_versions() to suppress version checks in CI, offline, or env-flagged contexts.
    • ZEUSDB_PACKAGES registry to manage and extend backend database support.
  • Added test_missing_modules.py with tests covering:

    • AttributeError messaging for undefined database types.
    • Case sensitivity of attribute access.
    • Expected attributes in __all__ and __dir__.

Changed

  • Replaced eager try/except ImportError block-based loading with centralized, dynamic imports using import_database_class() from _utils.py.

  • Reorganized __all__ to be static and Pylance-compatible, with type hints provided separately for static analysis.

  • Suppressed Pyright warnings using # pyright: reportUnsupportedDunderAll=false to support dynamic symbol declarations.

  • VectorDatabase remains the only active backend; additional backends (RelationalDatabase, GraphDatabase, DocumentDatabase) are included as placeholders in configuration and docstrings for future expansion.

Fixed

Removed

  • Removed outdated eager import logic from __init__.py, reducing import-time overhead and making the package plugin-friendly.