Skip to content

Add textual to examples dependencies#791

Open
mendral-app[bot] wants to merge 2 commits into
mainfrom
mendral/add-textual-examples-dep
Open

Add textual to examples dependencies#791
mendral-app[bot] wants to merge 2 commits into
mainfrom
mendral/add-textual-examples-dep

Conversation

@mendral-app
Copy link
Copy Markdown

@mendral-app mendral-app Bot commented Apr 27, 2026

Summary

  • Add textual>=1.0.0 to the dev dependency group in pyproject.toml so it is installed in CI via uv sync --dev --all-extras
  • Add textual to examples/requirements.txt for local development convenience

Problem

examples/quickstart_launcher.py imports from textual.app, textual.containers, textual.css.query, and textual.widgets, but textual was never declared as a dependency. This causes test_root_level_scripts[quickstart_launcher.py] to fail with ModuleNotFoundError: No module named 'textual' in the nightly examples CI.

Related Insight

https://app.mendral.com/insights/01KQ6VZ59DC7CVN7W3NW6A5Y09


Note

Created by Mendral. Tag @mendral-app with feedback or questions.

examples/quickstart_launcher.py imports textual but the package was not
declared in any project dependency file, causing ModuleNotFoundError in
the nightly examples CI test.

Add textual>=1.0.0 to the dev dependency group in pyproject.toml (used
by CI via 'uv sync --dev --all-extras') and to examples/requirements.txt
(used for local development).
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 27, 2026

Greptile Summary

This PR declares textual>=1.0.0 as a dev dependency in pyproject.toml and adds it to examples/requirements.txt, fixing a ModuleNotFoundError that was breaking test_root_level_scripts[quickstart_launcher.py] in nightly CI. The change is straightforward, but as a side effect textual 8.2.4 pulls rich from 14.1.0 to 15.0.0 in the lockfile — worth a quick compatibility check if rich is used outside dev contexts.

Confidence Score: 5/5

Safe to merge; the change is a dependency declaration fix with only P2 findings.

All findings are P2 (transitive rich major bump). No P0 or P1 issues identified.

uv.lock — verify rich 15.x compatibility with the rest of the codebase.

Important Files Changed

Filename Overview
examples/requirements.txt Adds textual>=1.0.0 to align with the pyproject.toml dev dependency; straightforward addition.
pyproject.toml Adds textual>=1.0.0 to the dev dependency group to fix the CI ModuleNotFoundError.
uv.lock Lockfile updated to include textual 8.2.4 and its transitive deps; notably bumps rich from 14.1.0 to 15.0.0.

Fix All in Claude Code

Prompt To Fix All With AI
This is a comment left during a code review.
Path: uv.lock
Line: 7529-7544

Comment:
**Transitive `rich` major version bump**

Adding `textual>=1.0.0` (resolved to `8.2.4`) causes `rich` to be bumped from `14.1.0` to `15.0.0` as a transitive dependency. If `rich` is used elsewhere in the project (including non-dev code), this major version bump could introduce subtle breaking changes. Worth verifying that the existing codebase is compatible with `rich` 15.x before merging.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (2): Last reviewed commit: "fix: add version constraint to textual i..." | Re-trigger Greptile

Comment thread examples/requirements.txt Outdated
Comment thread pyproject.toml
"pytest-xdist[psutil]>=3.8.0",
"sphinx>=8.2.3",
"sphinx-mintlify>=0.1.0",
"textual>=1.0.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 No tests added for this bug fix

This PR fixes a CI failure caused by a missing dependency declaration. Per the project's test guidelines, at least one integration test should accompany bug fix PRs. Consider adding a test that verifies textual is importable (e.g., extending the existing test_root_level_scripts suite or adding a smoke-import check for quickstart_launcher.py).

Context Used: # Test guidelines

  • Add a comment if the PR does n... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: pyproject.toml
Line: 74

Comment:
**No tests added for this bug fix**

This PR fixes a CI failure caused by a missing dependency declaration. Per the project's test guidelines, at least one integration test should accompany bug fix PRs. Consider adding a test that verifies `textual` is importable (e.g., extending the existing `test_root_level_scripts` suite or adding a smoke-import check for `quickstart_launcher.py`).

**Context Used:** # Test guidelines
- Add a comment if the PR does n... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing test_root_level_scripts in tests/examples/test_examples.py already parametrizes over all .py files in the examples/ directory — including quickstart_launcher.py. That test is exactly what caught this missing dependency in the nightly run. Adding a separate smoke-import test would be redundant since the existing test already validates that the script (and its imports) work end-to-end.

Align with pyproject.toml by pinning textual>=1.0.0 instead of leaving
it unpinned.
@mendral-app mendral-app Bot marked this pull request as ready for review April 27, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants