trismik 0.9.5__py3-none-any.whl → 0.9.6__py3-none-any.whl

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.
trismik/_mapper.py CHANGED
@@ -9,7 +9,6 @@ from trismik.types import (
9
9
  TrismikMeResponse,
10
10
  TrismikMultipleChoiceTextItem,
11
11
  TrismikOrganization,
12
- TrismikProject,
13
12
  TrismikReplayResponse,
14
13
  TrismikResponse,
15
14
  TrismikResult,
@@ -337,23 +336,3 @@ class TrismikResponseMapper:
337
336
  user=user_info,
338
337
  responseCount=json["responseCount"],
339
338
  )
340
-
341
- @staticmethod
342
- def to_project(json: Dict[str, Any]) -> TrismikProject:
343
- """
344
- Convert JSON response to a TrismikProject object.
345
-
346
- Args:
347
- json (Dict[str, Any]): JSON response from project creation endpoint.
348
-
349
- Returns:
350
- TrismikProject: Project object.
351
- """
352
- return TrismikProject(
353
- id=json["id"],
354
- name=json["name"],
355
- description=json.get("description"),
356
- organizationId=json["organizationId"],
357
- createdAt=json["createdAt"],
358
- updatedAt=json["updatedAt"],
359
- )
trismik/adaptive_test.py CHANGED
@@ -22,7 +22,6 @@ from trismik.types import (
22
22
  TrismikDataset,
23
23
  TrismikItem,
24
24
  TrismikMeResponse,
25
- TrismikProject,
26
25
  TrismikReplayRequest,
27
26
  TrismikReplayRequestItem,
28
27
  TrismikRunMetadata,
@@ -141,59 +140,6 @@ class AdaptiveTest:
141
140
  """
142
141
  return await self._client.me()
143
142
 
144
- def create_project(
145
- self,
146
- name: str,
147
- organization_id: str,
148
- description: Optional[str] = None,
149
- ) -> TrismikProject:
150
- """
151
- Create a new project synchronously.
152
-
153
- Args:
154
- name (str): Name of the project.
155
- organization_id (str): ID of the organization to create the
156
- project in.
157
- description (Optional[str]): Optional description of the project.
158
-
159
- Returns:
160
- TrismikProject: Created project information.
161
-
162
- Raises:
163
- TrismikValidationError: If the request fails validation.
164
- TrismikApiError: If API request fails.
165
- """
166
- loop = self._get_loop()
167
- return loop.run_until_complete(
168
- self.create_project_async(name, organization_id, description)
169
- )
170
-
171
- async def create_project_async(
172
- self,
173
- name: str,
174
- organization_id: str,
175
- description: Optional[str] = None,
176
- ) -> TrismikProject:
177
- """
178
- Create a new project asynchronously.
179
-
180
- Args:
181
- name (str): Name of the project.
182
- organization_id (str): ID of the organization to create the
183
- project in.
184
- description (Optional[str]): Optional description of the project.
185
-
186
- Returns:
187
- TrismikProject: Created project information.
188
-
189
- Raises:
190
- TrismikValidationError: If the request fails validation.
191
- TrismikApiError: If API request fails.
192
- """
193
- return await self._client.create_project(
194
- name, organization_id, description
195
- )
196
-
197
143
  @overload
198
144
  def run( # noqa: E704
199
145
  self,
trismik/client_async.py CHANGED
@@ -22,7 +22,6 @@ from trismik.types import (
22
22
  TrismikClassicEvalResponse,
23
23
  TrismikDataset,
24
24
  TrismikMeResponse,
25
- TrismikProject,
26
25
  TrismikReplayRequest,
27
26
  TrismikReplayResponse,
28
27
  TrismikRunMetadata,
@@ -361,44 +360,3 @@ class TrismikAsyncClient:
361
360
  raise self._handle_http_error(e) from e
362
361
  except httpx.HTTPError as e:
363
362
  raise TrismikApiError(str(e)) from e
364
-
365
- async def create_project(
366
- self,
367
- name: str,
368
- organization_id: str,
369
- description: Optional[str] = None,
370
- ) -> TrismikProject:
371
- """
372
- Create a new project.
373
-
374
- Args:
375
- name (str): Name of the project.
376
- organization_id (str): ID of the organization to create the
377
- project in.
378
- description (Optional[str]): Optional description of the project.
379
-
380
- Returns:
381
- TrismikProject: Created project information.
382
-
383
- Raises:
384
- TrismikValidationError: If the request fails validation.
385
- TrismikApiError: If API request fails.
386
- """
387
- try:
388
- url = "../admin/public/projects"
389
-
390
- body = {"name": name}
391
- if description is not None:
392
- body["description"] = description
393
-
394
- headers = {"x-organization-id": organization_id}
395
- response = await self._http_client.post(
396
- url, json=body, headers=headers
397
- )
398
- response.raise_for_status()
399
- json = response.json()
400
- return TrismikResponseMapper.to_project(json)
401
- except httpx.HTTPStatusError as e:
402
- raise self._handle_http_error(e) from e
403
- except httpx.HTTPError as e:
404
- raise TrismikApiError(str(e)) from e
trismik/types.py CHANGED
@@ -299,23 +299,3 @@ class TrismikClassicEvalResponse:
299
299
  createdAt: str
300
300
  user: TrismikUserInfo
301
301
  responseCount: int
302
-
303
-
304
- @dataclass
305
- class TrismikProjectRequest:
306
- """Request to create a new project."""
307
-
308
- name: str
309
- description: Optional[str] = None
310
-
311
-
312
- @dataclass
313
- class TrismikProject:
314
- """Project information."""
315
-
316
- id: str
317
- name: str
318
- description: Optional[str]
319
- organizationId: str
320
- createdAt: str
321
- updatedAt: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trismik
3
- Version: 0.9.5
3
+ Version: 0.9.6
4
4
  Summary:
5
5
  License-File: LICENSE
6
6
  Author: Bartosz Kielczewski
@@ -0,0 +1,12 @@
1
+ trismik/__init__.py,sha256=20SwXrda9YsgykaoPohwz6foj2FkraniPA-GTQS9m00,197
2
+ trismik/_mapper.py,sha256=8iQ-cvKG5IkKoAHhmb9PSjB4Xwim5fEU2btgaw8aPsw,10375
3
+ trismik/_utils.py,sha256=WZ7x0EaG7PdXdFZMIs1wzgwqiPQm59QDDmQzBKYGCEg,3753
4
+ trismik/adaptive_test.py,sha256=hLGdf0jgLmJJ55I9c5QjaEd1bCA8QNfhJJoOBkF38ik,20002
5
+ trismik/client_async.py,sha256=ZOvAH-nTnh_S3mrpLuprxtByZBasTnNCysBwUPwXMb0,12523
6
+ trismik/exceptions.py,sha256=2wb4_K7GdDf00s3xUaiSfw6718ZV3Eaa4M2lYbiEZl4,1945
7
+ trismik/settings.py,sha256=FCP-d8ZEiYWUTWoa9nOVzSwTOLvg8y0pU08dAseiOwY,412
8
+ trismik/types.py,sha256=CNjvMQGnRM-ghjiZ-OWi6ZBI8RiyphuT_ABt0lhrtIA,6247
9
+ trismik-0.9.6.dist-info/METADATA,sha256=LIfHvXxhQ7RftF7pMf7WuTW9sc6X9cC7A2i6AMbvZGc,6692
10
+ trismik-0.9.6.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
11
+ trismik-0.9.6.dist-info/licenses/LICENSE,sha256=tgetRhapGLh7ZxfknW6Mm-WobfziPd64nAK52X5XKaw,1077
12
+ trismik-0.9.6.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- trismik/__init__.py,sha256=20SwXrda9YsgykaoPohwz6foj2FkraniPA-GTQS9m00,197
2
- trismik/_mapper.py,sha256=9LtEtekXas6tLP_BETl5geDeLKmTGrjdGwkU3bkgmHk,10995
3
- trismik/_utils.py,sha256=WZ7x0EaG7PdXdFZMIs1wzgwqiPQm59QDDmQzBKYGCEg,3753
4
- trismik/adaptive_test.py,sha256=Fmc6PJZg_SKQjV_xQF29ZJQwPxpGwfKuvi2VznAmOB0,21646
5
- trismik/client_async.py,sha256=Z0tmePA86nO3Ul_55eZdT_52LSgRESANYqqrX4hH9Us,13883
6
- trismik/exceptions.py,sha256=2wb4_K7GdDf00s3xUaiSfw6718ZV3Eaa4M2lYbiEZl4,1945
7
- trismik/settings.py,sha256=FCP-d8ZEiYWUTWoa9nOVzSwTOLvg8y0pU08dAseiOwY,412
8
- trismik/types.py,sha256=DQ88f_PcJmvmSAQPFDxEmtJSrQQDTSvhxbdrzzRHd-4,6571
9
- trismik-0.9.5.dist-info/METADATA,sha256=rMF2N0d9MaoA2uIA9CL9LuoURTXs2ZCPSb4ZNZ2yZHc,6692
10
- trismik-0.9.5.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
11
- trismik-0.9.5.dist-info/licenses/LICENSE,sha256=tgetRhapGLh7ZxfknW6Mm-WobfziPd64nAK52X5XKaw,1077
12
- trismik-0.9.5.dist-info/RECORD,,