Skip to content
uibcdfPublic

About

Digesting dependencies into clear, actionable insight.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DepDigest

MolSysSuite: Support Library MolSysSuite policy Python 3.11 | 3.12 | 3.13 | 3.14 License Tests Codecov Documentation GitHub release Conda Zenodo DOI

Coverage: DepDigest Python tests, uploaded by the routine Linux/Python 3.14 CI lane. The badge reflects the last uploaded report, which may lag later direct or skip-CI commits; it does not certify a full matrix or scientific correctness.

Digesting dependencies into clear, actionable insight.

Overview

DepDigest is a lightweight Python library for managing optional dependencies and lazy loading in large analytical or scientific projects.

It helps maintain a "Zero-Cost Startup" by ensuring that heavy external libraries are only checked and imported when actually needed.

Understand your dependencies. Trust your code.

Current release line:

  • 0.15.2: published relative-import audit correction and SPDX/original-license maintenance; source, installed and public qualification in #49
  • 0.15.1: published concurrent declared value requests; source, installed and public qualification in #39
  • 0.15.0: published selective adapter inspection; source, installed and public qualification in #37
  • 0.14.0: published declaration-based selective plugin loading; source and installed qualification recorded in #35
  • 0.13.0: module/class control-flow audits and explicit typing-guard handling
  • 0.12.0: optional executable dependencies and truthful disabled installation routes; published after exact-source and installed-artifact gates
  • 0.11.2 improved dependency diagnostics and the guarded release routes
  • 0.11.1 repairs the Windows depdigest launcher in the published noarch Conda package
  • 0.11.0 delivered Python 3.14 support
  • 1.0.0 preparation in progress

Documentation

  • User guide: docs/content/user/index.md
  • Developer guide: docs/content/developers/index.md
  • Contribution guide: CONTRIBUTING.md
  • Implementation contract: standards/DEPDIGEST_GUIDE.md
  • Conda release routes: devguide/conda_release_routes.md

Key Features

  • @dep_digest Decorator: Enforce dependency availability at runtime with clear error messages.
  • Lazy Loading: Discover and load modules (plugins, forms) from directories only when accessed.
  • Architecture Validation: Tools to scan your codebase and ensure no top-level imports of soft dependencies leak into your core.
  • Audit CLI: depdigest audit command for CI-friendly lazy-import checks.
  • Symmetry with ArgDigest: Designed to work in tandem with argument validation frameworks.
  • smonitor integration: Structured diagnostics for missing dependencies.
  • Runtime config discovery: Automatically resolves package _depdigest.py.
  • Manual config registration: Supports dynamic/testing contexts via register_package_config.
  • Optional engines: Python and executable availability share declarations and truthful installation routes; see docs/content/user/optional-engines.md.

Quick Example

from depdigest import dep_digest, get_info


@dep_digest("openmm")
def simulate(system):
    import openmm
    # ...


def dependency_info():
    return get_info("my_package")

smonitor

DepDigest emits structured events when a dependency is missing. Configuration is loaded from _smonitor.py in the package root (depdigest/_smonitor.py), and the catalog lives in depdigest/_private/smonitor/catalog.py with metadata in depdigest/_private/smonitor/meta.py.

Installation

conda install -c uibcdf depdigest

Requirements

  • Published 0.11.1: Python >=3.11,<3.15. Its exact noarch Conda file passed twelve clean staging installations on Linux, macOS, and Windows, then was promoted to public uibcdf and independently installed from that channel on Linux/Python 3.13.
  • Runtime dependency: smonitor

Development

Run tests:

pytest --receptor=llm -n 12

Run tests with coverage:

pytest --receptor=llm -n 12 --cov=depdigest --cov-report=term-missing

Run architecture audit:

depdigest audit --src-root depdigest --soft-deps openmm,mdtraj

Build docs locally:

make -C docs html

License

MIT License.

About

Digesting dependencies into clear, actionable insight.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages