project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
Sema4AI_actions
public
public
0
0
_dont_log_this
def _dont_log_this():pass
1
2
0
5
0
1
2
1
[]
None
{}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.resources.check_py.call_another_method"]
The function (_dont_log_this) defined within the public class called public.The function start at line 1 and ends at 2. It contains 2 lines of code and it has a cyclomatic complexity of 1. It take 0 parameter, represented as [1.0] and does not return any value. It has 1.0 function calling this function which is ["_.con...
Sema4AI_actions
public
public
0
0
call_another_method
def call_another_method(param0, param1, *args, **kwargs):"docstring for call_another_method"_dont_log_this()assert 1 == 1
1
4
4
21
0
5
8
5
param0,param1,*args,**kwargs
[]
None
{"Expr": 2}
1
4
1
["_dont_log_this"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.resources.check_py.some_method"]
The function (call_another_method) defined within the public class called public.The function start at line 5 and ends at 8. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [5.0] and does not return any value. It declare 1.0 function, It has 1.0 function called...
Sema4AI_actions
public
public
0
0
some_method
def some_method():call_another_method(1, "arg", ["a", "b"], c=3)return 22
1
3
0
22
0
11
13
11
[]
Returns
{"Expr": 1, "Return": 1}
1
3
1
["call_another_method"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_collect_tasks.actions_py.main"]
The function (some_method) defined within the public class called public.The function start at line 11 and ends at 13. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called ins...
Sema4AI_actions
public
public
0
0
some_method
def some_method():print("In some method")
1
2
0
8
0
6
7
6
[]
None
{"Expr": 1}
1
2
1
["print"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_collect_tasks.actions_py.main"]
The function (some_method) defined within the public class called public.The function start at line 6 and ends at 7. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside wh...
Sema4AI_actions
public
public
0
0
main
def main():"""main method docstring"""some_method()
1
2
0
8
0
11
15
11
[]
None
{"Expr": 2}
1
5
1
["some_method"]
199
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3518760_makerbot_pyserial.ez_setup_py.main", "_.content.gdriv...
The function (main) defined within the public class called public.The function start at line 11 and ends at 15. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which i...
Sema4AI_actions
public
public
0
0
raise_an_error
def raise_an_error():raise ValueError("asd")
1
2
0
9
0
18
19
18
[]
None
{}
1
2
1
["ValueError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_collect_tasks.actions_py.main_errors"]
The function (raise_an_error) defined within the public class called public.The function start at line 18 and ends at 19. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insi...
Sema4AI_actions
public
public
0
0
main_errors
def main_errors():raise_an_error()
1
2
0
7
0
23
24
23
[]
None
{"Expr": 1}
1
2
1
["raise_an_error"]
0
[]
The function (main_errors) defined within the public class called public.The function start at line 23 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called in...
Sema4AI_actions
public
public
0
0
task_with_args
def task_with_args(my_input_arg: str, multiplier: int) -> str:return my_input_arg * multiplier
1
2
2
17
0
28
29
28
my_input_arg,multiplier
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (task_with_args) defined within the public class called public.The function start at line 28 and ends at 29. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [28.0] and does not return any value..
Sema4AI_actions
public
public
0
0
main
def main():pass
1
2
0
5
0
5
6
5
[]
None
{}
0
2
0
[]
199
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3518760_makerbot_pyserial.ez_setup_py.main", "_.content.gdriv...
The function (main) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 199.0 functions calling this function which are ["_.content.g...
Sema4AI_actions
public
public
0
0
main
def main():pass
1
2
0
5
0
10
11
5
[]
None
{}
0
2
0
[]
199
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3518760_makerbot_pyserial.ez_setup_py.main", "_.content.gdriv...
The function (main) defined within the public class called public.The function start at line 10 and ends at 11. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 199.0 functions calling this function which are ["_.content...
Sema4AI_actions
public
public
0
0
entry
def entry():print("in entry")
1
2
0
8
0
5
6
5
[]
None
{"Expr": 1}
1
2
1
["print"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70315194_timdettmers_bitsandbytes.bitsandbytes.__init___py._import_backends"]
The function (entry) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which is...
Sema4AI_actions
public
public
0
0
some_sub_method
def some_sub_method():print("In some sub method")
1
2
0
8
0
4
5
4
[]
None
{"Expr": 1}
1
2
1
["print"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_collect_tasks.sub.sub_action_py.sub"]
The function (some_sub_method) defined within the public class called public.The function start at line 4 and ends at 5. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called insid...
Sema4AI_actions
public
public
0
0
sub
def sub():some_sub_method()
1
2
0
7
0
9
10
9
[]
None
{"Expr": 1}
1
2
1
["some_sub_method"]
32
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.s3.s3_path_py.S3Path.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.s3.s3_path_py.S3Path.append", "_.content.gdrive.MyDrive.Phd_Thesis....
The function (sub) defined within the public class called public.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside which is ...
Sema4AI_actions
public
public
0
0
something
def something():print("worked")
1
2
0
8
0
7
8
7
[]
None
{"Expr": 1}
1
2
1
["print"]
0
[]
The function (something) defined within the public class called public.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called inside...
Sema4AI_actions
public
public
0
0
task_on_my_task
def task_on_my_task():pass
1
2
0
5
0
5
6
5
[]
None
{}
0
2
0
[]
0
[]
The function (task_on_my_task) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
task_on_my_module
def task_on_my_module():pass
1
2
0
5
0
5
6
5
[]
None
{}
0
2
0
[]
0
[]
The function (task_on_my_module) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
task_on_another_module
def task_on_another_module():pass
1
2
0
5
0
5
6
5
[]
None
{}
0
2
0
[]
0
[]
The function (task_on_another_module) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
main_task
def main_task():from tempfile import gettempdiros.chdir(gettempdir())
1
3
0
16
0
7
10
7
[]
None
{"Expr": 1}
2
4
2
["os.chdir", "gettempdir"]
0
[]
The function (main_task) defined within the public class called public.The function start at line 7 and ends at 10. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called in...
Sema4AI_actions
public
public
0
0
make_error
def make_error():raise RuntimeError("something bad happened")
1
2
0
9
0
5
6
5
[]
None
{}
1
2
1
["RuntimeError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11907713_pydrocsid_morpheushelper.bot.bot_py.on_command_error"]
The function (make_error) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside whi...
Sema4AI_actions
public
public
0
0
another_method_at_line_5
def another_method_at_line_5(a):pass
1
2
1
6
0
6
7
6
a
[]
None
{}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_core_log_integration.main_check_lines_py.entry_at_line_10"]
The function (another_method_at_line_5) defined within the public class called public.The function start at line 6 and ends at 7. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 1.0 function calling this function which ...
Sema4AI_actions
public
public
0
0
entry_at_line_10
def entry_at_line_10():log.debug("debug at line 11")a = "at line 12"log.info("info at line 13")another_method_at_line_5(a)v = "at_16"if v > "at_17":passfor c in "at_line20":pass
3
10
0
38
2
11
22
11
['v', 'a']
None
{"Assign": 2, "Expr": 3, "For": 1, "If": 1}
3
12
3
["log.debug", "log.info", "another_method_at_line_5"]
0
[]
The function (entry_at_line_10) defined within the public class called public.The function start at line 11 and ends at 22. It contains 10 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions ...
Sema4AI_actions
public
public
0
0
check_difflib_log
def check_difflib_log():diff = difflib.ndiff("aaaa bbb ccc ddd".split(), "aaaa bbb eee ddd".split())print("".join(diff))
1
3
0
31
1
7
9
7
['diff']
None
{"Assign": 1, "Expr": 1}
5
3
5
["difflib.ndiff", "split", "split", "print", "join"]
0
[]
The function (check_difflib_log) defined within the public class called public.The function start at line 7 and ends at 9. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions ca...
Sema4AI_actions
public
public
0
0
my_task
def my_task() -> str:return "my_task_ran"
1
2
0
8
0
5
6
5
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (my_task) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
on_setup
def on_setup(task):print("Setup: my_config 1")
1
2
1
9
0
7
8
7
task
[]
None
{"Expr": 1}
1
2
1
["print"]
0
[]
The function (on_setup) defined within the public class called public.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called inside ...
Sema4AI_actions
public
public
0
0
on_setup_session
def on_setup_session(tasks):assert len(tasks) == 1print("Setup session: my_config 1")
1
3
1
16
0
12
14
12
tasks
[]
None
{"Expr": 1}
3
3
3
["len", "print", "setup"]
0
[]
The function (on_setup_session) defined within the public class called public.The function start at line 12 and ends at 14. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions c...
Sema4AI_actions
public
public
0
0
new_obj
def new_obj():return next(_counter)
1
2
0
9
0
9
10
9
[]
Returns
{"Return": 1}
1
2
1
["next"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_lifecycle.actions_py.task1", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_lifecycle.acti...
The function (new_obj) defined within the public class called public.The function start at line 9 and ends at 10. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called inside w...
Sema4AI_actions
public
public
0
0
task1
def task1():assert new_obj() == 0assert new_obj() == 0
1
3
0
16
0
14
16
14
[]
None
{}
2
3
2
["new_obj", "new_obj"]
0
[]
The function (task1) defined within the public class called public.The function start at line 14 and ends at 16. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called insid...
Sema4AI_actions
public
public
0
0
task2
def task2():assert new_obj() == 1assert new_obj() == 1
1
3
0
16
0
20
22
20
[]
None
{}
2
3
2
["new_obj", "new_obj"]
0
[]
The function (task2) defined within the public class called public.The function start at line 20 and ends at 22. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called insid...
Sema4AI_actions
public
public
0
0
my_task_setup
def my_task_setup(task: IAction):global task_setuptask_setup += 1print("task setup", task_setup)
1
4
1
18
0
15
18
15
task
[]
None
{"AugAssign": 1, "Expr": 1}
1
4
1
["print"]
0
[]
The function (my_task_setup) defined within the public class called public.The function start at line 15 and ends at 18. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called ...
Sema4AI_actions
public
public
0
0
my_session_setup
def my_session_setup(actions: Sequence[IAction]):global session_setupsession_setup += 1print("session setup", session_setup)
1
4
1
21
0
22
25
22
actions
[]
None
{"AugAssign": 1, "Expr": 1}
2
4
2
["print", "setup"]
0
[]
The function (my_session_setup) defined within the public class called public.The function start at line 22 and ends at 25. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions c...
Sema4AI_actions
public
public
0
0
my_task_teardown
def my_task_teardown(task: IAction):global task_teardowntask_teardown += 1print("task teardown", task_teardown)
1
4
1
18
0
29
32
29
task
[]
None
{"AugAssign": 1, "Expr": 1}
1
4
1
["print"]
0
[]
The function (my_task_teardown) defined within the public class called public.The function start at line 29 and ends at 32. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function call...
Sema4AI_actions
public
public
0
0
my_session_teardown
def my_session_teardown(actions: Sequence[IAction]):global session_teardownsession_teardown += 1print("session teardown", session_setup)
1
4
1
21
0
36
39
36
actions
[]
None
{"AugAssign": 1, "Expr": 1}
2
4
2
["print", "teardown"]
0
[]
The function (my_session_teardown) defined within the public class called public.The function start at line 36 and ends at 39. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 function...
Sema4AI_actions
public
public
0
0
reuse_task
def reuse_task():global task_executedtask_executed += 1print("task executed", task_executed)
1
4
0
15
0
43
46
43
[]
None
{"AugAssign": 1, "Expr": 1}
1
4
1
["print"]
0
[]
The function (reuse_task) defined within the public class called public.The function start at line 43 and ends at 46. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called ins...
Sema4AI_actions
public
public
0
0
return_tuple
def return_tuple(a: str, b: int, c: str = "") -> Tuple[str, int]:assert isinstance(a, str)assert isinstance(b, int)return a, b
1
4
3
42
0
9
12
9
a,b,c
[]
Tuple[str, int]
{"Return": 1}
2
4
2
["isinstance", "isinstance"]
0
[]
The function (return_tuple) defined within the public class called public.The function start at line 9 and ends at 12. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [9.0] and does not return any value. It declares 2.0 functions, and It has 2.0 functions call...
Sema4AI_actions
public
public
0
0
something_else
def something_else(f: list) -> None:# We can't actually handle this at this point...assert isinstance(f, list)
1
2
1
16
0
16
18
16
f
[]
None
{}
1
3
1
["isinstance"]
0
[]
The function (something_else) defined within the public class called public.The function start at line 16 and ends at 18. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called...
Sema4AI_actions
public
public
0
0
bool_true
def bool_true(b: bool) -> None:assert isinstance(b, bool)assert b
1
3
1
18
0
22
24
22
b
[]
None
{}
1
3
1
["isinstance"]
0
[]
The function (bool_true) defined within the public class called public.The function start at line 22 and ends at 24. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called insi...
Sema4AI_actions
public
public
0
0
bool_false
def bool_false(b: bool) -> None:assert isinstance(b, bool)assert not b
1
3
1
19
0
28
30
28
b
[]
None
{}
1
3
1
["isinstance"]
0
[]
The function (bool_false) defined within the public class called public.The function start at line 28 and ends at 30. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called ins...
Sema4AI_actions
public
public
0
0
accept_str
def accept_str(s) -> None:assert isinstance(s, str)
1
2
1
14
0
34
35
34
s
[]
None
{}
1
2
1
["isinstance"]
0
[]
The function (accept_str) defined within the public class called public.The function start at line 34 and ends at 35. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called ins...
Sema4AI_actions
public
public
0
0
unicode_ação_Σ
def unicode_ação_Σ(ação: str) -> None:assert isinstance(ação, str)
1
2
1
16
0
39
40
39
ação
[]
None
{}
1
2
1
["isinstance"]
0
[]
The function (unicode_ação_Σ) defined within the public class called public.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called...
Sema4AI_actions
public
public
0
0
custom_data
def custom_data(data: MyCustomData) -> None:assert isinstance(data, MyCustomData)
1
2
1
16
0
50
51
50
data
[]
None
{}
1
2
1
["isinstance"]
0
[]
The function (custom_data) defined within the public class called public.The function start at line 50 and ends at 51. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called in...
Sema4AI_actions
public
public
0
0
make_pass
def make_pass(task):task.status = "PASS"
1
2
1
10
0
5
6
5
task
[]
None
{"Assign": 1}
0
2
0
[]
0
[]
The function (make_pass) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
raises_error
def raises_error():raise RuntimeError("Something went wrong")
1
2
0
9
0
10
11
10
[]
None
{}
1
2
1
["RuntimeError"]
0
[]
The function (raises_error) defined within the public class called public.The function start at line 10 and ends at 11. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called i...
Sema4AI_actions
public
public
0
0
division_error
def division_error():_ = 1 / 0
1
2
0
9
1
15
16
15
['_']
None
{"Assign": 1}
0
2
0
[]
0
[]
The function (division_error) defined within the public class called public.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
some_resource
def some_resource():yield "resource"while True:time.sleep(1)
2
4
0
15
0
7
10
7
[]
None
{"Expr": 2, "While": 1}
1
4
1
["time.sleep"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.tests.actions_core_tests.test_teardown.neverending.actions_py.neverending"]
The function (some_resource) defined within the public class called public.The function start at line 7 and ends at 10. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside...
Sema4AI_actions
public
public
0
0
neverending
def neverending():some_resource()
1
2
0
7
0
14
15
14
[]
None
{"Expr": 1}
1
2
1
["some_resource"]
0
[]
The function (neverending) defined within the public class called public.The function start at line 14 and ends at 15. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called in...
Sema4AI_actions
_AgentDummyServer
protected
0
1
__init__
def __init__(self, request, client_address, server):self._server = server._server_instancesuper().__init__(request, client_address, server)
1
3
4
30
0
9
11
9
self,request,client_address,server
[]
None
{"Assign": 1, "Expr": 1}
2
3
2
["__init__", "super"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _AgentDummyServer, that inherit another class.The function start at line 9 and ends at 11. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [9.0] and does not return any value. It declares 2.0 fun...
Sema4AI_actions
_AgentDummyServer
protected
0
1
_send_response
def _send_response(self, status_code=200, headers=None, body=None):self.send_response(status_code)if headers:for key, value in headers.items():self.send_header(key, value)self.end_headers()if body:if isinstance(body, str):self.wfile.write(body.encode("utf-8"))else:self.wfile.write(json.dumps(body).encode("utf-8"))
5
11
4
94
0
13
23
13
self,status_code,headers,body
[]
None
{"Expr": 5, "For": 1, "If": 3}
10
11
10
["self.send_response", "headers.items", "self.send_header", "self.end_headers", "isinstance", "self.wfile.write", "body.encode", "self.wfile.write", "encode", "json.dumps"]
0
[]
The function (_send_response) defined within the protected class called _AgentDummyServer, that inherit another class.The function start at line 13 and ends at 23. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [13.0] and does not return any value. It declare...
Sema4AI_actions
_AgentDummyServer
protected
0
1
do_GET
def do_GET(self):parsed_path = urllib.parse.urlparse(self.path)path_parts = parsed_path.path.split("/")[1:]# Handle /api/v2/ok endpoint for URL accessibility checkif (len(path_parts) == 3and path_parts[0] == "api"and path_parts[1] == "v2"and path_parts[2] == "ok"):self._send_response(200,headers={"Content-Type": "appli...
5
22
1
112
0
25
48
25
self
[]
None
{"Assign": 2, "Expr": 2, "If": 1, "Return": 2}
5
24
5
["urllib.parse.urlparse", "parsed_path.path.split", "len", "self._send_response", "self._send_response"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70056145_scikit_hep_uproot5.tests.conftest_py.serve_http"]
The function (do_GET) defined within the protected class called _AgentDummyServer, that inherit another class.The function start at line 25 and ends at 48. It contains 22 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 5.0 funct...
Sema4AI_actions
_AgentDummyServer
protected
0
1
do_POST
def do_POST(self):parsed_path = urllib.parse.urlparse(self.path)path_parts = parsed_path.path.split("/")[1:]content_length = int(self.headers.get("Content-Length", 0))post_data = self.rfile.read(content_length)try:request_body = json.loads(post_data)except json.JSONDecodeError:self._send_response(400,headers={"Content-...
7
60
1
309
0
50
119
50
self
[]
None
{"Assign": 10, "Expr": 3, "If": 1, "Return": 3, "Try": 1}
13
70
13
["urllib.parse.urlparse", "parsed_path.path.split", "int", "self.headers.get", "self.rfile.read", "json.loads", "self._send_response", "len", "urllib.parse.parse_qs", "query_params.get", "query_params.get", "self._send_response", "self._send_response"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3968497_etesync_etesync_dav.etesync_dav.radicale_main.server_py.MyApplication.do_POST"]
The function (do_POST) defined within the protected class called _AgentDummyServer, that inherit another class.The function start at line 50 and ends at 119. It contains 60 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value. It declares 13.0 fu...
Sema4AI_actions
_AgentDummyServer
protected
0
1
__init__
def __init__(self):self.server = Noneself.thread = Noneself.port = Noneself.last_request = None
1
5
1
25
0
123
127
123
self,request,client_address,server
[]
None
{"Assign": 1, "Expr": 1}
2
3
2
["__init__", "super"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _AgentDummyServer, that inherit another class.The function start at line 123 and ends at 127. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 fu...
Sema4AI_actions
AgentDummyServer
public
0
0
_start_in_thread
def _start_in_thread(self):# Use port 0 to let the OS assign a free port (like files_dummy_server.py)self.server = HTTPServer(("localhost", 0), _AgentDummyServer)self.server._server_instance = self# Store reference to selfself.port = self.server.server_portself.server.serve_forever()
1
5
1
42
0
129
135
129
self
[]
None
{"Assign": 3, "Expr": 1}
2
7
2
["HTTPServer", "self.server.serve_forever"]
0
[]
The function (_start_in_thread) defined within the public class called AgentDummyServer.The function start at line 129 and ends at 135. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0...
Sema4AI_actions
AgentDummyServer
public
0
0
start
def start(self):self.thread = Thread(target=self._start_in_thread, daemon=True)self.thread.start()# Give the server a moment to starttime.sleep(0.1)
1
4
1
36
0
137
141
137
self
[]
None
{"Assign": 1, "Expr": 2}
3
5
3
["Thread", "self.thread.start", "time.sleep"]
136
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_py.BusMethodTests.test_block", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_...
The function (start) defined within the public class called AgentDummyServer.The function start at line 137 and ends at 141. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions calle...
Sema4AI_actions
AgentDummyServer
public
0
0
get_port
def get_port(self):return self.port
1
2
1
9
0
143
144
143
self
[]
Returns
{"Return": 1}
0
2
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964855_tarantool_tarantool_python.test.suites.test_pool_py.TestSuitePool.test_01_roundrobin", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95307688_dbfixtures_pytest_mysql.pytest_mysql.factories.process_py.mysql_p...
The function (get_port) defined within the public class called AgentDummyServer.The function start at line 143 and ends at 144. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 2.0 functions calling this function whi...
Sema4AI_actions
AgentDummyServer
public
0
0
stop
def stop(self):if self.server:self.server.shutdown()self.server.server_close()if self.thread:self.thread.join(timeout=1)
3
6
1
39
0
146
151
146
self
[]
None
{"Expr": 3, "If": 2}
3
6
3
["self.server.shutdown", "self.server.server_close", "self.thread.join"]
35
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.evok_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.reactor_py.get_exitcode_reactor", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp...
The function (stop) defined within the public class called AgentDummyServer.The function start at line 146 and ends at 151. It contains 6 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called...
Sema4AI_actions
_SimpleFileServer
protected
0
1
__init__
def __init__(self, files_path: Path, server: "FilesDummyServer", *args, **kwargs):self.files_path = files_pathself.files_path.mkdir(parents=True, exist_ok=True)self._server = serversuper().__init__(*args, **kwargs)
1
5
5
55
0
8
12
8
self,files_path,server,*args,**kwargs
[]
None
{"Assign": 2, "Expr": 2}
3
5
3
["self.files_path.mkdir", "__init__", "super"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _SimpleFileServer, that inherit another class.The function start at line 8 and ends at 12. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [8.0] and does not return any value. It declares 3.0 fun...
Sema4AI_actions
_SimpleFileServer
protected
0
1
_send_response
def _send_response(self, status_code=200, headers=None, body=None):self.send_response(status_code)if headers:for key, value in headers.items():self.send_header(key, value)self.end_headers()if body:self.wfile.write(body.encode("utf-8"))
4
8
4
66
0
14
21
14
self,status_code,headers,body
[]
None
{"Expr": 4, "For": 1, "If": 2}
6
8
6
["self.send_response", "headers.items", "self.send_header", "self.end_headers", "self.wfile.write", "body.encode"]
0
[]
The function (_send_response) defined within the protected class called _SimpleFileServer, that inherit another class.The function start at line 14 and ends at 21. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [14.0] and does not return any value. It declares...
Sema4AI_actions
_SimpleFileServer
protected
0
1
_check_action_invocation_context_header
def _check_action_invocation_context_header(self):return "x-action-invocation-context" in self.headers
1
2
1
11
0
23
24
23
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (_check_action_invocation_context_header) defined within the protected class called _SimpleFileServer, that inherit another class.The function start at line 23 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function r...
Sema4AI_actions
_SimpleFileServer
protected
0
1
do_GET
def do_GET(self):from urllib.parse import parse_qsparsed_path = urllib.parse.urlparse(self.path)path_parts = parsed_path.path.split("/")[1:]# /threads/:threadId/file-by-ref?file_ref=fileRefif (len(path_parts) == 3and path_parts[0] == "threads"and path_parts[2] == "file-by-ref"):file_ref = parse_qs(parsed_path.query).ge...
9
56
1
303
0
26
89
26
self
[]
None
{"Assign": 7, "Expr": 6, "If": 5, "Return": 4}
20
64
20
["urllib.parse.urlparse", "parsed_path.path.split", "len", "get", "parse_qs", "self._send_response", "json.dumps", "self._check_action_invocation_context_header", "self._send_response", "json.dumps", "json.dumps", "file_path.as_uri", "self._send_response", "self._server.get_port", "json.dumps", "self._send_response", "...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70056145_scikit_hep_uproot5.tests.conftest_py.serve_http"]
The function (do_GET) defined within the protected class called _SimpleFileServer, that inherit another class.The function start at line 26 and ends at 89. It contains 56 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value. It declares 20.0 func...
Sema4AI_actions
_SimpleFileServer
protected
0
1
do_POST
def do_POST(self):import sema4ai_httpparsed_path = urllib.parse.urlparse(self.path)path_parts = parsed_path.path.split("/")[1:]content_length = int(self.headers.get("Content-Length", 0))content_type = self.headers.get("Content-Type")post_data = self.rfile.read(content_length)if (post_dataand content_typenot in ["applic...
29
168
1
796
0
91
272
91
self
[]
None
{"Assign": 27, "AugAssign": 1, "Expr": 13, "If": 14, "Return": 9, "Try": 1}
50
182
50
["urllib.parse.urlparse", "parsed_path.path.split", "int", "self.headers.get", "self.headers.get", "self.rfile.read", "content_type.startswith", "json.loads", "self._send_response", "json.dumps", "len", "content_type.startswith", "self._send_response", "self._check_action_invocation_context_header", "self._send_respons...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3968497_etesync_etesync_dav.etesync_dav.radicale_main.server_py.MyApplication.do_POST"]
The function (do_POST) defined within the protected class called _SimpleFileServer, that inherit another class.The function start at line 91 and ends at 272. It contains 168 lines of code and it has a cyclomatic complexity of 29. The function does not take any parameters and does not return any value. It declares 50.0 ...
Sema4AI_actions
_SimpleFileServer
protected
0
1
__init__
def __init__(self, files_path: Path):self.files_path = files_pathself.write_to_local = True
1
3
2
19
0
276
278
276
self,files_path,server,*args,**kwargs
[]
None
{"Assign": 2, "Expr": 2}
3
5
3
["self.files_path.mkdir", "__init__", "super"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _SimpleFileServer, that inherit another class.The function start at line 276 and ends at 278. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [276.0] and does not return any value. It declares 3....
Sema4AI_actions
FilesDummyServer
public
0
0
_start_in_thread
def _start_in_thread(self, files_path: Path):import threadingport = 0server_address = ("", port)httpd = HTTPServer(server_address,lambda *args, **kwargs: _SimpleFileServer(files_path, self, *args, **kwargs),)print(f"Starting server on port `{httpd.server_port}`")thread = threading.Thread(target=httpd.serve_forever)thre...
1
14
2
72
0
280
294
280
self,files_path
[]
Returns
{"Assign": 4, "Expr": 2, "Return": 1}
5
15
5
["HTTPServer", "_SimpleFileServer", "print", "threading.Thread", "thread.start"]
0
[]
The function (_start_in_thread) defined within the public class called FilesDummyServer.The function start at line 280 and ends at 294. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [280.0], and this function return a value. It declares 5.0 functions, and I...
Sema4AI_actions
FilesDummyServer
public
0
0
start
def start(self):self.httpd = self._start_in_thread(self.files_path)
1
2
1
17
0
296
297
296
self
[]
None
{"Assign": 1}
1
2
1
["self._start_in_thread"]
136
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_py.BusMethodTests.test_block", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_...
The function (start) defined within the public class called FilesDummyServer.The function start at line 296 and ends at 297. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called i...
Sema4AI_actions
FilesDummyServer
public
0
0
get_port
def get_port(self):return self.httpd.server_port
1
2
1
11
0
299
300
299
self
[]
Returns
{"Return": 1}
0
2
0
[]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964855_tarantool_tarantool_python.test.suites.test_pool_py.TestSuitePool.test_01_roundrobin", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95307688_dbfixtures_pytest_mysql.pytest_mysql.factories.process_py.mysql_p...
The function (get_port) defined within the public class called FilesDummyServer.The function start at line 299 and ends at 300. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 2.0 functions calling this function whi...
Sema4AI_actions
FilesDummyServer
public
0
0
stop
def stop(self):self.httpd.shutdown()
1
2
1
12
0
302
303
302
self
[]
None
{"Expr": 1}
1
2
1
["self.httpd.shutdown"]
35
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.evok_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.reactor_py.get_exitcode_reactor", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp...
The function (stop) defined within the public class called FilesDummyServer.The function start at line 302 and ends at 303. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called in...
Sema4AI_actions
FilesDummyServer
public
0
0
set_write_to_local
def set_write_to_local(self, write_to_local: bool):self.write_to_local = write_to_local
1
2
2
14
0
305
306
305
self,write_to_local
[]
None
{"Assign": 1}
0
2
0
[]
0
[]
The function (set_write_to_local) defined within the public class called FilesDummyServer.The function start at line 305 and ends at 306. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [305.0] and does not return any value..
Sema4AI_actions
public
public
0
0
encrypt
def encrypt(key: bytes, plaintext: bytes) -> tuple[bytes, bytes, bytes]:from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes# Generate a random 96-bit IV.iv = os.urandom(12)if USE_STATIC_INFO:iv = b"b" * len(iv)# Construct an AES-GCM Cipher object with the given key and a# randomly generated IV....
2
11
2
101
3
7
26
7
key,plaintext
['encryptor', 'ciphertext', 'iv']
tuple[bytes, bytes, bytes]
{"Assign": 4, "If": 1, "Return": 1}
8
20
8
["os.urandom", "len", "encryptor", "Cipher", "algorithms.AES", "modes.GCM", "encryptor.update", "encryptor.finalize"]
48
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.lib.httpauth_py._checkBasicResponse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3689772_zalando_stups_senza.senza.templates.postgresapp_py.gather_user_varia...
The function (encrypt) defined within the public class called public.The function start at line 7 and ends at 26. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [7.0] and does not return any value. It declares 8.0 functions, It has 8.0 functions called inside...
Sema4AI_actions
public
public
0
0
test_secrets_encryption_raw
def test_secrets_encryption_raw() -> None:from cryptography.hazmat.primitives.ciphers.aead import AESGCMfrom sema4ai.actions._action_context import _decrypt# Example usagekey = AESGCM.generate_key(256)plaintext = b"Your secret message"iv, ciphertext, tag = encrypt(key, plaintext)assert _decrypt(key, iv, ciphertext, tag...
1
7
0
63
2
29
39
29
['plaintext', 'key']
None
{"Assign": 3}
3
11
3
["AESGCM.generate_key", "encrypt", "_decrypt"]
0
[]
The function (test_secrets_encryption_raw) defined within the public class called public.The function start at line 29 and ends at 39. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 ...
Sema4AI_actions
public
public
0
0
test_action_context_predefined
def test_action_context_predefined() -> None:import base64import jsonfrom sema4ai.actions._action_context import _decryptencoded_payload = "eyJhbGdvcml0aG0iOiJhZXMyNTYtZ2NtIiwiYXV0aC10YWciOiJEN09qRkZYUVVMd2JndE9WRmtvWmx3PT0iLCJjaXBoZXIiOiJVdFBIajFEMExMME5BQVpLaEdGQnZKQ2dvL1lCeUM4a3Z4QmwwY2pZbE1ubzArLytyR2VjNlJGdE9rOUtq...
1
14
0
116
6
42
60
42
['decrypted', 'secret_payload', 'key', 'payload', 'encoded_payload', 'encoded_key']
None
{"AnnAssign": 3, "Assign": 6}
8
19
8
["json.loads", "base64.b64decode", "base64.b64decode", "base64.b64decode", "base64.b64decode", "base64.b64decode", "_decrypt", "json.loads"]
0
[]
The function (test_action_context_predefined) defined within the public class called public.The function start at line 42 and ends at 60. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has ...
Sema4AI_actions
public
public
0
0
test_action_context
def test_action_context() -> None:import base64import jsonfrom cryptography.hazmat.primitives.ciphers.aead import AESGCMfrom sema4ai.actions._action_context import ActionContext, _decryptkeys = [AESGCM.generate_key(256), AESGCM.generate_key(256)]if USE_STATIC_INFO:keys = [b"a" * len(keys[0]) for k in keys]env = dict(AC...
4
30
0
264
4
63
102
63
['env', 'ctx', 'keys', 'action_server_context']
None
{"AnnAssign": 2, "Assign": 6, "If": 1}
23
40
23
["AESGCM.generate_key", "AESGCM.generate_key", "len", "dict", "json.dumps", "json.dumps", "decode", "base64.b64encode", "encode", "json.dumps", "encrypt", "decode", "base64.b64encode", "decode", "base64.b64encode", "decode", "base64.b64encode", "_decrypt", "decode", "base64.b64encode", "encode", "json.dumps", "ActionCo...
0
[]
The function (test_action_context) defined within the public class called public.The function start at line 63 and ends at 102. It contains 30 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 23.0 functions, and It has 23.0 func...
Sema4AI_actions
public
public
0
0
_fix_file
def _fix_file(entry):entry["file"] = os.path.basename(entry["file"])
1
2
1
21
0
5
6
5
entry
[]
None
{"Assign": 1}
1
2
1
["os.path.basename"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3956520_asottile_reorder_python_imports.reorder_python_imports_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655760_MarcoGorelli_polars_upgrade.polars_upgrade._main_py.main", "_.content.gdrive.MyDrive.Ph...
The function (_fix_file) defined within the public class called public.The function start at line 5 and ends at 6. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside whic...
Sema4AI_actions
public
public
0
0
test_actions_list
def test_actions_list(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)for entry in found:_fix_file(entry)data_regression.check(sorted(found, key=lambda entry: (entry["name"], ...
2
11
2
79
2
9
20
9
datadir,data_regression
['result', 'found']
None
{"Assign": 2, "Expr": 2, "For": 1}
6
12
6
["sema4ai_actions_run", "str", "json.loads", "_fix_file", "data_regression.check", "sorted"]
0
[]
The function (test_actions_list) defined within the public class called public.The function start at line 9 and ends at 20. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [9.0] and does not return any value. It declares 6.0 functions, and It has 6.0 function...
Sema4AI_actions
public
public
0
0
test_actions_run
def test_actions_run(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run","-a","greet","--console-colors=plain","--","--name","NAME","--title","TITLE",],returncode=0,cwd=str(datadir),)output = result.stdout.decode("utf-8")assert "my_cached_session called" in out...
1
24
2
84
2
23
47
23
datadir,data_regression
['result', 'output']
None
{"Assign": 2}
3
25
3
["sema4ai_actions_run", "str", "result.stdout.decode"]
0
[]
The function (test_actions_run) defined within the public class called public.The function start at line 23 and ends at 47. It contains 24 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [23.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functio...
Sema4AI_actions
public
public
0
0
test_actions_table_list
def test_actions_table_list(datadir, data_regression):import jsonfrom devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)assert len(found) == 5data = {}for f in found:data[f["name"]] = {"input_schema": f["inpu...
2
16
2
99
3
1
19
1
datadir,data_regression
['data', 'result', 'found']
None
{"Assign": 4, "Expr": 1, "For": 1}
5
19
5
["sema4ai_actions_run", "str", "json.loads", "len", "data_regression.check"]
0
[]
The function (test_actions_table_list) defined within the public class called public.The function start at line 1 and ends at 19. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1.0] and does not return any value. It declares 5.0 functions, and It has 5.0 fu...
Sema4AI_actions
public
public
0
0
test_table_result
def test_table_result(datadir, data_regression, tmpdir):import jsonfrom devutils.fixtures import sema4ai_actions_runfrom sema4ai.actions import Tabletable = Table(columns=["a", "b"], rows=[[1, "2"], [3, "4"]])use_input = table.model_dump()output_file = tmpdir.join("output.json")input_file = tmpdir.join("input.json")wit...
1
26
3
168
6
22
52
22
datadir,data_regression,tmpdir
['input_file', 'output_file', 'use_input', 'result', 'table', 'data']
None
{"Assign": 6, "Expr": 2, "With": 2}
13
31
13
["Table", "table.model_dump", "tmpdir.join", "tmpdir.join", "open", "json.dump", "sema4ai_actions_run", "str", "result.stdout.decode", "output_file.exists", "open", "json.load", "data_regression.check"]
0
[]
The function (test_table_result) defined within the public class called public.The function start at line 22 and ends at 52. It contains 26 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0] and does not return any value. It declares 13.0 functions, and It has 13.0 func...
Sema4AI_actions
public
public
0
0
test_table_with_response
def test_table_with_response(datadir, data_regression, tmpdir):import jsonfrom devutils.fixtures import sema4ai_actions_runoutput_file = tmpdir.join("output.json")result = sema4ai_actions_run(["run","-a=action_table_response","--print-result",f"--json-output={output_file}",],returncode=0,cwd=str(datadir),)assert "PASS"...
1
19
3
94
3
55
76
55
datadir,data_regression,tmpdir
['result', 'data', 'output_file']
None
{"Assign": 3, "Expr": 1, "With": 1}
8
22
8
["tmpdir.join", "sema4ai_actions_run", "str", "result.stdout.decode", "output_file.exists", "open", "json.load", "data_regression.check"]
0
[]
The function (test_table_with_response) defined within the public class called public.The function start at line 55 and ends at 76. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [55.0] and does not return any value. It declares 8.0 functions, and It has 8.0...
Sema4AI_actions
public
public
0
0
test_table
def test_table(file_regression):import pytestfrom sema4ai.actions import Tabletable = Table(columns=["a", "b"],rows=[["1", "2"],["3", "4"],["5 abc ", 6.66],[{"a": 1}, {"b": 2}],[[10, 11], "4"],],)assert table.columns == ["a", "b"]assert table.rows == [["1", "2"],["3", "4"],["5 abc ", 6.66],[{"a": 1}, {"b": 2}],[[10, 11...
1
40
1
372
1
79
128
79
file_regression
['table']
None
{"Assign": 1, "Expr": 5, "With": 3}
23
50
23
["Table", "table.get_row_as_dict", "table.get_row_as_dict", "table.get_row_as_dict", "table.get_row_as_dict", "file_regression.check", "str", "file_regression.check", "repr", "pytest.raises", "Table", "str", "str", "pytest.raises", "Table", "str", "str", "pytest.raises", "Table", "object", "object", "str", "str"]
0
[]
The function (test_table) defined within the public class called public.The function start at line 79 and ends at 128. It contains 40 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 23.0 functions, and It has 23.0 functions cal...
Sema4AI_actions
public
public
0
0
test_custom_pydantic_type
def test_custom_pydantic_type():from sema4ai.actions._raw_types_handler import _obtain_raw_types_handlerNewClass = _obtain_raw_types_handler("lst", list[int])lst = NewClass.model_validate([1, 2, 3])assert lst == [1, 2, 3]assert NewClass.model_json_schema() == {"items": {"type": "integer"},"title": "Lst","type": "array"...
1
11
0
93
2
131
145
131
['NewClass', 'lst']
None
{"Assign": 2}
4
15
4
["_obtain_raw_types_handler", "NewClass.model_validate", "NewClass.model_json_schema", "NewClass.model_validate"]
0
[]
The function (test_custom_pydantic_type) defined within the public class called public.The function start at line 131 and ends at 145. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0...
Sema4AI_actions
public
public
0
0
test_list_in_input_output
def test_list_in_input_output(datadir, data_regression, tmpdir):import jsonfrom devutils.fixtures import sema4ai_actions_runuse_input = [1, 2, 3]output_file = tmpdir.join("output.json")input_file = tmpdir.join("input.json")with open(input_file, "w") as f:json.dump({"lst": use_input}, f)result = sema4ai_actions_run(["ru...
1
24
3
136
5
148
175
148
datadir,data_regression,tmpdir
['input_file', 'output_file', 'use_input', 'result', 'data']
None
{"Assign": 5, "Expr": 2, "With": 2}
11
28
11
["tmpdir.join", "tmpdir.join", "open", "json.dump", "sema4ai_actions_run", "str", "result.stdout.decode", "output_file.exists", "open", "json.load", "data_regression.check"]
0
[]
The function (test_list_in_input_output) defined within the public class called public.The function start at line 148 and ends at 175. It contains 24 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [148.0] and does not return any value. It declares 11.0 functions, and It ha...
Sema4AI_actions
public
public
0
0
test_list_with_response
def test_list_with_response(datadir, data_regression, tmpdir):import jsonfrom devutils.fixtures import sema4ai_actions_runoutput_file = tmpdir.join("output.json")result = sema4ai_actions_run(["run","-a=action_python_structure_response","--print-result",f"--json-output={output_file}",],returncode=0,cwd=str(datadir),)ass...
1
19
3
94
3
178
199
178
datadir,data_regression,tmpdir
['result', 'data', 'output_file']
None
{"Assign": 3, "Expr": 1, "With": 1}
8
22
8
["tmpdir.join", "sema4ai_actions_run", "str", "result.stdout.decode", "output_file.exists", "open", "json.load", "data_regression.check"]
0
[]
The function (test_list_with_response) defined within the public class called public.The function start at line 178 and ends at 199. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [178.0] and does not return any value. It declares 8.0 functions, and It has 8...
Sema4AI_actions
public
public
0
0
test_actions_oauth2_secret_run_with_request
def test_actions_oauth2_secret_run_with_request(datadir: Path):import base64import jsonfrom devutils.fixtures import sema4ai_actions_rundatadir = datadir / "good"# Specifies the request in the json input.json_output = datadir / "json.output"secret_data = {"provider": "google","scopes": ["https://www.googleapis.com/auth...
1
35
1
160
6
4
45
4
datadir
['args', 'json_output', 'input_json', 'secret_data', 'datadir', 'json_input_contents']
None
{"Assign": 6, "Expr": 2}
10
42
10
["decode", "base64.b64encode", "encode", "json.dumps", "input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json.loads", "json_output.read_text"]
0
[]
The function (test_actions_oauth2_secret_run_with_request) defined within the public class called public.The function start at line 4 and ends at 45. It contains 35 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions,...
Sema4AI_actions
public
public
0
0
test_actions_oauth2_secret_run_with_input
def test_actions_oauth2_secret_run_with_input(datadir: Path):import jsonfrom devutils.fixtures import sema4ai_actions_rundatadir = datadir / "good"# Specifies the request in the json input.json_output = datadir / "json.output"secret_data = {"provider": "google","scopes": ["https://www.googleapis.com/auth/drive.file"],"...
1
23
1
121
6
48
77
48
datadir
['args', 'json_output', 'input_json', 'secret_data', 'datadir', 'json_input_contents']
None
{"Assign": 6, "Expr": 2}
6
30
6
["input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json.loads", "json_output.read_text"]
0
[]
The function (test_actions_oauth2_secret_run_with_input) defined within the public class called public.The function start at line 48 and ends at 77. It contains 23 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, a...
Sema4AI_actions
public
public
0
0
test_actions_oauth2_secret_run_with_input_not_full
def test_actions_oauth2_secret_run_with_input_not_full(datadir: Path):import jsonfrom devutils.fixtures import sema4ai_actions_rundatadir = datadir / "good"# Specifies the request in the json input.json_output = datadir / "json.output"# Just the access_token should be enoughsecret_data = {"access_token": "this-is-the-a...
1
25
1
121
6
80
112
80
datadir
['args', 'json_output', 'input_json', 'secret_data', 'datadir', 'json_input_contents']
None
{"Assign": 6, "Expr": 2}
6
33
6
["input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json.loads", "json_output.read_text"]
0
[]
The function (test_actions_oauth2_secret_run_with_input_not_full) defined within the public class called public.The function start at line 80 and ends at 112. It contains 25 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 fu...
Sema4AI_actions
public
public
0
0
test_actions_oauth2_secret_list
def test_actions_oauth2_secret_list(datadir, data_regression):import jsonfrom devutils.fixtures import sema4ai_actions_rundatadir = datadir / "good"result = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)assert len(found) == 1# # Note: the secret does not ap...
2
17
2
104
4
115
136
115
datadir,data_regression
['data', 'result', 'found', 'datadir']
None
{"Assign": 5, "Expr": 1, "For": 1}
5
22
5
["sema4ai_actions_run", "str", "json.loads", "len", "data_regression.check"]
0
[]
The function (test_actions_oauth2_secret_list) defined within the public class called public.The function start at line 115 and ends at 136. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [115.0] and does not return any value. It declares 5.0 functions, and ...
Sema4AI_actions
public
public
0
0
test_actions_oauth2_secret_list_bad
def test_actions_oauth2_secret_list_bad(datadir):from devutils.fixtures import sema4ai_actions_rundatadir = datadir / "bad"result = sema4ai_actions_run(["list", "--skip-lint"], returncode=1, cwd=str(datadir))assert "Invalid OAuth2Secret annotation found." in result.stderr.decode("utf-8")
1
7
1
48
2
139
147
139
datadir
['result', 'datadir']
None
{"Assign": 2}
3
9
3
["sema4ai_actions_run", "str", "result.stderr.decode"]
0
[]
The function (test_actions_oauth2_secret_list_bad) defined within the public class called public.The function start at line 139 and ends at 147. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and I...
Sema4AI_actions
public
public
0
0
test_pydantic_models
def test_pydantic_models(datadir):"""Test that pydantic can be used properly wherever needed."""import jsonfrom devutils.fixtures import sema4ai_actions_run# Specifies the request in the json input.json_input_contents = {}input_json = datadir / "json.input"input_json.write_text(json.dumps(json_input_contents))output_js...
1
26
1
137
7
1
36
1
datadir
['args', 'output', 'input_json', 'output_json', 'loaded', 'result', 'json_input_contents']
None
{"Assign": 7, "Expr": 2}
7
36
7
["input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "result.stdout.decode", "json.loads", "output_json.read_text"]
0
[]
The function (test_pydantic_models) defined within the public class called public.The function start at line 1 and ends at 36. It contains 26 lines of code and it has a cyclomatic complexity of 1. It take 1 parameter, represented as [1.0] and does not return any value. It declares 7.0 functions, and It has 7.0 functio...
Sema4AI_actions
public
public
0
0
_fix_file
def _fix_file(entry):import os.pathentry["file"] = os.path.basename(entry["file"])
1
3
1
25
0
39
42
39
entry
[]
None
{"Assign": 1}
1
4
1
["os.path.basename"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3956520_asottile_reorder_python_imports.reorder_python_imports_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94655760_MarcoGorelli_polars_upgrade.polars_upgrade._main_py.main", "_.content.gdrive.MyDrive.Ph...
The function (_fix_file) defined within the public class called public.The function start at line 39 and ends at 42. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside wh...
Sema4AI_actions
public
public
0
0
test_pydantic_models_list
def test_pydantic_models_list(datadir, data_regression):import jsonfrom devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)for entry in found:_fix_file(entry)data_regression.check(sorted(found, key=lambda entr...
2
12
2
81
2
45
58
45
datadir,data_regression
['result', 'found']
None
{"Assign": 2, "Expr": 2, "For": 1}
6
14
6
["sema4ai_actions_run", "str", "json.loads", "_fix_file", "data_regression.check", "sorted"]
0
[]
The function (test_pydantic_models_list) defined within the public class called public.The function start at line 45 and ends at 58. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [45.0] and does not return any value. It declares 6.0 functions, and It has 6....
Sema4AI_actions
public
public
0
0
test_actions_request_list
def test_actions_request_list(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)assert len(found) == 1# Note: the request does not appear in the schema!data_regression.check(fou...
1
8
2
63
2
5
14
5
datadir,data_regression
['result', 'found']
None
{"Assign": 2, "Expr": 1}
5
10
5
["sema4ai_actions_run", "str", "json.loads", "len", "data_regression.check"]
0
[]
The function (test_actions_request_list) defined within the public class called public.The function start at line 5 and ends at 14. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0] and does not return any value. It declares 5.0 functions, and It has 5.0 f...
Sema4AI_actions
public
public
0
0
test_actions_request_run
def test_actions_request_run(datadir: Path):from devutils.fixtures import sema4ai_actions_run# Specifies the request in the json input.json_output = datadir / "json.output"json_input_contents = {"custom_cls": {"filename": str(json_output), "price": 100},"request": {"headers": {"x-custom-header": "value-in-header"}},}in...
1
25
1
135
6
17
46
17
datadir
['args', 'output', 'json_output', 'input_json', 'result', 'json_input_contents']
None
{"Assign": 6, "Expr": 1}
7
30
7
["str", "input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json_output.read_text", "result.stdout.decode"]
0
[]
The function (test_actions_request_run) defined within the public class called public.The function start at line 17 and ends at 46. It contains 25 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 fu...
Sema4AI_actions
public
public
0
0
test_actions_response_list
def test_actions_response_list(datadir, data_regression):import jsonfrom devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)# print(json.dumps(found, indent=4))assert len(found) == 5data = {}for f in found:dat...
2
16
2
99
3
1
20
1
datadir,data_regression
['data', 'result', 'found']
None
{"Assign": 4, "Expr": 1, "For": 1}
5
20
5
["sema4ai_actions_run", "str", "json.loads", "len", "data_regression.check"]
0
[]
The function (test_actions_response_list) defined within the public class called public.The function start at line 1 and ends at 20. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1.0] and does not return any value. It declares 5.0 functions, and It has 5.0...
Sema4AI_actions
public
public
0
0
test_actions_return_response_ok_action
def test_actions_return_response_ok_action(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run", "-a=return_response_ok_action", "--print-result"],returncode=0,cwd=str(datadir),)assert "PASS" in result.stdout.decode("utf-8")
1
8
2
48
1
23
31
23
datadir,data_regression
['result']
None
{"Assign": 1}
3
9
3
["sema4ai_actions_run", "str", "result.stdout.decode"]
0
[]
The function (test_actions_return_response_ok_action) defined within the public class called public.The function start at line 23 and ends at 31. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [23.0] and does not return any value. It declares 3.0 functions, an...
Sema4AI_actions
public
public
0
0
test_actions_return_response_error_action
def test_actions_return_response_error_action(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run", "-a=return_response_error_action", "--print-result"],returncode=1,cwd=str(datadir),)assert "Something bad happened" in result.stdout.decode("utf-8")assert "FAIL" ...
1
9
2
59
1
34
43
34
datadir,data_regression
['result']
None
{"Assign": 1}
4
10
4
["sema4ai_actions_run", "str", "result.stdout.decode", "result.stdout.decode"]
0
[]
The function (test_actions_return_response_error_action) defined within the public class called public.The function start at line 34 and ends at 43. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [34.0] and does not return any value. It declares 4.0 functions,...
Sema4AI_actions
public
public
0
0
test_actions_raise_other_error_action
def test_actions_raise_other_error_action(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run", "-a=raise_other_error_action", "--print-result"],returncode=1,cwd=str(datadir),)assert "Unexpected error (RuntimeError)" in result.stdout.decode("utf-8")assert "FAIL"...
1
9
2
59
1
46
55
46
datadir,data_regression
['result']
None
{"Assign": 1}
4
10
4
["sema4ai_actions_run", "str", "result.stdout.decode", "result.stdout.decode"]
0
[]
The function (test_actions_raise_other_error_action) defined within the public class called public.The function start at line 46 and ends at 55. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [46.0] and does not return any value. It declares 4.0 functions, and...
Sema4AI_actions
public
public
0
0
test_actions_raise_error_bad_schema
def test_actions_raise_error_bad_schema(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run", "-a=bad_schema", "--print-result"],returncode=0,cwd=str(datadir),)assert ("Although the action: 'bad_schema' ran properly, it returned a value of type <class 'int'> whe...
1
11
2
50
1
58
69
58
datadir,data_regression
['result']
None
{"Assign": 1}
3
12
3
["sema4ai_actions_run", "str", "result.stdout.decode"]
0
[]
The function (test_actions_raise_error_bad_schema) defined within the public class called public.The function start at line 58 and ends at 69. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [58.0] and does not return any value. It declares 3.0 functions, and ...
Sema4AI_actions
public
public
0
0
test_actions_raise_action_error_action
def test_actions_raise_action_error_action(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["run", "-a=raise_action_error_action", "--print-result"],returncode=1,cwd=str(datadir),)assert "Action error" in result.stdout.decode("utf-8")assert "FAIL" in result.stdout...
1
9
2
59
1
72
81
72
datadir,data_regression
['result']
None
{"Assign": 1}
4
10
4
["sema4ai_actions_run", "str", "result.stdout.decode", "result.stdout.decode"]
0
[]
The function (test_actions_raise_action_error_action) defined within the public class called public.The function start at line 72 and ends at 81. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [72.0] and does not return any value. It declares 4.0 functions, an...
Sema4AI_actions
public
public
0
0
test_actions_secret_list
def test_actions_secret_list(datadir, data_regression):from devutils.fixtures import sema4ai_actions_runresult = sema4ai_actions_run(["list", "--skip-lint"], returncode=0, cwd=str(datadir))found = json.loads(result.stdout)assert len(found) == 2# # Note: the secret does not appear in the schema!# print(json.dumps(found,...
2
15
2
97
3
6
23
6
datadir,data_regression
['data', 'result', 'found']
None
{"Assign": 4, "Expr": 1, "For": 1}
5
18
5
["sema4ai_actions_run", "str", "json.loads", "len", "data_regression.check"]
0
[]
The function (test_actions_secret_list) defined within the public class called public.The function start at line 6 and ends at 23. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [6.0] and does not return any value. It declares 5.0 functions, and It has 5.0 f...
Sema4AI_actions
public
public
0
0
test_actions_secret_run_just_secret
def test_actions_secret_run_just_secret(datadir: Path):from devutils.fixtures import sema4ai_actions_run# Specifies the request in the json input.json_output = datadir / "json.output"json_input_contents = {"my_password": "this-is-the-secret",}input_json = datadir / "json.input"input_json.write_text(json.dumps(json_inpu...
1
17
1
80
4
26
47
26
datadir
['json_output', 'input_json', 'args', 'json_input_contents']
None
{"Assign": 4, "Expr": 2}
5
22
5
["input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json_output.read_text"]
0
[]
The function (test_actions_secret_run_just_secret) defined within the public class called public.The function start at line 26 and ends at 47. It contains 17 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It...
Sema4AI_actions
public
public
0
0
test_actions_secret_run_with_request
def test_actions_secret_run_with_request(datadir: Path):from devutils.fixtures import sema4ai_actions_run# Specifies the request in the json input.json_output = datadir / "json.output"json_input_contents = {"request": {"headers": {"x-action-context": base64.b64encode(json.dumps({"secrets": {"my_password": "this-is-the-...
1
25
1
116
4
50
79
50
datadir
['json_output', 'input_json', 'args', 'json_input_contents']
None
{"Assign": 4, "Expr": 2}
9
30
9
["decode", "base64.b64encode", "encode", "json.dumps", "input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json_output.read_text"]
0
[]
The function (test_actions_secret_run_with_request) defined within the public class called public.The function start at line 50 and ends at 79. It contains 25 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and I...
Sema4AI_actions
public
public
0
0
test_actions_secret_without_request_with_data_in_headers
def test_actions_secret_without_request_with_data_in_headers(datadir: Path):from devutils.fixtures import sema4ai_actions_run# Specifies the request in the json input.json_output = datadir / "json.output"json_input_contents = {"request": {"headers": {"x-action-context": base64.b64encode(json.dumps({"secrets": {"my_pass...
1
25
1
116
4
82
111
82
datadir
['json_output', 'input_json', 'args', 'json_input_contents']
None
{"Assign": 4, "Expr": 2}
9
30
9
["decode", "base64.b64encode", "encode", "json.dumps", "input_json.write_text", "json.dumps", "sema4ai_actions_run", "str", "json_output.read_text"]
0
[]
The function (test_actions_secret_without_request_with_data_in_headers) defined within the public class called public.The function start at line 82 and ends at 111. It contains 25 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares ...
Sema4AI_actions
public
public
0
0
test_actions_secret_in_env
def test_actions_secret_in_env(datadir: Path):from devutils.fixtures import sema4ai_actions_run# Specifies the request in the json input.json_output = datadir / "json.output"args = ["run","-a","action_with_secret",]sema4ai_actions_run(args,returncode=0,cwd=str(datadir),additional_env={"MY_PASSWORD": "this-is-the-secret...
1
15
1
60
2
114
132
114
datadir
['json_output', 'args']
None
{"Assign": 2, "Expr": 1}
3
19
3
["sema4ai_actions_run", "str", "json_output.read_text"]
0
[]
The function (test_actions_secret_in_env) defined within the public class called public.The function start at line 114 and ends at 132. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3....