Skip to content

Commit da8a0f7

Browse files
lukepiettedeanq
andauthored
Update README.md - Runpod name (#424)
* Update README.md - Runpod name * fix: broken tests --------- Co-authored-by: Dean Quiñanola <dean.quinanola@runpod.io>
1 parent 4cba43d commit da8a0f7

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<div align="center">
2-
<h1>RunPod | Python Library </h1>
2+
<h1>Runpod | Python Library </h1>
33

44
[![PyPI Package](https://badge.fury.io/py/runpod.svg)](https://badge.fury.io/py/runpod)
55
&nbsp;
66
[![Downloads](https://static.pepy.tech/personalized-badge/runpod?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/runpod)
77

8-
[![CI | End-to-End RunPod Python Tests](https://github.com/runpod/runpod-python/actions/workflows/CI-e2e.yml/badge.svg)](https://github.com/runpod/runpod-python/actions/workflows/CI-e2e.yml)
8+
[![CI | End-to-End Runpod Python Tests](https://github.com/runpod/runpod-python/actions/workflows/CI-e2e.yml/badge.svg)](https://github.com/runpod/runpod-python/actions/workflows/CI-e2e.yml)
99

1010
[![CI | Code Quality](https://github.com/runpod/runpod-python/actions/workflows/CI-pylint.yml/badge.svg)](https://github.com/runpod/runpod-python/actions/workflows/CI-pylint.yml)
1111
&nbsp;
@@ -15,7 +15,7 @@
1515

1616
</div>
1717

18-
Welcome to the official Python library for RunPod API &amp; SDK.
18+
Welcome to the official Python library for Runpod API &amp; SDK.
1919

2020
## Table of Contents
2121

@@ -46,11 +46,11 @@ pip install git+https://github.com/runpod/runpod-python.git
4646

4747
## ⚡ | Serverless Worker (SDK)
4848

49-
This python package can also be used to create a serverless worker that can be deployed to RunPod as a custom endpoint API.
49+
This python package can also be used to create a serverless worker that can be deployed to Runpod as a custom endpoint API.
5050

5151
### Quick Start
5252

53-
Create a python script in your project that contains your model definition and the RunPod worker start code. Run this python code as your default container start command:
53+
Create a python script in your project that contains your model definition and the Runpod worker start code. Run this python code as your default container start command:
5454

5555
```python
5656
# my_worker.py
@@ -79,15 +79,15 @@ See our [blog post](https://www.runpod.io/blog/serverless-create-a-basic-api) fo
7979

8080
### Local Test Worker
8181

82-
You can also test your worker locally before deploying it to RunPod. This is useful for debugging and testing.
82+
You can also test your worker locally before deploying it to Runpod. This is useful for debugging and testing.
8383

8484
```bash
8585
python my_worker.py --rp_serve_api
8686
```
8787

8888
## 📚 | API Language Library (GraphQL Wrapper)
8989

90-
When interacting with the RunPod API you can use this library to make requests to the API.
90+
When interacting with the Runpod API you can use this library to make requests to the API.
9191

9292
```python
9393
import runpod

tests/test_cli/test_cli_groups/test_config_commands.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,15 @@ def test_output_messages(self):
100100

101101
def test_api_key_prompt(self):
102102
"""Tests the API key prompt."""
103-
with patch("click.prompt", return_value="KEY") as mock_prompt:
103+
with patch("click.prompt", return_value="KEY") as mock_prompt, patch(
104+
"runpod.cli.groups.config.commands.set_credentials"
105+
) as mock_set_credentials, patch(
106+
"runpod.cli.groups.config.commands.check_credentials",
107+
return_value=(False, None)
108+
):
104109
result = self.runner.invoke(runpod_cli, ["config", "--profile", "test"])
105110
mock_prompt.assert_called_with(
106111
" > RunPod API Key", hide_input=False, confirmation_prompt=False
107112
) # pylint: disable=line-too-long
113+
mock_set_credentials.assert_called_with("KEY", "test", overwrite=True)
108114
assert result.exit_code == 0

tests/test_cli/test_cli_groups/test_exec_commands.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
from unittest.mock import patch
88

99
import click
10+
from click.testing import CliRunner
1011

1112
from runpod.cli.entry import runpod_cli
1213

1314

1415
class TestExecCommands(unittest.TestCase):
1516
"""Tests for Runpod CLI exec commands."""
16-
1717
def setUp(self):
18+
self.runner = CliRunner()
1819
self.runner = click.testing.CliRunner()
1920

2021
def test_remote_python_with_provided_pod_id(self):
@@ -49,9 +50,7 @@ def test_remote_python_without_provided_pod_id_prompt(self):
4950
"runpod.cli.groups.exec.commands.python_over_ssh"
5051
) as mock_python_over_ssh, patch(
5152
"runpod.cli.groups.exec.commands.get_session_pod",
52-
side_effect=lambda: click.prompt(
53-
"Please provide the pod ID", "prompted_pod_id"
54-
),
53+
return_value="prompted_pod_id",
5554
) as mock_get_pod_id: # pylint: disable=line-too-long
5655
mock_python_over_ssh.return_value = None
5756
result = self.runner.invoke(runpod_cli, ["exec", "python", temp_file.name])

0 commit comments

Comments
 (0)