Aller au contenu
login
arrow_backRetour aux issues
fu351/Doberman-Core #440

doctor: report whether the `dash` and `tui` optional extras are installed

ecoDébutant enhancement good first issue level-3

descriptionDescription

`doberman dash` needs the `dash` extra (`starlette`, `uvicorn`) and `doberman tui` needs `tui` (`textual`), per `pyproject.toml` lines 45-46. Today you find out by running the command and reading an ImportError: `tui` checks `importlib.util.find_spec("textual")` (`src/doberman/cli/main.py:1361`), `dash` try/excepts the import (`:1394`). `doberman doctor` never mentions either. **What to do** 1. Add `_check_optional_extras()` in `src/doberman/cli/doctor.py` (or one check per extra) using `importlib.util.find_spec` for `starlette` and `textual`: `OK "installed"` or `WARN "not installed (optional) - pip install 'doberman[dash]'"`. Posture copied from `_check_codex_version` (`:82`): never critical, a missing optional is advice, not a failure. 2. Register in `run_checks()` after the Codex CLI row. 3. Extend `tests/unit/test_cli_doctor.py`: monkeypatch `find_spec` to return `None` and to return a non-`None` value, assert the row flips between WARN and OK. `find_spec` only looks, it doesn't import, so the check stays cheap and side-effect free.
codeOuvre sur GitHub