codepraxis 0.2.0__tar.gz → 0.2.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.
- {codepraxis-0.2.0 → codepraxis-0.2.1}/PKG-INFO +1 -1
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/__init__.py +1 -1
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/remote/client.py +6 -1
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/remote/config.py +4 -1
- {codepraxis-0.2.0 → codepraxis-0.2.1}/tests/test_classification.py +14 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/.gitignore +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/CONTRIBUTING.md +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/README.md +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/RELEASING.md +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/pyproject.toml +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/__main__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/cli.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/commands/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/commands/login.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/commands/publish.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/commands/validate.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/domain/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/domain/contract.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/domain/pack.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/domain/results.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/errors.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/executor.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/local/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/local/backends.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/local/executor.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/local/worker.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/local/workspace.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/remote/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/execution/remote/executor.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/packio/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/packio/archive.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/packio/discovery.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/packio/loader.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/packio/toc.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/installer.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/templates/commands/new.md +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/templates/commands/validate.md +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/templates/marketplace.json +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/templates/plugin.json +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/templates/skills/pack-authoring/SKILL.md +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/reporting/__init__.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/reporting/human.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/reporting/json_reporter.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/reporting/reporter.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/tests/conformance/test_corpus.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/tests/conftest.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/tests/test_publish.py +0 -0
- {codepraxis-0.2.0 → codepraxis-0.2.1}/tests/test_toc.py +0 -0
|
@@ -92,7 +92,12 @@ class ApiClient:
|
|
|
92
92
|
except urllib.error.HTTPError as exc:
|
|
93
93
|
raise self._translate(exc, method, path) from exc
|
|
94
94
|
except urllib.error.URLError as exc:
|
|
95
|
-
|
|
95
|
+
# A bare socket/TLS error is opaque ("tlsv1 unrecognized name"), and
|
|
96
|
+
# the usual cause is a wrong base URL, so name the override here.
|
|
97
|
+
raise PraxisError(
|
|
98
|
+
f"Could not reach {self._config.api_url}: {exc.reason}. "
|
|
99
|
+
f"If your platform is hosted elsewhere, set CODEPRAXIS_API_URL."
|
|
100
|
+
) from exc
|
|
96
101
|
except json.JSONDecodeError as exc:
|
|
97
102
|
raise PraxisError(f"{method} {path} returned a non-JSON response") from exc
|
|
98
103
|
|
|
@@ -20,7 +20,10 @@ from pathlib import Path
|
|
|
20
20
|
|
|
21
21
|
from ...errors import PraxisError
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
#: Public entry point for the platform API. The backend sits behind the web
|
|
24
|
+
#: app rather than a dedicated api.* host, so the prefix is part of the base
|
|
25
|
+
#: URL. Override with CODEPRAXIS_API_URL for staging or a local server.
|
|
26
|
+
DEFAULT_API_URL = "https://www.codepraxis.co/api/public"
|
|
24
27
|
|
|
25
28
|
ENV_API_URL = "CODEPRAXIS_API_URL"
|
|
26
29
|
ENV_TOKEN = "CODEPRAXIS_TOKEN"
|
|
@@ -143,3 +143,17 @@ class TestResponseUnwrapping:
|
|
|
143
143
|
from codepraxis.execution.remote.client import _unwrap
|
|
144
144
|
|
|
145
145
|
assert _unwrap({"status": "passed"}) == {"status": "passed"}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class TestRemoteDefaults:
|
|
149
|
+
def test_default_api_url_includes_the_public_prefix(self):
|
|
150
|
+
"""The backend sits behind the web app, so the prefix is part of the base.
|
|
151
|
+
|
|
152
|
+
Shipping a bare host meant `codepraxis --login` failed on a TLS error
|
|
153
|
+
before it could reach anything.
|
|
154
|
+
"""
|
|
155
|
+
from codepraxis.execution.remote.config import DEFAULT_API_URL
|
|
156
|
+
|
|
157
|
+
assert DEFAULT_API_URL.startswith("https://")
|
|
158
|
+
assert DEFAULT_API_URL.endswith("/api/public")
|
|
159
|
+
assert not DEFAULT_API_URL.endswith("/")
|
|
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
|
|
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
|
|
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
|
{codepraxis-0.2.0 → codepraxis-0.2.1}/src/codepraxis/plugin/templates/skills/pack-authoring/SKILL.md
RENAMED
|
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
|