freeplay 0.3.0a7__tar.gz → 0.3.0a8__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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "freeplay"
3
- version = "0.3.0-alpha.7"
3
+ version = "0.3.0-alpha.8"
4
4
  description = ""
5
5
  authors = ["FreePlay Engineering <engineering@freeplay.ai>"]
6
6
  license = "MIT"
@@ -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
@@ -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
 
File without changes
File without changes