Skip to content

ci(tests) Verify runtime deps #965

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

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Test runtime dependencies
run: |
uv run --no-dev -p python${{ matrix.python-version }} -- 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__)
'

- name: Install dependencies
run: uv sync --all-extras --dev

Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force

- _Future release notes will be placed here_

### Bug fixes

- Fix import type unavailable at runtime (#965)

### Development

- CI: Check for runtime dependencies (#965)
- Tests: Improve parametrized test suite (#964)

Convert remaining `pytest.mark.parametrize()` tests to `NamedTuple` fixtures:
Expand Down
11 changes: 10 additions & 1 deletion src/tmuxp/_internal/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@

from __future__ import annotations

from typing_extensions import NotRequired, TypedDict
import typing as t
from typing import TypedDict

if t.TYPE_CHECKING:
import sys

if sys.version_info >= (3, 11):
from typing import NotRequired
else:
from typing_extensions import NotRequired


class PluginConfigSchema(TypedDict):
Expand Down