freeplay 0.3.0a7__py3-none-any.whl → 0.3.0a8__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.
@@ -1,7 +1,7 @@
1
1
  import json
2
2
  import logging
3
3
  from dataclasses import dataclass
4
- from typing import Any, Dict, List, Optional
4
+ from typing import Any, Dict, List, Optional, Union
5
5
 
6
6
  from requests import HTTPError
7
7
 
@@ -61,6 +61,7 @@ class RecordPayload:
61
61
  call_info: CallInfo
62
62
  response_info: ResponseInfo
63
63
  test_run_info: Optional[TestRunInfo] = None
64
+ eval_results: Optional[Dict[str, Union[bool, float]]] = None
64
65
 
65
66
 
66
67
  @dataclass
@@ -111,6 +112,9 @@ class Recordings:
111
112
  if record_payload.test_run_info is not None:
112
113
  record_api_payload['test_case_id'] = record_payload.test_run_info.test_case_id
113
114
 
115
+ if record_payload.eval_results is not None:
116
+ record_api_payload['eval_results'] = record_payload.eval_results
117
+
114
118
  try:
115
119
  recorded_response = api_support.post_raw(
116
120
  api_key=self.call_support.freeplay_api_key,
@@ -40,8 +40,15 @@ class TestRuns:
40
40
  def __init__(self, call_support: CallSupport) -> None:
41
41
  self.call_support = call_support
42
42
 
43
- def create(self, project_id: str, testlist: str, include_outputs: bool = False) -> TestRun:
44
- test_run = self.call_support.create_test_run(project_id, testlist, include_outputs)
43
+ def create(
44
+ self,
45
+ project_id: str,
46
+ testlist: str,
47
+ include_outputs: bool = False,
48
+ name: Optional[str] = None,
49
+ description: Optional[str] = None
50
+ ) -> TestRun:
51
+ test_run = self.call_support.create_test_run(project_id, testlist, include_outputs, name, description)
45
52
  test_cases = [
46
53
  TestCase(test_case_id=test_case.id, variables=test_case.variables, output=test_case.output)
47
54
  for test_case in test_run.test_cases
freeplay/support.py CHANGED
@@ -123,7 +123,9 @@ class CallSupport:
123
123
  self,
124
124
  project_id: str,
125
125
  testlist: str,
126
- include_test_case_outputs: bool = False
126
+ include_test_case_outputs: bool = False,
127
+ name: Optional[str] = None,
128
+ description: Optional[str] = None
127
129
  ) -> TestRunResponse:
128
130
  response = api_support.post_raw(
129
131
  api_key=self.freeplay_api_key,
@@ -131,6 +133,8 @@ class CallSupport:
131
133
  payload={
132
134
  'testlist_name': testlist,
133
135
  'include_test_case_outputs': include_test_case_outputs,
136
+ 'name': name,
137
+ 'description': description
134
138
  },
135
139
  )
136
140
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: freeplay
3
- Version: 0.3.0a7
3
+ Version: 0.3.0a8
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: FreePlay Engineering
@@ -9,13 +9,13 @@ freeplay/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  freeplay/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  freeplay/resources/customer_feedback.py,sha256=aTM7Eez7iYmjXSpRqkHxf4pi6xBrzVnMiQCEJVfPGvg,527
11
11
  freeplay/resources/prompts.py,sha256=v0EY2hHVzqGlOCvrfg3E907LImTRQ69Nx2Xbpu0UID4,13352
12
- freeplay/resources/recordings.py,sha256=CQMhvKLGXVMkW3o0Ixu_zM5k38RSNQRcEM6U30hMNDE,5412
12
+ freeplay/resources/recordings.py,sha256=7H10N8bJpQ_upJ_tkIdYOOE1JfFwe8T7hfH8yr76a2M,5614
13
13
  freeplay/resources/sessions.py,sha256=ioWdeTM9BSrEWKrFH66ysQIw5kCTlCVopJDmWtFgHz0,868
14
- freeplay/resources/test_runs.py,sha256=2NAwoW_Yx7K8YM7QyQ3sv9dN6p0gjNgUAR7wSzLYP6w,1452
15
- freeplay/support.py,sha256=7BizelIEIaSRFj2IL53-RQkjncUNlUS-DPUln2VxoJg,4532
14
+ freeplay/resources/test_runs.py,sha256=NfYcEKJu6Br0YUleo2ZtYi35uRw207uaAhwCBYDJtXQ,1612
15
+ freeplay/support.py,sha256=rlkFuZSByYUdfw2BvKRdqjdmsrl2_4ZsMpDv8htKn7o,4692
16
16
  freeplay/utils.py,sha256=8ZncuwCnzsAhRsaoxOMGa0Py8kXqGHlB9Avr3n79fk0,2064
17
- freeplay-0.3.0a7.dist-info/LICENSE,sha256=_jzIw45hB1XHGxiQ8leZ0GH_X7bR_a8qgxaqnHbCUOo,1064
18
- freeplay-0.3.0a7.dist-info/METADATA,sha256=8tZt-0ThXpF3SqxNOoqaSh_LmgXCDRXPAkaPK06XaDE,1553
19
- freeplay-0.3.0a7.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
20
- freeplay-0.3.0a7.dist-info/entry_points.txt,sha256=32s3rf2UUCqiJT4jnClEXZhdXlvl30uwpcxz-Gsy4UU,54
21
- freeplay-0.3.0a7.dist-info/RECORD,,
17
+ freeplay-0.3.0a8.dist-info/LICENSE,sha256=_jzIw45hB1XHGxiQ8leZ0GH_X7bR_a8qgxaqnHbCUOo,1064
18
+ freeplay-0.3.0a8.dist-info/METADATA,sha256=pJpMSO5APQpgFpNWoNBdGhSx2vTrYA750NHOABY74ww,1553
19
+ freeplay-0.3.0a8.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
20
+ freeplay-0.3.0a8.dist-info/entry_points.txt,sha256=32s3rf2UUCqiJT4jnClEXZhdXlvl30uwpcxz-Gsy4UU,54
21
+ freeplay-0.3.0a8.dist-info/RECORD,,