Skip to content

Commit 2c56239

Browse files
committed
Help text improvements and github action modifications
1 parent b407b12 commit 2c56239

File tree

4 files changed

+9
-38
lines changed

4 files changed

+9
-38
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
13+
fail-fast: false
1314
matrix:
1415
python-version: ['3.8', '3.9', '3.10', '3.11']
1516

@@ -28,27 +29,3 @@ jobs:
2829
2930
- name: Test with tox
3031
run: tox
31-
32-
- name: Upload coverage to Codecov
33-
uses: codecov/codecov-action@v3
34-
with:
35-
file: ./coverage.xml
36-
fail_ci_if_error: true
37-
38-
lint:
39-
runs-on: ubuntu-latest
40-
steps:
41-
- uses: actions/checkout@v3
42-
43-
- name: Set up Python
44-
uses: actions/setup-python@v4
45-
with:
46-
python-version: '3.11'
47-
48-
- name: Install dependencies
49-
run: |
50-
python -m pip install --upgrade pip
51-
pip install tox
52-
53-
- name: Run linting
54-
run: tox -e lint

helm_values_manager/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,3 @@
22

33
__version__ = "0.1.0"
44
__description__ = "A Helm plugin to manage values and secrets across environments."
5-
6-
from .cli import app
7-
8-
9-
def helm_values_manager():
10-
"""Entry point for the Helm plugin."""
11-
app()

helm_values_manager/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import typer
44

5+
COMMAND_INFO = "helm values-manager"
6+
57
app = typer.Typer(
68
name="values-manager",
79
help="A Helm plugin to manage values and secrets across environments.",
@@ -18,6 +20,7 @@ def main(ctx: typer.Context):
1820
environments while supporting multiple secret backends like AWS Secrets
1921
Manager, Azure Key Vault, and HashiCorp Vault.
2022
"""
23+
ctx.info_name = COMMAND_INFO
2124
if ctx.invoked_subcommand is None:
2225
typer.echo(ctx.get_help())
2326

@@ -38,4 +41,4 @@ def init(
3841

3942

4043
if __name__ == "__main__":
41-
app()
44+
app(prog_name=COMMAND_INFO)

tests/integration/test_cli_integration.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ def plugin_install(tmp_path):
4747
pass
4848

4949
# Install the plugin
50-
subprocess.run(
51-
["helm", "plugin", "install", str(project_root)], capture_output=True, text=True, check=True
52-
)
50+
subprocess.run(["helm", "plugin", "install", str(project_root)], capture_output=True, text=True, check=True)
5351

5452
yield
5553

@@ -59,7 +57,7 @@ def test_help_command(plugin_install):
5957
stdout, stderr, returncode = run_helm_command(["values-manager", "--help"])
6058

6159
assert returncode == 0
62-
assert "Usage: helm_values_manager.py [OPTIONS] COMMAND [ARGS]..." in stdout
60+
assert "Usage: helm values-manager [OPTIONS] COMMAND [ARGS]..." in stdout
6361
assert "A Helm plugin to manage values and secrets across environments" in stdout
6462
assert "init" in stdout # Check that init command is listed
6563

@@ -76,7 +74,7 @@ def test_init_help_command(plugin_install):
7674

7775
def test_init_command(plugin_install, tmp_path):
7876
"""Test that the init command works with default config file."""
79-
stdout, stderr, returncode = run_helm_command(["values-manager", "init"])
77+
stdout, stderr, returncode = run_helm_command(["values-manager", "init", "-r", "test"])
8078

8179
assert returncode == 0
82-
assert "Initializing values manager with config file: values-manager.yaml" in stdout
80+
assert "Initializing values manager with config file: values-manager.yaml, for the release: test." in stdout

0 commit comments

Comments
 (0)