kotharcomputing 0.80.1__tar.gz → 0.82.0__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.
Files changed (36) hide show
  1. {kotharcomputing-0.80.1/src/kotharcomputing.egg-info → kotharcomputing-0.82.0}/PKG-INFO +1 -1
  2. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/pyproject.toml +1 -1
  3. kotharcomputing-0.82.0/src/kotharcomputing/__init__.py +246 -0
  4. kotharcomputing-0.82.0/src/kotharcomputing/aleph_language_server.py +162 -0
  5. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0/src/kotharcomputing.egg-info}/PKG-INFO +1 -1
  6. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing.egg-info/SOURCES.txt +1 -0
  7. kotharcomputing-0.82.0/tests/test_public_api.py +145 -0
  8. kotharcomputing-0.80.1/src/kotharcomputing/__init__.py +0 -16
  9. kotharcomputing-0.80.1/tests/test_public_api.py +0 -35
  10. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/LICENSE +0 -0
  11. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/README.md +0 -0
  12. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/setup.cfg +0 -0
  13. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/agents.py +0 -0
  14. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/ai.py +0 -0
  15. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/api_tokens.py +0 -0
  16. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/client.py +0 -0
  17. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/common.py +0 -0
  18. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/credits.py +0 -0
  19. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/errors.py +0 -0
  20. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/executions.py +0 -0
  21. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/fetch.py +0 -0
  22. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/files.py +0 -0
  23. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/jobs.py +0 -0
  24. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/py.typed +0 -0
  25. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/runtimes.py +0 -0
  26. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/service_prices.py +0 -0
  27. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/subscribe_user.py +0 -0
  28. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/subscribe_workspace.py +0 -0
  29. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/subscriptions.py +0 -0
  30. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/users.py +0 -0
  31. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing/workspaces.py +0 -0
  32. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing.egg-info/dependency_links.txt +0 -0
  33. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing.egg-info/requires.txt +0 -0
  34. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/src/kotharcomputing.egg-info/top_level.txt +0 -0
  35. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/tests/test_fetch_auth_headers.py +0 -0
  36. {kotharcomputing-0.80.1 → kotharcomputing-0.82.0}/tests/test_fetch_url_building.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kotharcomputing
3
- Version: 0.80.1
3
+ Version: 0.82.0
4
4
  Summary: Python SDK for the Kothar API
5
5
  Author: Kothar Computing
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kotharcomputing"
7
- version = "0.80.1"
7
+ version = "0.82.0"
8
8
  description = "Python SDK for the Kothar API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -0,0 +1,246 @@
