cassis-cli 1.4.0__tar.gz → 1.4.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.
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/PKG-INFO +1 -1
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/__init__.py +1 -1
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/api.py +11 -3
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/pyproject.toml +1 -1
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/LICENSE +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/NOTICE +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/README.md +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/common.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/eval.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/guide.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/main.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/ontology.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/ontology_design_guide.md +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/projects.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/schema.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/status.py +0 -0
- {cassis_cli-1.4.0 → cassis_cli-1.4.1}/cassis_cli/verify.py +0 -0
|
@@ -11,6 +11,14 @@ from cassis_cli import __version__
|
|
|
11
11
|
DEFAULT_API_URL = "https://app.getcassis.com"
|
|
12
12
|
TIMEOUT_SECONDS = 60.0
|
|
13
13
|
|
|
14
|
+
# Whole-tree endpoints (check, fmt, import) parse and re-serialize every file
|
|
15
|
+
# server-side, so their duration scales with the ontology: a few hundred files
|
|
16
|
+
# is tens of seconds of pure CPU, and the 60s default cut real runs off. The
|
|
17
|
+
# ceiling is deliberately far above what the edge allows (CloudFront's
|
|
18
|
+
# origin_read_timeout, see infra) — a client-side timeout should never be the
|
|
19
|
+
# thing that reports a slow server as "unreachable".
|
|
20
|
+
ONTOLOGY_TREE_TIMEOUT_SECONDS = 300.0
|
|
21
|
+
|
|
14
22
|
USER_AGENT = f"cassis-cli/{__version__}"
|
|
15
23
|
|
|
16
24
|
# Response header the CI endpoints set to the newest cassis-cli on PyPI.
|
|
@@ -149,7 +157,7 @@ def post_ontology_check(
|
|
|
149
157
|
else:
|
|
150
158
|
url = api_url.rstrip("/") + "/api/ci/ontology-check"
|
|
151
159
|
try:
|
|
152
|
-
with _client(transport=transport) as client:
|
|
160
|
+
with _client(timeout=ONTOLOGY_TREE_TIMEOUT_SECONDS, transport=transport) as client:
|
|
153
161
|
response = client.post(
|
|
154
162
|
url,
|
|
155
163
|
json={"files": files},
|
|
@@ -190,7 +198,7 @@ def post_ontology_import(
|
|
|
190
198
|
if label is not None:
|
|
191
199
|
body["label"] = label
|
|
192
200
|
try:
|
|
193
|
-
with _client(transport=transport) as client:
|
|
201
|
+
with _client(timeout=ONTOLOGY_TREE_TIMEOUT_SECONDS, transport=transport) as client:
|
|
194
202
|
response = client.post(
|
|
195
203
|
url,
|
|
196
204
|
json=body,
|
|
@@ -620,7 +628,7 @@ def post_ontology_fmt(
|
|
|
620
628
|
"""POST the ontology tree to /api/ci/ontology-fmt and return the response body."""
|
|
621
629
|
url = api_url.rstrip("/") + "/api/ci/ontology-fmt"
|
|
622
630
|
try:
|
|
623
|
-
with _client(transport=transport) as client:
|
|
631
|
+
with _client(timeout=ONTOLOGY_TREE_TIMEOUT_SECONDS, transport=transport) as client:
|
|
624
632
|
response = client.post(
|
|
625
633
|
url,
|
|
626
634
|
json={"files": files},
|
|
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
|
|
File without changes
|
|
File without changes
|