Skip to content

Commit 2990430

Browse files
committed
deps: make tui an extra installation
1 parent 79ea848 commit 2990430

6 files changed

Lines changed: 62 additions & 27 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest, windows-latest]
17-
python-version: ["3.10", "3.11", "3.12", "3.13"]
17+
python-version: ["3.10", "3.11", "3.12"]
1818

1919
concurrency:
2020
group: ci-tests-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.ref }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ sudo apt install libffi-dev
2727
pip install pysus[dbc]
2828
```
2929

30+
For the terminal user interface (TUI):
31+
```bash
32+
pip install pysus[tui]
33+
```
34+
3035
## Quick Start
3136

3237
### Simplified Database Functions (New in 2.0)

conda/dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- defaults
55
dependencies:
66
- docker-compose
7-
- python>=3.10,<3.14
7+
- python>=3.10,<3.13
88
- jupyter
99
- make
1010
- pip

poetry.lock

Lines changed: 45 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,25 @@ pydantic = "^2.12.5"
3131
duckdb = "^1.4.4"
3232
duckdb-engine = "^0.17.0"
3333
sqlalchemy = "^2.0.48"
34-
textual = {extras = ["syntax"], version = "^8.2.1"}
3534
python-magic = "^0.4.27"
3635
chardet = "^7.4.0.post2"
3736
anyio = "^4.13.0"
38-
humanize = "^4.8.0"
3937
httpx = ">=0.28.0"
4038
aioftp = "^0.21.4"
4139
dbfread = "2.0.7"
4240
bigtree = "^0.12.2"
4341

4442
pyreaddbc = { version = ">=1.1.0", optional = true }
4543
pycparser = { version = "2.21", optional = true }
44+
textual = { extras = ["syntax"], version = "^8.2.1", optional = true }
45+
humanize = { version = "^4.8.0", optional = true }
4646
dotenv = "^0.9.9"
4747
boto3 = "^1.42.89"
4848
typer = "^0.24.1"
4949

5050
[tool.poetry.extras]
5151
dbc = ["pyreaddbc", "pycparser"]
52+
tui = ["textual", "humanize"]
5253

5354
[tool.poetry.group.dev.dependencies]
5455
pytest = ">=6.1.0"

pysus/cli/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import typer
22
from pysus import __version__
3-
from pysus.tui.app import PySUS
43

54
app = typer.Typer(help="PySUS CLI")
65

@@ -14,6 +13,13 @@ def tui(
1413
help="Language (en, pt)",
1514
),
1615
):
16+
try:
17+
from pysus.tui.app import PySUS
18+
except ImportError:
19+
raise ImportError(
20+
"The TUI requires extra dependencies. "
21+
"Install them with: pip install pysus[tui]"
22+
)
1723
app = PySUS(lang=lang)
1824
app.run()
1925

0 commit comments

Comments
 (0)