Skip to content
Open
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
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = {text = "Apache 2.0"}
authors = [
{name = "UbiOps"}
]
requires-python = ">=3.8"
requires-python = ">=3.9"
keywords = ["UbiOps Command Line Interface"]
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -20,11 +20,11 @@ classifiers = [
]
dependencies = [
"requests>=2.17.3",
"tabulate==0.8.10",
"tabulate>=0.8.10",
"python-dateutil",
"click>=7.0,<8.2",
"ConfigParser==4.0.2",
"colorama==0.4.3",
"colorama>=0.4.3",
"pyyaml",
"ubiops==4.12.0"
]
Expand Down Expand Up @@ -53,3 +53,9 @@ exclude = ["tests", "tests.*"]

[tool.setuptools.dynamic]
version = { attr = "ubiops_cli.version.VERSION" }

[dependency-groups]
dev = [
"deptry>=0.20.0",
"pytest>=8.4.2",
]
18 changes: 18 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from click.testing import CliRunner

from ubiops_cli.main import cli
from ubiops_cli.version import VERSION


def test_help():
"""CLI --help exits cleanly and shows the description."""
result = CliRunner().invoke(cli, ["--help"])
assert result.exit_code == 0
assert "UbiOps command line interface" in result.output


def test_version():
"""CLI --version prints the current version."""
result = CliRunner().invoke(cli, ["--version"])
assert result.exit_code == 0
assert VERSION in result.output
5 changes: 1 addition & 4 deletions ubiops_cli/src/completions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try: # >= Python 3.9
from importlib import resources as impresources
except ImportError: # <= Python 3.8
import importlib_resources as impresources
from importlib import resources as impresources

import click

Expand Down
Loading