colacloud-cli 0.3.0__tar.gz → 0.3.2__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.
- colacloud_cli-0.3.2/AGENTS.md +16 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/PKG-INFO +1 -1
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/pyproject.toml +1 -1
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/scripts/smoke_test.py +10 -3
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/__init__.py +1 -1
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/formatters.py +15 -14
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/tests/test_api.py +5 -1
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/tests/test_cli.py +5 -1
- colacloud_cli-0.3.0/.mcp.json +0 -3
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/.gitignore +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/LICENSE +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/README.md +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/api.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/__init__.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/avas.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/barcode.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/colas.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/config.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/permittees.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/processing_times.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/production_reports.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/usage.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/utils.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/config.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/main.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/tests/__init__.py +0 -0
- {colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/tests/test_config.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# COLA Cloud CLI
|
|
2
|
+
|
|
3
|
+
This is the public command-line client for the COLA Cloud API. Keep this repo safe for public GitHub: do not add private workspace notes, credentials, customer data, or internal-only infrastructure details.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
- Use `uv sync` to install dependencies.
|
|
8
|
+
- Run tests with `uv run pytest`.
|
|
9
|
+
- Run linting with `uv run ruff check .`.
|
|
10
|
+
- Source code lives in `src/colacloud_cli`; tests live in `tests`.
|
|
11
|
+
|
|
12
|
+
## API Work
|
|
13
|
+
|
|
14
|
+
- Unit tests should mock HTTP calls rather than hitting production services.
|
|
15
|
+
- Smoke tests may require `COLA_API_KEY`; do not hardcode API keys or tokens.
|
|
16
|
+
- Avoid accidental CLI behavior breaks. If a breaking change is intentional, make it explicit in the versioning/release notes.
|
|
@@ -65,7 +65,9 @@ def main():
|
|
|
65
65
|
|
|
66
66
|
api_key = os.environ.get("COLA_API_KEY") or os.environ.get("COLACLOUD_API_KEY")
|
|
67
67
|
if not api_key:
|
|
68
|
-
print(
|
|
68
|
+
print(
|
|
69
|
+
"Error: COLA_API_KEY or COLACLOUD_API_KEY environment variable is required"
|
|
70
|
+
)
|
|
69
71
|
sys.exit(1)
|
|
70
72
|
|
|
71
73
|
env = {"COLACLOUD_API_KEY": api_key}
|
|
@@ -89,7 +91,9 @@ def main():
|
|
|
89
91
|
|
|
90
92
|
def test_colas_list():
|
|
91
93
|
nonlocal ttb_id
|
|
92
|
-
rc, out, err = run_cola(
|
|
94
|
+
rc, out, err = run_cola(
|
|
95
|
+
"colas", "list", "--limit", "1", "--json", env_override=env
|
|
96
|
+
)
|
|
93
97
|
assert rc == 0, f"exit code {rc}: {err}"
|
|
94
98
|
data = json.loads(out)
|
|
95
99
|
assert "data" in data, "missing 'data' key"
|
|
@@ -164,7 +168,10 @@ def main():
|
|
|
164
168
|
data = json.loads(out)
|
|
165
169
|
assert "data" in data
|
|
166
170
|
usage = data["data"]
|
|
167
|
-
return
|
|
171
|
+
return (
|
|
172
|
+
f"tier={usage.get('tier')}, "
|
|
173
|
+
f"used={usage.get('requests_used')}/{usage.get('monthly_limit')}"
|
|
174
|
+
)
|
|
168
175
|
|
|
169
176
|
check("cola usage --json", test_usage)
|
|
170
177
|
|
|
@@ -383,23 +383,24 @@ def format_permittee_detail(permittee: dict[str, Any], console: Console) -> None
|
|
|
383
383
|
console.print("[bold]Company Information[/]")
|
|
384
384
|
console.print(info_table)
|
|
385
385
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
stats_table.add_row(
|
|
393
|
-
"Approved COLAs", format_number(permittee.get("colas_approved"))
|
|
394
|
-
)
|
|
395
|
-
if permittee.get("last_cola_application_date"):
|
|
386
|
+
if permittee.get("colas") is not None:
|
|
387
|
+
stats_table = Table(show_header=False, box=None, padding=(0, 2))
|
|
388
|
+
stats_table.add_column("Field", style="dim")
|
|
389
|
+
stats_table.add_column("Value")
|
|
390
|
+
|
|
391
|
+
stats_table.add_row("Total COLAs", format_number(permittee.get("colas")))
|
|
396
392
|
stats_table.add_row(
|
|
397
|
-
"
|
|
393
|
+
"Approved COLAs", format_number(permittee.get("colas_approved"))
|
|
398
394
|
)
|
|
395
|
+
if permittee.get("last_cola_application_date"):
|
|
396
|
+
stats_table.add_row(
|
|
397
|
+
"Last Application",
|
|
398
|
+
format_date(permittee.get("last_cola_application_date")),
|
|
399
|
+
)
|
|
399
400
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
console.print()
|
|
402
|
+
console.print("[bold]COLA Statistics[/]")
|
|
403
|
+
console.print(stats_table)
|
|
403
404
|
|
|
404
405
|
# Recent COLAs
|
|
405
406
|
recent_colas = permittee.get("recent_colas", [])
|
|
@@ -184,7 +184,11 @@ class TestUsage:
|
|
|
184
184
|
"tier": "free",
|
|
185
185
|
"current_period": "2024-01",
|
|
186
186
|
"detail_views": {"used": 100, "limit": 200, "remaining": 100},
|
|
187
|
-
"list_records": {
|
|
187
|
+
"list_records": {
|
|
188
|
+
"used": 500,
|
|
189
|
+
"limit": 10000,
|
|
190
|
+
"remaining": 9500,
|
|
191
|
+
},
|
|
188
192
|
"per_minute_limit": 10,
|
|
189
193
|
}
|
|
190
194
|
},
|
|
@@ -218,7 +218,11 @@ class TestUsageCommand:
|
|
|
218
218
|
"tier": "free",
|
|
219
219
|
"current_period": "2024-01",
|
|
220
220
|
"detail_views": {"used": 50, "limit": 200, "remaining": 150},
|
|
221
|
-
"list_records": {
|
|
221
|
+
"list_records": {
|
|
222
|
+
"used": 1000,
|
|
223
|
+
"limit": 10000,
|
|
224
|
+
"remaining": 9000,
|
|
225
|
+
},
|
|
222
226
|
"per_minute_limit": 10,
|
|
223
227
|
}
|
|
224
228
|
},
|
colacloud_cli-0.3.0/.mcp.json
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{colacloud_cli-0.3.0 → colacloud_cli-0.3.2}/src/colacloud_cli/commands/production_reports.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|