Bump version to 0.2.0 and enhance documentation

- Updated version number in pyproject.toml and __init__.py to 0.2.0.
- Revised README.md to reflect the current state of the project, including usage instructions and setup steps.
- Improved CLI documentation in cli.md, adding details about new commands and their functionalities.
- Enhanced the quick start section in README.md for better clarity on initial setup.
- Updated local folder documentation to clarify file handling and commands.
- Added a new command for listing GPU flavors and improved error handling in the CLI.
- Implemented a watchdog feature in the tunnel to manage server states effectively.
This commit is contained in:
Leonid Pershin
2026-08-21 03:38:01 +03:00
parent 343f741baa
commit a563ae06c4
30 changed files with 1750 additions and 132 deletions
+27
View File
@@ -0,0 +1,27 @@
from gpu_rent.tunnel import decide_watch
def test_decide_ok_active():
d = decide_watch("ACTIVE", tunnel_alive=True)
assert d.kind == "ok"
def test_decide_reconnect_when_tunnel_dead():
d = decide_watch("ACTIVE", tunnel_alive=False)
assert d.kind == "reconnect"
def test_decide_unshelve_expired():
for st in ("EXPIRED", "SHELVED", "SHELVED_OFFLOADED"):
d = decide_watch(st, tunnel_alive=True)
assert d.kind == "unshelve", st
def test_decide_exit_error():
d = decide_watch("ERROR", tunnel_alive=True)
assert d.kind == "exit"
def test_decide_exit_missing():
d = decide_watch(None, tunnel_alive=False)
assert d.kind == "exit"