1
+ from .aleph_language_server import (
2
+ AlephLanguageServerClient,
3
+ AlephLanguageServerClientOptions,
4
+ AnalyzeResult,
5
+ AnalyzeResultWithAst,
6
+ AstNode,
7
+ AstNodeLocation,
8
+ AstNodeType,
9
+ Diagnostic,
10
+ DiagnosticSeverity,
11
+ Position,
12
+ Range,
13
+ )
14
+ from .agents import (
15
+ Activity,
16
+ ActivityExecution,
17
+ ActivityJob,
18
+ Agent,
19
+ AgentCapabilities,
20
+ AgentCloud,
21
+ AgentKind,
22
+ AgentPersonal,
23
+ AgentStatus,
24
+ CreateAgentArgs,
25
+ CreateAgentResult,
26
+ DeleteAgentResult,
27
+ ResetAgentTokenResult,
28
+ WithAgent,
29
+ )
30
+ from .ai import (
31
+ AbbreviatedAIChat,
32
+ AIChat,
33
+ AIChatContentEditorContext,
34
+ AIChatContentEditorContextFile,
35
+ AIChatContentText,
36
+ AIChatFileLocation,
37
+ AIChatMessage,
38
+ AIChatMessageApi,
39
+ AIChatMessageAssistant,
40
+ AIChatMessageAssistantContent,
41
+ AIChatMessageAssistantDelta,
42
+ AIChatMessageError,
43
+ AIChatMessageTool,
44
+ AIChatMessageUser,
45
+ AIChatMessageUserAppend,
46
+ AIChatMessageUserContent,
47
+ AIChatMessageUserContentEdition,
48
+ AIChatMessageUserCreate,
49
+ AIChatMessageWithStreaming,
50
+ AIChatToolCall,
51
+ AIChatToolCallFunction,
52
+ AIChatToolDescription,
53
+ AIChatToolDescriptionFunction,
54
+ AIModelInfo,
55
+ )
56
+ from .api_tokens import (
57
+ ApiToken,
58
+ ApiTokenPermissionAction,
59
+ ApiTokenPermissions,
60
+ ApiTokenPermissionSubject,
61
+ CreateApiTokenArgs,
62
+ CreateApiTokenResult,
63
+ )
64
+ from .client import (
65
+ KotharClient,
66
+ KotharClientOptions,
67
+ RawResponse,
68
+ )
69
+ from .credits import (
70
+ CreditBalance,
71
+ CreditTransaction,
72
+ )
73
+ from .errors import KOTHAR_ERROR_TYPE_BASE_URL, KotharApiError
74
+ from .executions import (
75
+ ExecuteArgs,
76
+ ExecuteResult,
77
+ Execution,
78
+ ExecutionControl,
79
+ ExecutionEnded,
80
+ ExecutionError,
81
+ ExecutionMessage,
82
+ ExecutionOutput,
83
+ ExecutionScriptArgs,
84
+ ExecutionStarted,
85
+ SystemMetrics,
86
+ SystemMetricSample,
87
+ SystemMetricSeries,
88
+ )
89
+ from .files import (
90
+ FileContent,
91
+ FileHistoryEntry,
92
+ FileListItem,
93
+ FileSearchResultItem,
94
+ )
95
+ from .jobs import (
96
+ CreateJobArgs,
97
+ Job,
98
+ JobStatus,
99
+ UpdateJobArgs,
100
+ )
101
+ from .service_prices import ServicePrice
102
+ from .subscribe_user import (
103
+ KotharApiUserEvent,
104
+ KotharApiUserEventCreditBalancesUpdated,
105
+ )
106
+ from .subscribe_workspace import (
107
+ KotharApiWorkspaceEvent,
108
+ KotharApiWorkspaceFileCreatedEvent,
109
+ KotharApiWorkspaceFileDeletedEvent,
110
+ KotharApiWorkspaceFileMovedEvent,
111
+ KotharApiWorkspaceFileUpdatedEvent,
112
+ KotharApiWorkspaceJobUpdatedEvent,
113
+ )
114
+ from .subscriptions import (
115
+ Subscription,
116
+ SubscriptionInterval,
117
+ SubscriptionOption,
118
+ SubscriptionStatus,
119
+ )
120
+ from .users import (
121
+ UserProfile,
122
+ WithUser,
123
+ )
124
+ from .workspaces import (
125
+ Workspace,
126
+ WorkspaceStorageStats,
127
+ )
128
+
129
+ __all__ = [
130
+ # Aleph Language Server
131
+ "AlephLanguageServerClient",
132
+ "AlephLanguageServerClientOptions",
133
+ "AnalyzeResult",
134
+ "AnalyzeResultWithAst",
135
+ "AstNode",
136
+ "AstNodeLocation",
137
+ "AstNodeType",
138
+ "Diagnostic",
139
+ "DiagnosticSeverity",
140
+ "Position",
141
+ "Range",
142
+ # Agents
143
+ "Activity",
144
+ "ActivityExecution",
145
+ "ActivityJob",
146
+ "Agent",
147
+ "AgentCapabilities",
148
+ "AgentCloud",
149
+ "AgentKind",
150
+ "AgentPersonal",
151
+ "AgentStatus",
152
+ "CreateAgentArgs",
153
+ "CreateAgentResult",
154
+ "DeleteAgentResult",
155
+ "ResetAgentTokenResult",
156
+ "WithAgent",
157
+ # AI
158
+ "AbbreviatedAIChat",
159
+ "AIChat",
160
+ "AIChatContentEditorContext",
161
+ "AIChatContentEditorContextFile",
162
+ "AIChatContentText",
163
+ "AIChatFileLocation",
164
+ "AIChatMessage",
165
+ "AIChatMessageApi",
166
+ "AIChatMessageAssistant",
167
+ "AIChatMessageAssistantContent",
168
+ "AIChatMessageAssistantDelta",
169
+ "AIChatMessageError",
170
+ "AIChatMessageTool",
171
+ "AIChatMessageUser",
172
+ "AIChatMessageUserAppend",
173
+ "AIChatMessageUserContent",
174
+ "AIChatMessageUserContentEdition",
175
+ "AIChatMessageUserCreate",
176
+ "AIChatMessageWithStreaming",
177
+ "AIChatToolCall",
178
+ "AIChatToolCallFunction",
179
+ "AIChatToolDescription",
180
+ "AIChatToolDescriptionFunction",
181
+ "AIModelInfo",
182
+ # API Tokens
183
+ "ApiToken",
184
+ "ApiTokenPermissionAction",
185
+ "ApiTokenPermissions",
186
+ "ApiTokenPermissionSubject",
187
+ "CreateApiTokenArgs",
188
+ "CreateApiTokenResult",
189
+ # Client
190
+ "KotharClient",
191
+ "KotharClientOptions",
192
+ "RawResponse",
193
+ # Credits
194
+ "CreditBalance",
195
+ "CreditTransaction",
196
+ # Errors
197
+ "KOTHAR_ERROR_TYPE_BASE_URL",
198
+ "KotharApiError",
199
+ # Executions
200
+ "ExecuteArgs",
201
+ "ExecuteResult",
202
+ "Execution",
203
+ "ExecutionControl",
204
+ "ExecutionEnded",
205
+ "ExecutionError",
206
+ "ExecutionMessage",
207
+ "ExecutionOutput",
208
+ "ExecutionScriptArgs",
209
+ "ExecutionStarted",
210
+ "SystemMetrics",
211
+ "SystemMetricSample",
212
+ "SystemMetricSeries",
213
+ # Files
214
+ "FileContent",
215
+ "FileHistoryEntry",
216
+ "FileListItem",
217
+ "FileSearchResultItem",
218
+ # Jobs
219
+ "CreateJobArgs",
220
+ "Job",
221
+ "JobStatus",
222
+ "UpdateJobArgs",
223
+ # Service Prices
224
+ "ServicePrice",
225
+ # Subscribe User
226
+ "KotharApiUserEvent",
227
+ "KotharApiUserEventCreditBalancesUpdated",
228
+ # Subscribe Workspace
229
+ "KotharApiWorkspaceEvent",
230
+ "KotharApiWorkspaceFileCreatedEvent",
231
+ "KotharApiWorkspaceFileDeletedEvent",
232
+ "KotharApiWorkspaceFileMovedEvent",
233
+ "KotharApiWorkspaceFileUpdatedEvent",
234
+ "KotharApiWorkspaceJobUpdatedEvent",
235
+ # Subscriptions
236
+ "Subscription",
237
+ "SubscriptionInterval",
238
+ "SubscriptionOption",
239
+ "SubscriptionStatus",
240
+ # Users
241
+ "UserProfile",
242
+ "WithUser",
243
+ # Workspaces
244
+ "Workspace",
245
+ "WorkspaceStorageStats",
246
+ ]
@@ -0,0 +1,162 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass
4
+ from enum import IntEnum
5
+ from typing import Literal, NotRequired, TypedDict, cast, overload
6
+
7
+ from .fetch import ApiTransport
8
+
9
+ DEFAULT_BASE_URL = "https://lsp.kotharcomputing.com"
10
+
11
+
12
+ @dataclass(slots=True)
13
+ class AlephLanguageServerClientOptions:
14
+ base_url: str = DEFAULT_BASE_URL
15
+ timeout: float = 30.0
16
+
17
+
18
+ class AlephLanguageServerClient:
19
+ def __init__(
20
+ self,
21
+ options: AlephLanguageServerClientOptions | None = None,
22
+ *,
23
+ base_url: str = DEFAULT_BASE_URL,
24
+ timeout: float = 30.0,
25
+ ) -> None:
26
+ if options is None:
27
+ options = AlephLanguageServerClientOptions(
28
+ base_url=base_url,
29
+ timeout=timeout,
30
+ )
31
+
32
+ self._transport = ApiTransport(
33
+ base_url=options.base_url,
34
+ access_token=None,
35
+ timeout=options.timeout,
36
+ )
37
+
38
+ def version(self) -> dict[str, str]:
39
+ return self._transport.get_json("version")
40
+
41
+ @overload
42
+ def analyze(
43
+ self, code: str, *, include_ast: Literal[True]
44
+ ) -> AnalyzeResultWithAst: ...
45
+ @overload
46
+ def analyze(self, code: str, *, include_ast: bool = ...) -> AnalyzeResult: ...
47
+
48
+ def analyze(
49
+ self, code: str, *, include_ast: bool = False
50
+ ) -> AnalyzeResult | AnalyzeResultWithAst:
51
+ response = self._transport.raw(
52
+ "post",
53
+ "analyze",
54
+ headers={"Content-Type": "application/x-aleph"},
55
+ search_params={"include_ast": "true"} if include_ast else None,
56
+ body=code,
57
+ )
58
+ return cast(
59
+ AnalyzeResultWithAst if include_ast else AnalyzeResult, response.json()
60
+ )
61
+
62
+
63
+ # -- LSP Diagnostic types (based on LSP 3.17 specification) --
64
+
65
+
66
+ class DiagnosticSeverity(IntEnum):
67
+ Error = 1
68
+ Warning = 2
69
+ Information = 3
70
+ Hint = 4
71
+
72
+
73
+ class Position(TypedDict):
74
+ line: int
75
+ character: int
76
+
77
+
78
+ class Range(TypedDict):
79
+ start: Position
80
+ end: Position
81
+
82
+
83
+ class Diagnostic(TypedDict):
84
+ range: Range
85
+ message: str
86
+ severity: NotRequired[DiagnosticSeverity]
87
+ code: NotRequired[str | int]
88
+ source: NotRequired[str]
89
+
90
+
91
+ class AnalyzeResult(TypedDict):
92
+ diagnostics: list[Diagnostic]
93
+
94
+
95
+ class AnalyzeResultWithAst(AnalyzeResult):
96
+ ast: list[AstNode]
97
+
98
+
99
+ class AstNode(TypedDict):
100
+ type: AstNodeType
101
+ text: NotRequired[str]
102
+ isSynthetic: NotRequired[Literal[True]]
103
+ location: NotRequired[AstNodeLocation]
104
+ children: NotRequired[list[AstNode]]
105
+
106
+
107
+ class AstNodeLocation(TypedDict):
108
+ uri: NotRequired[str]
109
+ range: Range
110
+
111
+
112
+ AstNodeType = Literal[
113
+ "Id",
114
+ "Fun_Call",
115
+ "Unused_Return_Fun_Call",
116
+ "Arg_List",
117
+ "Slice_List",
118
+ "Slice",
119
+ "Equation",
120
+ "Var_Decl",
121
+ "Assign_Decl",
122
+ "Array_Call",
123
+ "Dot_Access",
124
+ "Lambda",
125
+ "Block",
126
+ "Scopeless_Block",
127
+ "Include",
128
+ "Def",
129
+ "While",
130
+ "If",
131
+ "For",
132
+ "Ranged_For",
133
+ "Inline_Array",
134
+ "Inline_Map",
135
+ "Return",
136
+ "File",
137
+ "Prefix",
138
+ "Break",
139
+ "Continue",
140
+ "Map_Pair",
141
+ "Value_Range",
142
+ "Inline_Range",
143
+ "Try",
144
+ "Catch",
145
+ "Finally",
146
+ "Method",
147
+ "Attr_Decl",
148
+ "Logical_And",
149
+ "Logical_Or",
150
+ "Reference",
151
+ "Switch",
152
+ "Case",
153
+ "Default",
154
+ "Noop",
155
+ "Class",
156
+ "Binary",
157
+ "Arg",
158
+ "Global_Decl",
159
+ "Constant",
160
+ "Compiled",
161
+ "Error",
162
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kotharcomputing
3
- Version: 0.80.1
3
+ Version: 0.82.0
4
4
  Summary: Python SDK for the Kothar API
5
5
  Author: Kothar Computing
6
6
  License-Expression: Apache-2.0
@@ -4,6 +4,7 @@ pyproject.toml
4
4
  src/kotharcomputing/__init__.py
5
5
  src/kotharcomputing/agents.py
6
6
  src/kotharcomputing/ai.py
7
+ src/kotharcomputing/aleph_language_server.py
7
8
  src/kotharcomputing/api_tokens.py
8
9
  src/kotharcomputing/client.py
9
10
  src/kotharcomputing/common.py
@@ -0,0 +1,145 @@
1
+ from __future__ import annotations
2
+
3
+ import importlib
4
+ from pathlib import Path
5
+ import sys
6
+
7
+
8
+ SRC_DIR = Path(__file__).resolve().parents[1] / "src"
9
+ if str(SRC_DIR) not in sys.path:
10
+ sys.path.insert(0, str(SRC_DIR))
11
+
12
+
13
+ def test_package_import_and_public_exports() -> None:
14
+ module = importlib.import_module("kotharcomputing")
15
+
16
+ expected_exports = {
17
+ # Aleph Language Server
18
+ "AlephLanguageServerClient",
19
+ "AlephLanguageServerClientOptions",
20
+ "AnalyzeResult",
21
+ "AnalyzeResultWithAst",
22
+ "AstNode",
23
+ "AstNodeLocation",
24
+ "AstNodeType",
25
+ "Diagnostic",
26
+ "DiagnosticSeverity",
27
+ "Position",
28
+ "Range",
29
+ # Agents
30
+ "Activity",
31
+ "ActivityExecution",
32
+ "ActivityJob",
33
+ "Agent",
34
+ "AgentCapabilities",
35
+ "AgentCloud",
36
+ "AgentKind",
37
+ "AgentPersonal",
38
+ "AgentStatus",
39
+ "CreateAgentArgs",
40
+ "CreateAgentResult",
41
+ "DeleteAgentResult",
42
+ "ResetAgentTokenResult",
43
+ "WithAgent",
44
+ # AI
45
+ "AbbreviatedAIChat",
46
+ "AIChat",
47
+ "AIChatContentEditorContext",
48
+ "AIChatContentEditorContextFile",
49
+ "AIChatContentText",
50
+ "AIChatFileLocation",
51
+ "AIChatMessage",
52
+ "AIChatMessageApi",
53
+ "AIChatMessageAssistant",
54
+ "AIChatMessageAssistantContent",
55
+ "AIChatMessageAssistantDelta",
56
+ "AIChatMessageError",
57
+ "AIChatMessageTool",
58
+ "AIChatMessageUser",
59
+ "AIChatMessageUserAppend",
60
+ "AIChatMessageUserContent",
61
+ "AIChatMessageUserContentEdition",
62
+ "AIChatMessageUserCreate",
63
+ "AIChatMessageWithStreaming",
64
+ "AIChatToolCall",
65
+ "AIChatToolCallFunction",
66
+ "AIChatToolDescription",
67
+ "AIChatToolDescriptionFunction",
68
+ "AIModelInfo",
69
+ # API Tokens
70
+ "ApiToken",
71
+ "ApiTokenPermissionAction",
72
+ "ApiTokenPermissions",
73
+ "ApiTokenPermissionSubject",
74
+ "CreateApiTokenArgs",
75
+ "CreateApiTokenResult",
76
+ # Client
77
+ "KotharClient",
78
+ "KotharClientOptions",
79
+ "RawResponse",
80
+ # Credits
81
+ "CreditBalance",
82
+ "CreditTransaction",
83
+ # Errors
84
+ "KOTHAR_ERROR_TYPE_BASE_URL",
85
+ "KotharApiError",
86
+ # Executions
87
+ "ExecuteArgs",
88
+ "ExecuteResult",
89
+ "Execution",
90
+ "ExecutionControl",
91
+ "ExecutionEnded",
92
+ "ExecutionError",
93
+ "ExecutionMessage",
94
+ "ExecutionOutput",
95
+ "ExecutionScriptArgs",
96
+ "ExecutionStarted",
97
+ "SystemMetrics",
98
+ "SystemMetricSample",
99
+ "SystemMetricSeries",
100
+ # Files
101
+ "FileContent",
102
+ "FileHistoryEntry",
103
+ "FileListItem",
104
+ "FileSearchResultItem",
105
+ # Jobs
106
+ "CreateJobArgs",
107
+ "Job",
108
+ "JobStatus",
109
+ "UpdateJobArgs",
110
+ # Service Prices
111
+ "ServicePrice",
112
+ # Subscribe User
113
+ "KotharApiUserEvent",
114
+ "KotharApiUserEventCreditBalancesUpdated",
115
+ # Subscribe Workspace
116
+ "KotharApiWorkspaceEvent",
117
+ "KotharApiWorkspaceFileCreatedEvent",
118
+ "KotharApiWorkspaceFileDeletedEvent",
119
+ "KotharApiWorkspaceFileMovedEvent",
120
+ "KotharApiWorkspaceFileUpdatedEvent",
121
+ "KotharApiWorkspaceJobUpdatedEvent",
122
+ # Subscriptions
123
+ "Subscription",
124
+ "SubscriptionInterval",
125
+ "SubscriptionOption",
126
+ "SubscriptionStatus",
127
+ # Users
128
+ "UserProfile",
129
+ "WithUser",
130
+ # Workspaces
131
+ "Workspace",
132
+ "WorkspaceStorageStats",
133
+ }
134
+
135
+ assert set(module.__all__) == expected_exports
136
+ for name in expected_exports:
137
+ assert hasattr(module, name)
138
+
139
+
140
+ def test_kothar_client_uses_default_base_url() -> None:
141
+ module = importlib.import_module("kotharcomputing")
142
+
143
+ client = module.KotharClient()
144
+
145
+ assert client._transport.base_url == "https://api.kotharcomputing.com/"
@@ -1,16 +0,0 @@
1
- from .client import (
2
- KotharClient,
3
- KotharClientOptions,
4
- RawResponse,
5
- )
6
- from .executions import ExecuteResult
7
- from .errors import KOTHAR_ERROR_TYPE_BASE_URL, KotharApiError
8
-
9
- __all__ = [
10
- "KOTHAR_ERROR_TYPE_BASE_URL",
11
- "KotharApiError",
12
- "KotharClient",
13
- "KotharClientOptions",
14
- "RawResponse",
15
- "ExecuteResult",
16
- ]
@@ -1,35 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import importlib
4
- from pathlib import Path
5
- import sys
6
-
7
-
8
- SRC_DIR = Path(__file__).resolve().parents[1] / "src"
9
- if str(SRC_DIR) not in sys.path:
10
- sys.path.insert(0, str(SRC_DIR))
11
-
12
-
13
- def test_package_import_and_public_exports() -> None:
14
- module = importlib.import_module("kotharcomputing")
15
-
16
- expected_exports = {
17
- "KOTHAR_ERROR_TYPE_BASE_URL",
18
- "KotharApiError",
19
- "KotharClient",
20
- "KotharClientOptions",
21
- "RawResponse",
22
- "ExecuteResult",
23
- }
24
-
25
- assert set(module.__all__) == expected_exports
26
- for name in expected_exports:
27
- assert hasattr(module, name)
28
-
29
-
30
- def test_kothar_client_uses_default_base_url() -> None:
31
- module = importlib.import_module("kotharcomputing")
32
-
33
- client = module.KotharClient()
34
-
35
- assert client._transport.base_url == "https://api.kotharcomputing.com/"