- 
                Notifications
    You must be signed in to change notification settings 
- Fork 110
tests(ci) Check runtime deps import correctly #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Reviewer's Guide by SourceryThis pull request adds a CI job to verify that the package can be imported and used without dev dependencies installed. This helps catch missing runtime dependencies before they reach users. The CI job uses  No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
 Assessment against linked issues
 Possibly linked issues
 Tips and commandsInteracting with Sourcery
 Customizing Your ExperienceAccess your dashboard to: 
 Getting Help
 | 
| Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 Additional details and impacted files@@           Coverage Diff           @@
##           master     #574   +/-   ##
=======================================
  Coverage   88.80%   88.80%           
=======================================
  Files          36       36           
  Lines        4075     4075           
  Branches      385      385           
=======================================
  Hits         3619     3619           
  Misses        308      308           
  Partials      148      148           ☔ View full report in Codecov by Sentry. | 
54679e7    to
    c700030      
    Compare
  
    9ea9249    to
    f66abaf      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tony - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using sys.executableinstead of hardcodingpythonin the test command.
- It might be helpful to add a comment explaining why the runtime dependencies test is run before installing dev dependencies.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
## Changes - Add runtime dependency check in CI using `uv run --no-dev` - Run check before installing dev dependencies - Print package version and basic functionality test results - Document improvement in CHANGES - Fix runtime issue in _internal/types.py ## Verification https://github.com/tmux-python/tmuxp/actions/runs/13411308953/job/37461974473#step:5:24 uv run --no-dev -p python3.13 -- python -c ' from tmuxp import _internal, cli, workspace, exc, log, plugin, shell, types, util, __version__ from tmuxp._internal import config_reader, types from tmuxp.workspace import builder, constants, finders, freezer, importers, loader, validation from libtmux import __version__ as __libtmux_version__ print("tmuxp version:", __version__) print("libtmux version:", __libtmux_version__) ' shell: /usr/bin/bash -e {0} env: UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache Using CPython 3.13.2 Creating virtual environment at: .venv Building tmuxp @ file:///home/runner/work/tmuxp/tmuxp Built tmuxp @ file:///home/runner/work/tmuxp/tmuxp Installed 4 packages in 1ms Traceback (most recent call last): File "<string>", line 3, in <module> from tmuxp._internal import config_reader, types File "/home/runner/work/tmuxp/tmuxp/src/tmuxp/_internal/types.py", line 15, in <module> from typing_extensions import NotRequired, TypedDict ModuleNotFoundError: No module named 'typing_extensions' ## See also - tmux-python/libtmux#574 ## Summary by Sourcery CI: - Adds a CI job to verify that runtime dependencies are installed correctly and that the application can import its modules and dependencies.
Resolves #573
Add a step to verify the package can be imported and used without dev dependencies installed. This helps catch missing runtime dependencies before they reach users.
Changes
uv run --no-devExample Output
Why?
TypeGuard#572Verification
Summary by Sourcery
Add a check for runtime dependencies import.
Bug Fixes:
CI:
Summary by Sourcery
Add a check to the CI workflow to verify that the package can be imported and used without development dependencies installed. This check helps catch missing runtime dependencies before they reach users by running a basic functionality test and printing the package version.
CI:
uv run --no-devDocumentation: