orchestra-cli 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orchestra_cli-0.0.1/PKG-INFO +37 -0
- orchestra_cli-0.0.1/README.md +24 -0
- orchestra_cli-0.0.1/orchestra_cli/src/__init__.py +0 -0
- orchestra_cli-0.0.1/orchestra_cli/src/cli.py +61 -0
- orchestra_cli-0.0.1/orchestra_cli/tests/test_cli.py +17 -0
- orchestra_cli-0.0.1/orchestra_cli.egg-info/PKG-INFO +37 -0
- orchestra_cli-0.0.1/orchestra_cli.egg-info/SOURCES.txt +11 -0
- orchestra_cli-0.0.1/orchestra_cli.egg-info/dependency_links.txt +1 -0
- orchestra_cli-0.0.1/orchestra_cli.egg-info/entry_points.txt +2 -0
- orchestra_cli-0.0.1/orchestra_cli.egg-info/requires.txt +6 -0
- orchestra_cli-0.0.1/orchestra_cli.egg-info/top_level.txt +1 -0
- orchestra_cli-0.0.1/pyproject.toml +20 -0
- orchestra_cli-0.0.1/setup.cfg +4 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orchestra-cli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Orchestra CLI
|
|
5
|
+
Author-email: Orchestra Technologies <support@getorchestra.io>
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: httpx>=0.28.1
|
|
9
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
10
|
+
Requires-Dist: typer>=0.16.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
13
|
+
|
|
14
|
+
# orchestra-cli
|
|
15
|
+
|
|
16
|
+
A Python-based CLI tool for running Orchestra actions.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
orchestra-cli validate example.yaml
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
- Make sure [uv](https://github.com/astral-sh/uv) is installed
|
|
27
|
+
- Use `uv pip install -e ".[dev]"` to install the CLI in editable mode for development
|
|
28
|
+
|
|
29
|
+
## Building and Releasing
|
|
30
|
+
|
|
31
|
+
- Run `uv build` to build the CLI
|
|
32
|
+
- Run `uv publish` to publish the CLI
|
|
33
|
+
|
|
34
|
+
## Troubleshooting
|
|
35
|
+
|
|
36
|
+
- If `orchestra-cli` is not found, make sure you have run `uv pip install -e .` and your venv is activated.
|
|
37
|
+
- If you get 'No such command', check you are using the correct subcommand (e.g., `validate`).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# orchestra-cli
|
|
2
|
+
|
|
3
|
+
A Python-based CLI tool for running Orchestra actions.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
orchestra-cli validate example.yaml
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Development
|
|
12
|
+
|
|
13
|
+
- Make sure [uv](https://github.com/astral-sh/uv) is installed
|
|
14
|
+
- Use `uv pip install -e ".[dev]"` to install the CLI in editable mode for development
|
|
15
|
+
|
|
16
|
+
## Building and Releasing
|
|
17
|
+
|
|
18
|
+
- Run `uv build` to build the CLI
|
|
19
|
+
- Run `uv publish` to publish the CLI
|
|
20
|
+
|
|
21
|
+
## Troubleshooting
|
|
22
|
+
|
|
23
|
+
- If `orchestra-cli` is not found, make sure you have run `uv pip install -e .` and your venv is activated.
|
|
24
|
+
- If you get 'No such command', check you are using the correct subcommand (e.g., `validate`).
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import yaml
|
|
2
|
+
import httpx
|
|
3
|
+
import typer
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
app = typer.Typer(help="Orchestra CLI – perform operations with Orchestra locally.")
|
|
7
|
+
|
|
8
|
+
API_URL = "https://httpstat.us/200" # Replace with your real endpoint
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Colors
|
|
12
|
+
def red(msg):
|
|
13
|
+
return typer.style(msg, fg=typer.colors.RED, bold=True)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def green(msg):
|
|
17
|
+
return typer.style(msg, fg=typer.colors.GREEN, bold=True)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@app.command()
|
|
21
|
+
def validate(file: Path = typer.Argument(..., help="YAML file to validate")):
|
|
22
|
+
"""
|
|
23
|
+
Validate a YAML file against the API.
|
|
24
|
+
"""
|
|
25
|
+
if not file.exists():
|
|
26
|
+
typer.echo(red(f"File not found: {file}"))
|
|
27
|
+
raise typer.Exit(code=1)
|
|
28
|
+
|
|
29
|
+
try:
|
|
30
|
+
with file.open("r") as f:
|
|
31
|
+
data = yaml.safe_load(f)
|
|
32
|
+
except Exception as e:
|
|
33
|
+
typer.echo(red(f"Invalid YAML: {e}"))
|
|
34
|
+
raise typer.Exit(code=1)
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
response = httpx.post(API_URL, json=data, timeout=10)
|
|
38
|
+
except Exception as e:
|
|
39
|
+
typer.echo(red(f"HTTP request failed: {e}"))
|
|
40
|
+
raise typer.Exit(code=1)
|
|
41
|
+
|
|
42
|
+
if response.status_code == 200:
|
|
43
|
+
typer.echo(green("✅ Validation passed!"))
|
|
44
|
+
raise typer.Exit(code=0)
|
|
45
|
+
else:
|
|
46
|
+
typer.echo(red(f"❌ Validation failed with status {response.status_code}"))
|
|
47
|
+
try:
|
|
48
|
+
errors = response.json()
|
|
49
|
+
typer.echo(yaml.dump(errors, sort_keys=False))
|
|
50
|
+
except Exception:
|
|
51
|
+
typer.echo(response.text)
|
|
52
|
+
raise typer.Exit(code=1)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@app.command()
|
|
56
|
+
def upload(file: Path = typer.Argument(..., help="YAML file to upload")):
|
|
57
|
+
"""
|
|
58
|
+
Upload a YAML file to the API. (Not supported yet)
|
|
59
|
+
"""
|
|
60
|
+
typer.echo(red("Action not supported yet"))
|
|
61
|
+
raise typer.Exit(code=1)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typer.testing import CliRunner
|
|
2
|
+
from orchestra_cli.src.cli import app
|
|
3
|
+
|
|
4
|
+
runner = CliRunner()
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def test_help():
|
|
8
|
+
result = runner.invoke(app, ["--help"])
|
|
9
|
+
assert result.exit_code == 0
|
|
10
|
+
assert "Orchestra CLI" in result.output
|
|
11
|
+
assert "validate" in result.output
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_validate_missing_file():
|
|
15
|
+
result = runner.invoke(app, ["validate", "not_a_file.yaml"])
|
|
16
|
+
assert result.exit_code == 1
|
|
17
|
+
assert "File not found" in result.output
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orchestra-cli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Orchestra CLI
|
|
5
|
+
Author-email: Orchestra Technologies <support@getorchestra.io>
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: httpx>=0.28.1
|
|
9
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
10
|
+
Requires-Dist: typer>=0.16.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
13
|
+
|
|
14
|
+
# orchestra-cli
|
|
15
|
+
|
|
16
|
+
A Python-based CLI tool for running Orchestra actions.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
orchestra-cli validate example.yaml
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
- Make sure [uv](https://github.com/astral-sh/uv) is installed
|
|
27
|
+
- Use `uv pip install -e ".[dev]"` to install the CLI in editable mode for development
|
|
28
|
+
|
|
29
|
+
## Building and Releasing
|
|
30
|
+
|
|
31
|
+
- Run `uv build` to build the CLI
|
|
32
|
+
- Run `uv publish` to publish the CLI
|
|
33
|
+
|
|
34
|
+
## Troubleshooting
|
|
35
|
+
|
|
36
|
+
- If `orchestra-cli` is not found, make sure you have run `uv pip install -e .` and your venv is activated.
|
|
37
|
+
- If you get 'No such command', check you are using the correct subcommand (e.g., `validate`).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
orchestra_cli.egg-info/PKG-INFO
|
|
4
|
+
orchestra_cli.egg-info/SOURCES.txt
|
|
5
|
+
orchestra_cli.egg-info/dependency_links.txt
|
|
6
|
+
orchestra_cli.egg-info/entry_points.txt
|
|
7
|
+
orchestra_cli.egg-info/requires.txt
|
|
8
|
+
orchestra_cli.egg-info/top_level.txt
|
|
9
|
+
orchestra_cli/src/__init__.py
|
|
10
|
+
orchestra_cli/src/cli.py
|
|
11
|
+
orchestra_cli/tests/test_cli.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
orchestra_cli
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "orchestra-cli"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Orchestra CLI"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Orchestra Technologies", email = "support@getorchestra.io" },
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
dependencies = ["httpx>=0.28.1", "pyyaml>=6.0.2", "typer>=0.16.0"]
|
|
11
|
+
|
|
12
|
+
[project.scripts]
|
|
13
|
+
orchestra-cli = "orchestra_cli.src.cli:app"
|
|
14
|
+
|
|
15
|
+
[build-system]
|
|
16
|
+
requires = ["setuptools>=61.0"]
|
|
17
|
+
build-backend = "setuptools.build_meta"
|
|
18
|
+
|
|
19
|
+
[project.optional-dependencies]
|
|
20
|
+
dev = ["pytest>=7.0"]
|