Skip to content

Commit 730c33c

Browse files
authored
fix: resolve broken imports (#26)
Change Test to ReleaseTest in both the import statement and the usage in generate_chart_docs().
1 parent e3697b0 commit 730c33c

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

docusaurus/docs/api/actions.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,32 @@ the context for all Helm operations.
1515

1616
Args:
1717
namespace: Kubernetes namespace to operate in (default: "default")
18-
kubeconfig: Path to kubeconfig file (default: uses $KUBECONFIG or ~/.kube/config)
18+
kubeconfig: Kubeconfig source. Can be:
19+
- None: Uses $KUBECONFIG env var or ~/.kube/config (default)
20+
- File path: Path to a kubeconfig file (e.g., "/path/to/config.yaml")
21+
- YAML string: Kubeconfig content as a YAML string (auto-detected)
1922
kubecontext: Kubernetes context to use (default: current context)
2023

2124
Example:
2225

2326
```python
2427
>>> import asyncio
28+
>>> # Using default kubeconfig
2529
>>> config = Configuration(namespace="my-namespace")
30+
>>>
31+
>>> # Using explicit file path
32+
>>> config = Configuration(
33+
... namespace="default",
34+
... kubeconfig="/path/to/kubeconfig.yaml"
35+
... )
36+
>>>
37+
>>> # Using kubeconfig YAML string (useful for secrets/env vars)
38+
>>> kubeconfig_content = os.environ.get("KUBECONFIG_CONTENT")
39+
>>> config = Configuration(
40+
... namespace="default",
41+
... kubeconfig=kubeconfig_content
42+
... )
43+
>>>
2644
>>> install = Install(config)
2745
>>> result = asyncio.run(install.run("my-release", "/path/to/chart"))
2846
```

docusaurus/docs/api/chart.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ Example:
2626

2727
### Methods
2828

29-
#### `run(self, chart_ref: 'str', dest_dir: 'str | None' = None) -> 'None'`
29+
#### `run(self, chart_ref: 'str', dest_dir: 'str | None' = None, version: 'str | None' = None) -> 'None'`
3030

3131
Pull a chart asynchronously.
3232

3333
Args:
3434
chart_ref: Chart reference (e.g., "repo/chart" or "oci://...")
3535
dest_dir: Destination directory (default: current directory)
36+
version: Chart version to pull (e.g., "1.2.3"). If not specified, uses latest
3637

3738
Raises:
3839
ChartError: If pull fails
@@ -92,7 +93,7 @@ Raises:
9293
ChartError: If show fails
9394

9495

95-
## Test
96+
## ReleaseTest
9697

9798
Helm test action.
9899

@@ -106,7 +107,7 @@ Example:
106107
```python
107108
>>> import asyncio
108109
>>> config = Configuration()
109-
>>> test = Test(config)
110+
>>> test = ReleaseTest(config)
110111
>>> result = asyncio.run(test.run("my-release"))
111112
```
112113

docusaurus/scripts/generate-api-docs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Import after adding to path
2828
from helm_sdkpy import Configuration # noqa: E402
2929
from helm_sdkpy.actions import Install, Upgrade, Uninstall, List, Status, Rollback, GetValues, History # noqa: E402
30-
from helm_sdkpy.chart import Pull, Show, Test, Lint, Package # noqa: E402
30+
from helm_sdkpy.chart import Pull, Show, ReleaseTest, Lint, Package # noqa: E402
3131
from helm_sdkpy.repo import RepoAdd, RepoRemove, RepoList, RepoUpdate # noqa: E402
3232
from helm_sdkpy import exceptions # noqa: E402
3333

@@ -191,7 +191,7 @@ def generate_chart_docs(output_dir):
191191
"",
192192
format_class_docs(Show, "Show"),
193193
"",
194-
format_class_docs(Test, "Test"),
194+
format_class_docs(ReleaseTest, "ReleaseTest"),
195195
"",
196196
format_class_docs(Lint, "Lint"),
197197
"",

0 commit comments

Comments
 (0)