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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
unifyai_unify | public | public | 0 | 0 | test_private_variable_exclusion.sample_function | def sample_function(public_var, _private_var):visible = public_var * 2_hidden = _private_var * 3result = visible + _hiddenreturn result | 1 | 5 | 2 | 24 | 0 | 1,291 | 1,295 | 1,291 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_private_variable_exclusion.sample_function) defined within the public class called public.The function start at line 1291 and ends at 1295. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1291.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_private_variable_exclusion | def test_private_variable_exclusion():@unify.logdef sample_function(public_var, _private_var):visible = public_var * 2_hidden = _private_var * 3result = visible + _hiddenreturn resultsample_function(5, 3)logs = unify.get_logs()assert len(logs) == 1# Verify public variables and computed results are capturedassert "public_var" in logs[0].entriesassert "visible" in logs[0].entriesassert "result" in logs[0].entries# Ensure private variables are not presentassert "_private_var" not in logs[0].entriesassert "_hidden" not in logs[0].entries | 1 | 11 | 0 | 77 | 4 | 1,289 | 1,306 | 1,289 | ['logs', 'result', '_hidden', 'visible'] | Returns | {"Assign": 4, "Expr": 1, "Return": 1} | 3 | 18 | 3 | ["sample_function", "unify.get_logs", "len"] | 0 | [] | The function (test_private_variable_exclusion) defined within the public class called public.The function start at line 1289 and ends at 1306. It contains 11 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 declares 3.0 functions, and It has 3.0 functions called inside which are ["sample_function", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_async_log_decorator.async_sample | async def async_sample(x, y):z = x * yreturn z | 1 | 3 | 2 | 14 | 0 | 1,313 | 1,315 | 1,313 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_async_log_decorator.async_sample) defined within the public class called public.The function start at line 1313 and ends at 1315. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1313.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_async_log_decorator | async def test_async_log_decorator():@unify.logasync def async_sample(x, y):z = x * yreturn zresult = await async_sample(4, 5)logs = unify.get_logs()assert len(logs) == 1assert logs[0].entries == {"x": 4,"y": 5,"z": 20,}assert result == 20 | 1 | 12 | 0 | 60 | 3 | 1,311 | 1,325 | 1,311 | ['logs', 'result', 'z'] | Returns | {"Assign": 3, "Return": 1} | 3 | 15 | 3 | ["async_sample", "unify.get_logs", "len"] | 0 | [] | The function (test_async_log_decorator) defined within the public class called public.The function start at line 1311 and ends at 1325. It contains 12 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 declares 3.0 functions, and It has 3.0 functions called inside which are ["async_sample", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_log_unique_column | def test_create_log_unique_column():unify.create_context("foo",unique_keys={"unique_id": "int"},auto_counting={"unique_id": None},)ret = unify.log(context="foo")entries = ret.entriesassert entries["unique_id"] is not Noneassert entries["unique_id"] == 0unify.delete_context("foo")unify.create_context("foo")ret = unify.log(context="foo")entries = ret.entriesassert len(entries) == 0 | 1 | 15 | 0 | 91 | 2 | 1,329 | 1,345 | 1,329 | ['entries', 'ret'] | None | {"Assign": 4, "Expr": 3} | 6 | 17 | 6 | ["unify.create_context", "unify.log", "unify.delete_context", "unify.create_context", "unify.log", "len"] | 0 | [] | The function (test_create_log_unique_column) defined within the public class called public.The function start at line 1329 and ends at 1345. 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 6.0 functions, and It has 6.0 functions called inside which are ["unify.create_context", "unify.log", "unify.delete_context", "unify.create_context", "unify.log", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_log_unique_column_batch | def test_create_log_unique_column_batch():unify.create_context("foo",unique_keys={"unique_id": "int"},auto_counting={"unique_id": None},)ret = unify.create_logs(context="foo", entries=[{"x": 1}, {"x": 2}, {"x": 3}])for i, r in enumerate(ret):assert "unique_id" in r.entriesassert r.entries["unique_id"] == i | 2 | 10 | 0 | 84 | 1 | 1,349 | 1,359 | 1,349 | ['ret'] | None | {"Assign": 1, "Expr": 1, "For": 1} | 3 | 11 | 3 | ["unify.create_context", "unify.create_logs", "enumerate"] | 0 | [] | The function (test_create_log_unique_column_batch) defined within the public class called public.The function start at line 1349 and ends at 1359. It contains 10 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 declares 3.0 functions, and It has 3.0 functions called inside which are ["unify.create_context", "unify.create_logs", "enumerate"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_logs_nested_ids | def test_create_logs_nested_ids():context_name = "foo_nested"unique_keys = {"run_id": "int", "step_id": "int"}auto_counting = {"run_id": None, "step_id": "run_id"}unify.create_context(context_name,unique_keys=unique_keys,auto_counting=auto_counting,)logs = unify.create_logs(context=context_name, entries=[{}])assert len(logs) == 1log = logs[0]assert log.entries["run_id"] == 0assert log.entries["step_id"] == 0batch_size = 3child_logs = unify.create_logs(context=context_name,entries=[{"data": f"step_{i}", "run_id": 0} for i in range(batch_size)],)assert len(child_logs) == batch_sizefor i, child_log in enumerate(child_logs):assert "run_id" in child_log.entriesassert "step_id" in child_log.entriesassert child_log.entries["run_id"] == 0assert child_log.entries["step_id"] == i + 1 | 3 | 25 | 0 | 177 | 7 | 1,363 | 1,389 | 1,363 | ['auto_counting', 'child_logs', 'logs', 'context_name', 'log', 'batch_size', 'unique_keys'] | None | {"Assign": 7, "Expr": 1, "For": 1} | 7 | 27 | 7 | ["unify.create_context", "unify.create_logs", "len", "unify.create_logs", "range", "len", "enumerate"] | 0 | [] | The function (test_create_logs_nested_ids) defined within the public class called public.The function start at line 1363 and ends at 1389. It contains 25 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 7.0 functions, and It has 7.0 functions called inside which are ["unify.create_context", "unify.create_logs", "len", "unify.create_logs", "range", "len", "enumerate"]. | |
unifyai_unify | public | public | 0 | 0 | test_set_project | def test_set_project():unify.deactivate()assert unify.active_project() is Noneunify.activate("my_project")assert unify.active_project() == "my_project"unify.deactivate() | 1 | 6 | 0 | 36 | 0 | 6 | 11 | 6 | [] | None | {"Expr": 3} | 5 | 6 | 5 | ["unify.deactivate", "unify.active_project", "unify.activate", "unify.active_project", "unify.deactivate"] | 0 | [] | The function (test_set_project) defined within the public class called public.The function start at line 6 and ends at 11. It contains 6 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 called inside which are ["unify.deactivate", "unify.active_project", "unify.activate", "unify.active_project", "unify.deactivate"]. | |
unifyai_unify | public | public | 0 | 0 | test_unset_project | def test_unset_project():unify.deactivate()assert unify.active_project() is Noneunify.activate("my_project")assert unify.active_project() == "my_project"unify.deactivate()assert unify.active_project() is None | 1 | 7 | 0 | 44 | 0 | 14 | 20 | 14 | [] | None | {"Expr": 3} | 6 | 7 | 6 | ["unify.deactivate", "unify.active_project", "unify.activate", "unify.active_project", "unify.deactivate", "unify.active_project"] | 0 | [] | The function (test_unset_project) defined within the public class called public.The function start at line 14 and ends at 20. 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 6.0 functions, and It has 6.0 functions called inside which are ["unify.deactivate", "unify.active_project", "unify.activate", "unify.active_project", "unify.deactivate", "unify.active_project"]. | |
unifyai_unify | public | public | 0 | 0 | test_with_project | def test_with_project():unify.deactivate()assert unify.active_project() is Nonewith unify.Project("my_project"):assert unify.active_project() == "my_project"assert unify.active_project() is None | 1 | 6 | 0 | 41 | 0 | 23 | 28 | 23 | [] | None | {"Expr": 1, "With": 1} | 5 | 6 | 5 | ["unify.deactivate", "unify.active_project", "unify.Project", "unify.active_project", "unify.active_project"] | 0 | [] | The function (test_with_project) defined within the public class called public.The function start at line 23 and ends at 28. It contains 6 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 called inside which are ["unify.deactivate", "unify.active_project", "unify.Project", "unify.active_project", "unify.active_project"]. | |
unifyai_unify | public | public | 0 | 0 | test_set_project_then_log | def test_set_project_then_log():unify.deactivate()assert unify.active_project() is Noneunify.activate("test_set_project_then_log")assert unify.active_project() == "test_set_project_then_log"unify.log(key=1.0)unify.deactivate()assert unify.active_project() is Noneunify.delete_project("test_set_project_then_log") | 1 | 9 | 0 | 60 | 0 | 31 | 39 | 31 | [] | None | {"Expr": 5} | 8 | 9 | 8 | ["unify.deactivate", "unify.active_project", "unify.activate", "unify.active_project", "unify.log", "unify.deactivate", "unify.active_project", "unify.delete_project"] | 0 | [] | The function (test_set_project_then_log) defined within the public class called public.The function start at line 31 and ends at 39. It contains 9 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 8.0 functions called inside which are ["unify.deactivate", "unify.active_project", "unify.activate", "unify.active_project", "unify.log", "unify.deactivate", "unify.active_project", "unify.delete_project"]. | |
unifyai_unify | public | public | 0 | 0 | test_with_project_then_log | def test_with_project_then_log():unify.deactivate()assert unify.active_project() is Nonewith unify.Project("test_with_project_then_log"):assert unify.active_project() == "test_with_project_then_log"unify.log(key=1.0)assert unify.active_project() is Noneunify.delete_project("test_with_project_then_log") | 1 | 8 | 0 | 57 | 0 | 42 | 49 | 42 | [] | None | {"Expr": 3, "With": 1} | 7 | 8 | 7 | ["unify.deactivate", "unify.active_project", "unify.Project", "unify.active_project", "unify.log", "unify.active_project", "unify.delete_project"] | 0 | [] | The function (test_with_project_then_log) defined within the public class called public.The function start at line 42 and ends at 49. It contains 8 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 functions called inside which are ["unify.deactivate", "unify.active_project", "unify.Project", "unify.active_project", "unify.log", "unify.active_project", "unify.delete_project"]. | |
unifyai_unify | public | public | 0 | 0 | test_project_env_var | def test_project_env_var():unify.deactivate()assert unify.active_project() is Noneos.environ["UNIFY_PROJECT"] = "test_project_env_var"assert unify.active_project() == "test_project_env_var"unify.delete_logs(project="test_project_env_var")unify.log(x=0, y=1, z=2)del os.environ["UNIFY_PROJECT"]assert unify.active_project() is Nonetry:logs = unify.get_logs(project="test_project_env_var")assert len(logs) == 1assert logs[0].entries == {"x": 0, "y": 1, "z": 2}finally:unify.delete_project("test_project_env_var") | 2 | 15 | 0 | 120 | 1 | 52 | 66 | 52 | ['logs'] | None | {"Assign": 2, "Expr": 4, "Try": 1} | 9 | 15 | 9 | ["unify.deactivate", "unify.active_project", "unify.active_project", "unify.delete_logs", "unify.log", "unify.active_project", "unify.get_logs", "len", "unify.delete_project"] | 0 | [] | The function (test_project_env_var) defined within the public class called public.The function start at line 52 and ends at 66. It contains 15 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 declares 9.0 functions, and It has 9.0 functions called inside which are ["unify.deactivate", "unify.active_project", "unify.active_project", "unify.delete_logs", "unify.log", "unify.active_project", "unify.get_logs", "len", "unify.delete_project"]. | |
unifyai_unify | public | public | 0 | 0 | _wait_for_trace_logger | def _wait_for_trace_logger():logger = _get_trace_logger()while logger.is_processing():time.sleep(0.1) | 2 | 4 | 0 | 24 | 1 | 18 | 21 | 18 | ['logger'] | None | {"Assign": 1, "Expr": 1, "While": 1} | 3 | 4 | 3 | ["_get_trace_logger", "logger.is_processing", "time.sleep"] | 28 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_source_code", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_uni_llm", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_uni_llm_w_caching", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_with_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_within_log_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_class", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_install_tracing_hook", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_instance", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_module", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_none_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_chained_methods", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_method", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_skip_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_w_local_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_threaded", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_uni_llm", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_uni_llm_w_caching", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_w_arg_naming", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_w_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_within_log_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_with_traced_context"] | The function (_wait_for_trace_logger) defined within the public class called public.The function start at line 18 and ends at 21. 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 declares 3.0 functions, It has 3.0 functions called inside which are ["_get_trace_logger", "logger.is_processing", "time.sleep"], It has 28.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_source_code", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_uni_llm", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_uni_llm_w_caching", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_with_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_async_within_log_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_class", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_install_tracing_hook", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_instance", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_module", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_none_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_chained_methods", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_method", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_skip_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_w_local_function", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_threaded", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_uni_llm", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_uni_llm_w_caching", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_w_arg_naming", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_w_exception", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_within_log_context", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_with_traced_context"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced.deeper_fn | def deeper_fn():time.sleep(1)return 3 | 1 | 3 | 0 | 12 | 0 | 27 | 29 | 27 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced.deeper_fn) defined within the public class called public.The function start at line 27 and ends at 29. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced.inner_fn | def inner_fn():time.sleep(1)deeper_fn()return 2 | 1 | 4 | 0 | 15 | 0 | 32 | 35 | 32 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced.inner_fn) defined within the public class called public.The function start at line 32 and ends at 35. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced.some_func | def some_func(st):time.sleep(st)inner_fn()inner_fn()return 1 | 1 | 5 | 1 | 19 | 0 | 38 | 42 | 38 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced.some_func) defined within the public class called public.The function start at line 38 and ends at 42. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced | def test_traced():@unify.traceddef deeper_fn():time.sleep(1)return 3@unify.traceddef inner_fn():time.sleep(1)deeper_fn()return 2@unify.traceddef some_func(st):time.sleep(st)inner_fn()inner_fn()return 1some_func(0.5)_wait_for_trace_logger()entries = unify.get_logs()[0].entriesassert entries["trace"]["inputs"] == {"st": 0.5}assert entries["trace"]["span_name"] == "some_func"assert (entries["trace"]["code"].replace(" ", "").replace("\n", "")== """```python@unify.traceddef some_func(st):time.sleep(st)inner_fn()inner_fn()return 1```""".replace(" ","",).replace("\n","",))assert len(entries["trace"]["child_spans"]) == 2assert entries["trace"]["child_spans"][0]["span_name"] == "inner_fn"assert len(entries["trace"]["child_spans"][0]["child_spans"]) == 1assert (entries["trace"]["child_spans"][0]["child_spans"][0]["span_name"] == "deeper_fn") | 1 | 27 | 0 | 183 | 1 | 25 | 72 | 25 | ['entries'] | Returns | {"Assign": 1, "Expr": 8, "Return": 3} | 15 | 48 | 15 | ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "some_func", "_wait_for_trace_logger", "unify.get_logs", "replace", "replace", "replace", "replace", "len", "len"] | 0 | [] | The function (test_traced) defined within the public class called public.The function start at line 25 and ends at 72. It contains 27 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 declares 15.0 functions, and It has 15.0 functions called inside which are ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "some_func", "_wait_for_trace_logger", "unify.get_logs", "replace", "replace", "replace", "replace", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_w_arg_naming.some_func | def some_func(arg):return arg + 1 | 1 | 2 | 1 | 9 | 0 | 79 | 80 | 79 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_w_arg_naming.some_func) defined within the public class called public.The function start at line 79 and ends at 80. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_w_arg_naming | def test_traced_w_arg_naming():@unify.traced(name="some_func_{arg}")def some_func(arg):return arg + 1some_func(1)_wait_for_trace_logger()entries = unify.get_logs()[0].entriesassert entries["trace"]["inputs"] == {"arg": 1}assert entries["trace"]["span_name"] == "some_func_1" | 1 | 8 | 0 | 58 | 1 | 76 | 87 | 76 | ['entries'] | Returns | {"Assign": 1, "Expr": 2, "Return": 1} | 4 | 12 | 4 | ["unify.traced", "some_func", "_wait_for_trace_logger", "unify.get_logs"] | 0 | [] | The function (test_traced_w_arg_naming) defined within the public class called public.The function start at line 76 and ends at 87. It contains 8 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 declares 4.0 functions, and It has 4.0 functions called inside which are ["unify.traced", "some_func", "_wait_for_trace_logger", "unify.get_logs"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_w_exception.deeper_fn | def deeper_fn(inp):if inp == 2:raise ValueError("Something went wrong")return 3 | 2 | 4 | 1 | 17 | 0 | 93 | 96 | 93 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_w_exception.deeper_fn) defined within the public class called public.The function start at line 93 and ends at 96. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_w_exception.inner_fn | def inner_fn(inp):deeper_fn(inp)return 2 | 1 | 3 | 1 | 11 | 0 | 99 | 101 | 99 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_w_exception.inner_fn) defined within the public class called public.The function start at line 99 and ends at 101. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_w_exception.some_func | def some_func(inp):inner_fn(inp)inner_fn(inp + 1)return 1 | 1 | 4 | 1 | 17 | 0 | 104 | 107 | 104 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_w_exception.some_func) defined within the public class called public.The function start at line 104 and ends at 107. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_w_exception | def test_traced_w_exception():@unify.traceddef deeper_fn(inp):if inp == 2:raise ValueError("Something went wrong")return 3@unify.traceddef inner_fn(inp):deeper_fn(inp)return 2@unify.traceddef some_func(inp):inner_fn(inp)inner_fn(inp + 1)return 1try:some_func(1)except ValueError:pass_wait_for_trace_logger()trace = unify.get_logs()[0].entries["trace"]assert trace["inputs"] == {"inp": 1}assert trace["span_name"] == "some_func"assert (trace["code"].replace(" ", "").replace("\n", "")== """```python@unify.traceddef some_func(inp):inner_fn(inp)inner_fn(inp+1)return 1```""".replace(" ","",).replace("\n","",))assert len(trace["child_spans"]) == 2assert trace["child_spans"][0]["span_name"] == "inner_fn"assert len(trace["child_spans"][0]["child_spans"]) == 1assert trace["child_spans"][0]["child_spans"][0]["span_name"] == "deeper_fn"assert "Something went wrong" in trace["child_spans"][1]["child_spans"][0]["errors"] | 2 | 29 | 0 | 184 | 1 | 91 | 138 | 91 | ['trace'] | Returns | {"Assign": 1, "Expr": 5, "If": 1, "Return": 3, "Try": 1} | 13 | 48 | 13 | ["ValueError", "deeper_fn", "inner_fn", "inner_fn", "some_func", "_wait_for_trace_logger", "unify.get_logs", "replace", "replace", "replace", "replace", "len", "len"] | 0 | [] | The function (test_traced_w_exception) defined within the public class called public.The function start at line 91 and ends at 138. It contains 29 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 13.0 functions, and It has 13.0 functions called inside which are ["ValueError", "deeper_fn", "inner_fn", "inner_fn", "some_func", "_wait_for_trace_logger", "unify.get_logs", "replace", "replace", "replace", "replace", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_uni_llm | def test_traced_uni_llm():client = unify.Unify("gpt-4o@openai", traced=True)client.generate("hello")_wait_for_trace_logger()trace = unify.get_logs()[0].entries["trace"]assert trace["type"] == "llm"assert trace["span_name"] == "gpt-4o@openai"assert trace["offset"] == 0assert trace["inputs"] == {"messages": [{"role": "user", "content": "hello"}],"model": "gpt-4o@openai","stream": False,"temperature": 1.0,"extra_body": {"signature": "python","use_custom_keys": False,"drop_params": True,"log_query_body": True,"log_response_body": True,},}outputs = trace["outputs"]choices = outputs["choices"]assert len(choices) == 1choice = choices[0]assert choice["finish_reason"] == "stop"assert choice["index"] == 0message = choice["message"]assert message["role"] == "assistant"assert outputs["model"] == "gpt-4o@openai"assert outputs["object"] == "chat.completion" | 1 | 31 | 0 | 188 | 6 | 142 | 173 | 142 | ['outputs', 'client', 'trace', 'message', 'choice', 'choices'] | None | {"Assign": 6, "Expr": 2} | 5 | 32 | 5 | ["unify.Unify", "client.generate", "_wait_for_trace_logger", "unify.get_logs", "len"] | 0 | [] | The function (test_traced_uni_llm) defined within the public class called public.The function start at line 142 and ends at 173. It contains 31 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 called inside which are ["unify.Unify", "client.generate", "_wait_for_trace_logger", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_async_uni_llm | async def test_traced_async_uni_llm():client = unify.AsyncUnify("gpt-4o@openai", traced=True)await client.generate("hello")await client.close()_wait_for_trace_logger()trace = unify.get_logs()[0].entries["trace"]assert trace["type"] == "llm"assert trace["span_name"] == "gpt-4o@openai"assert trace["offset"] == 0assert trace["inputs"] == {"messages": [{"role": "user", "content": "hello"}],"model": "gpt-4o@openai","stream": False,"temperature": 1.0,"extra_body": {"signature": "python","use_custom_keys": False,"drop_params": True,"log_query_body": True,"log_response_body": True,},}outputs = trace["outputs"]choices = outputs["choices"]assert len(choices) == 1choice = choices[0]assert choice["finish_reason"] == "stop"assert choice["index"] == 0message = choice["message"]assert message["role"] == "assistant"assert outputs["model"] == "gpt-4o@openai"assert outputs["object"] == "chat.completion" | 1 | 32 | 0 | 195 | 6 | 178 | 210 | 178 | ['outputs', 'client', 'trace', 'message', 'choice', 'choices'] | None | {"Assign": 6, "Expr": 3} | 6 | 33 | 6 | ["unify.AsyncUnify", "client.generate", "client.close", "_wait_for_trace_logger", "unify.get_logs", "len"] | 0 | [] | The function (test_traced_async_uni_llm) defined within the public class called public.The function start at line 178 and ends at 210. It contains 32 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, and It has 6.0 functions called inside which are ["unify.AsyncUnify", "client.generate", "client.close", "_wait_for_trace_logger", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_uni_llm_w_caching | def test_traced_uni_llm_w_caching():client = unify.Unify("gpt-4o@openai", cache=True)client.generate("hello")client.set_traced(True)client.generate("hello")_wait_for_trace_logger()trace = unify.get_logs()[0].entries["trace"]assert trace["type"] == "llm-cached"assert trace["span_name"] == "gpt-4o@openai"assert trace["offset"] == 0assert trace["inputs"] == {"messages": [{"role": "user", "content": "hello"}],"model": "gpt-4o@openai","stream": False,"temperature": 1.0,"extra_body": {"signature": "python","use_custom_keys": False,"drop_params": True,"log_query_body": True,"log_response_body": True,},}outputs = trace["outputs"]choices = outputs["choices"]assert len(choices) == 1choice = choices[0]assert choice["finish_reason"] == "stop"assert choice["index"] == 0message = choice["message"]assert message["role"] == "assistant"assert outputs["model"] == "gpt-4o@openai"assert outputs["object"] == "chat.completion" | 1 | 33 | 0 | 200 | 6 | 214 | 248 | 214 | ['outputs', 'client', 'trace', 'message', 'choice', 'choices'] | None | {"Assign": 6, "Expr": 4} | 7 | 35 | 7 | ["unify.Unify", "client.generate", "client.set_traced", "client.generate", "_wait_for_trace_logger", "unify.get_logs", "len"] | 0 | [] | The function (test_traced_uni_llm_w_caching) defined within the public class called public.The function start at line 214 and ends at 248. It contains 33 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 functions called inside which are ["unify.Unify", "client.generate", "client.set_traced", "client.generate", "_wait_for_trace_logger", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_async_uni_llm_w_caching | async def test_traced_async_uni_llm_w_caching():client = unify.AsyncUnify("gpt-4o@openai", cache=True)await client.generate("hello")client.set_traced(True)await client.generate("hello")await client.close()_wait_for_trace_logger()trace = unify.get_logs()[0].entries["trace"]assert trace["type"] == "llm-cached"assert trace["span_name"] == "gpt-4o@openai"assert trace["offset"] == 0assert trace["inputs"] == {"messages": [{"role": "user", "content": "hello"}],"model": "gpt-4o@openai","stream": False,"temperature": 1.0,"extra_body": {"signature": "python","use_custom_keys": False,"drop_params": True,"log_query_body": True,"log_response_body": True,},}outputs = trace["outputs"]choices = outputs["choices"]assert len(choices) == 1choice = choices[0]assert choice["finish_reason"] == "stop"assert choice["index"] == 0message = choice["message"]assert message["role"] == "assistant"assert outputs["model"] == "gpt-4o@openai"assert outputs["object"] == "chat.completion" | 1 | 34 | 0 | 208 | 6 | 253 | 287 | 253 | ['outputs', 'client', 'trace', 'message', 'choice', 'choices'] | None | {"Assign": 6, "Expr": 5} | 8 | 35 | 8 | ["unify.AsyncUnify", "client.generate", "client.set_traced", "client.generate", "client.close", "_wait_for_trace_logger", "unify.get_logs", "len"] | 0 | [] | The function (test_traced_async_uni_llm_w_caching) defined within the public class called public.The function start at line 253 and ends at 287. It contains 34 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 8.0 functions called inside which are ["unify.AsyncUnify", "client.generate", "client.set_traced", "client.generate", "client.close", "_wait_for_trace_logger", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_none_handling.some_func | def some_func(a, b, c, d):return [a, b, c, d] | 1 | 2 | 4 | 21 | 0 | 293 | 294 | 293 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_none_handling.some_func) defined within the public class called public.The function start at line 293 and ends at 294. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [293.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_none_handling.some_func | def some_func(a, b, c, d):return [a, b, c, d] | 1 | 2 | 4 | 21 | 0 | 320 | 321 | 293 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_none_handling.some_func) defined within the public class called public.The function start at line 320 and ends at 321. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [293.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_none_handling | def test_traced_none_handling():@unify.traced(prune_empty=False)def some_func(a, b, c, d):return [a, b, c, d]some_func(1, 2, None, 4)_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1entries = logs[0].entriesassert entries["trace"]["inputs"] == {"a": 1, "b": 2, "c": None, "d": 4}assert entries["trace"]["span_name"] == "some_func"assert (entries["trace"]["code"].replace(" ", "").replace("\n", "")== """```python@unify.traced(prune_empty=False)def some_func(a, b, c, d):return [a, b, c, d]```""".replace(" ","",).replace("\n","",))assert len(entries["trace"]["child_spans"]) == 0@unify.traced(prune_empty=True)def some_func(a, b, c, d):return [a, b, c, d]some_func(1, 2, None, 4)_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 2entries = logs[0].entriesassert entries["trace"]["inputs"] == {"a": 1, "b": 2, "d": 4}assert entries["trace"]["span_name"] == "some_func"assert (entries["trace"]["code"].replace(" ", "").replace("\n", "")== """```python@unify.traced(prune_empty=True)def some_func(a, b, c, d):return [a, b, c, d]```""".replace(" ","",).replace("\n","",))assert "child_spans" not in entries["trace"] | 1 | 39 | 0 | 269 | 2 | 291 | 344 | 291 | ['logs', 'entries'] | Returns | {"Assign": 4, "Expr": 4, "Return": 2} | 19 | 54 | 19 | ["unify.traced", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "replace", "replace", "replace", "replace", "len", "unify.traced", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "replace", "replace", "replace", "replace"] | 0 | [] | The function (test_traced_none_handling) defined within the public class called public.The function start at line 291 and ends at 344. It contains 39 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 declares 19.0 functions, and It has 19.0 functions called inside which are ["unify.traced", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "replace", "replace", "replace", "replace", "len", "unify.traced", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "replace", "replace", "replace", "replace"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_within_log_context.deeper_fn | def deeper_fn():time.sleep(1)return 3 | 1 | 3 | 0 | 12 | 0 | 350 | 352 | 350 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_within_log_context.deeper_fn) defined within the public class called public.The function start at line 350 and ends at 352. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_within_log_context.inner_fn | def inner_fn():time.sleep(1)deeper_fn()return 2 | 1 | 4 | 0 | 15 | 0 | 355 | 358 | 355 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_within_log_context.inner_fn) defined within the public class called public.The function start at line 355 and ends at 358. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_within_log_context.some_func | def some_func(st):time.sleep(st)inner_fn()inner_fn()return 1 | 1 | 5 | 1 | 19 | 0 | 361 | 365 | 361 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_within_log_context.some_func) defined within the public class called public.The function start at line 361 and ends at 365. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_within_log_context | def test_traced_within_log_context():@unify.traceddef deeper_fn():time.sleep(1)return 3@unify.traceddef inner_fn():time.sleep(1)deeper_fn()return 2@unify.traceddef some_func(st):time.sleep(st)inner_fn()inner_fn()return 1with unify.Log(a="a", b="b"):some_func(0.5)_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1entries = logs[0].entriesassert entries["a"] == "a"assert entries["b"] == "b"assert entries["trace"]["inputs"] == {"st": 0.5}assert entries["trace"]["span_name"] == "some_func"assert len(entries["trace"]["child_spans"]) == 2assert entries["trace"]["child_spans"][0]["span_name"] == "inner_fn"assert len(entries["trace"]["child_spans"][0]["child_spans"]) == 1assert (entries["trace"]["child_spans"][0]["child_spans"][0]["span_name"] == "deeper_fn") | 1 | 23 | 0 | 179 | 2 | 348 | 382 | 348 | ['logs', 'entries'] | Returns | {"Assign": 2, "Expr": 8, "Return": 3, "With": 1} | 13 | 35 | 13 | ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "unify.Log", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "len", "len"] | 0 | [] | The function (test_traced_within_log_context) defined within the public class called public.The function start at line 348 and ends at 382. It contains 23 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 declares 13.0 functions, and It has 13.0 functions called inside which are ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "unify.Log", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_threaded.deeper_fn | def deeper_fn():time.sleep(1)return 3 | 1 | 3 | 0 | 12 | 0 | 388 | 390 | 388 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_threaded.deeper_fn) defined within the public class called public.The function start at line 388 and ends at 390. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_threaded.inner_fn | def inner_fn():time.sleep(1)deeper_fn()return 2 | 1 | 4 | 0 | 15 | 0 | 393 | 396 | 393 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_threaded.inner_fn) defined within the public class called public.The function start at line 393 and ends at 396. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_threaded.some_func | def some_func(st):time.sleep(st)inner_fn()inner_fn()return 1 | 1 | 5 | 1 | 19 | 0 | 399 | 403 | 399 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_threaded.some_func) defined within the public class called public.The function start at line 399 and ends at 403. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_threaded | def test_traced_threaded():@unify.traceddef deeper_fn():time.sleep(1)return 3@unify.traceddef inner_fn():time.sleep(1)deeper_fn()return 2@unify.traceddef some_func(st):time.sleep(st)inner_fn()inner_fn()return 1threads = [threading.Thread(target=some_func,args=[i / 100],)for i in range(8)][t.start() for t in threads][t.join() for t in threads]_wait_for_trace_logger()logs = unify.get_logs()for i, log in enumerate(logs):trace = log.entries["trace"]assert trace["inputs"] == {"st": (7 - i) / 100}assert trace["span_name"] == "some_func"assert len(trace["child_spans"]) == 2assert trace["child_spans"][0]["span_name"] == "inner_fn"assert len(trace["child_spans"][0]["child_spans"]) == 1assert trace["child_spans"][0]["child_spans"][0]["span_name"] == "deeper_fn" | 5 | 26 | 0 | 182 | 3 | 386 | 425 | 386 | ['threads', 'trace', 'logs'] | Returns | {"Assign": 3, "Expr": 9, "For": 1, "Return": 3} | 15 | 40 | 15 | ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "threading.Thread", "range", "t.start", "t.join", "_wait_for_trace_logger", "unify.get_logs", "enumerate", "len", "len"] | 0 | [] | The function (test_traced_threaded) defined within the public class called public.The function start at line 386 and ends at 425. It contains 26 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 15.0 functions, and It has 15.0 functions called inside which are ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "threading.Thread", "range", "t.start", "t.join", "_wait_for_trace_logger", "unify.get_logs", "enumerate", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_async.deeper_fn | async def deeper_fn():time.sleep(1)return 3 | 1 | 3 | 0 | 12 | 0 | 432 | 434 | 432 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async.deeper_fn) defined within the public class called public.The function start at line 432 and ends at 434. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async.inner_fn | async def inner_fn():time.sleep(1)await deeper_fn()return 2 | 1 | 4 | 0 | 16 | 0 | 437 | 440 | 437 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async.inner_fn) defined within the public class called public.The function start at line 437 and ends at 440. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async.some_func | async def some_func(st):time.sleep(st)await inner_fn()await inner_fn()return 1 | 1 | 5 | 1 | 21 | 0 | 443 | 447 | 443 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async.some_func) defined within the public class called public.The function start at line 443 and ends at 447. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async | async def test_traced_async():@unify.tracedasync def deeper_fn():time.sleep(1)return 3@unify.tracedasync def inner_fn():time.sleep(1)await deeper_fn()return 2@unify.tracedasync def some_func(st):time.sleep(st)await inner_fn()await inner_fn()return 1await asyncio.gather(*[some_func(i / 100) for i in range(8)])_wait_for_trace_logger()logs = unify.get_logs()logs = sorted(logs, key=lambda x: x.entries["trace"]["inputs"]["st"])for i, log in enumerate(logs):trace = log.entries["trace"]assert trace["inputs"] == {"st": i / 100}assert trace["span_name"] == "some_func"assert len(trace["child_spans"]) == 2assert trace["child_spans"][0]["span_name"] == "inner_fn"assert len(trace["child_spans"][0]["child_spans"]) == 1assert trace["child_spans"][0]["child_spans"][0]["span_name"] == "deeper_fn" | 3 | 19 | 0 | 177 | 2 | 430 | 462 | 430 | ['logs', 'trace'] | Returns | {"Assign": 3, "Expr": 8, "For": 1, "Return": 3} | 15 | 33 | 15 | ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "asyncio.gather", "some_func", "range", "_wait_for_trace_logger", "unify.get_logs", "sorted", "enumerate", "len", "len"] | 0 | [] | The function (test_traced_async) defined within the public class called public.The function start at line 430 and ends at 462. It contains 19 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 15.0 functions, and It has 15.0 functions called inside which are ["time.sleep", "time.sleep", "deeper_fn", "time.sleep", "inner_fn", "inner_fn", "asyncio.gather", "some_func", "range", "_wait_for_trace_logger", "unify.get_logs", "sorted", "enumerate", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_async_within_log_context.deeper_fn | async def deeper_fn():return 3 | 1 | 2 | 0 | 6 | 0 | 469 | 470 | 469 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async_within_log_context.deeper_fn) defined within the public class called public.The function start at line 469 and ends at 470. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async_within_log_context.inner_fn | async def inner_fn():await deeper_fn()return 2 | 1 | 3 | 0 | 10 | 0 | 473 | 475 | 473 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async_within_log_context.inner_fn) defined within the public class called public.The function start at line 473 and ends at 475. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async_within_log_context.some_func | async def some_func():await inner_fn()await inner_fn()return 1 | 1 | 4 | 0 | 14 | 0 | 478 | 481 | 478 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async_within_log_context.some_func) defined within the public class called public.The function start at line 478 and ends at 481. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async_within_log_context | async def test_traced_async_within_log_context():@unify.tracedasync def deeper_fn():return 3@unify.tracedasync def inner_fn():await deeper_fn()return 2@unify.tracedasync def some_func():await inner_fn()await inner_fn()return 1with unify.Log(a="a", b="b"):await some_func()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1entries = logs[0].entriesassert entries["a"] == "a"assert entries["b"] == "b"assert entries["trace"]["span_name"] == "some_func"assert len(entries["trace"]["child_spans"]) == 2assert entries["trace"]["child_spans"][0]["span_name"] == "inner_fn"assert len(entries["trace"]["child_spans"][0]["child_spans"]) == 1assert (entries["trace"]["child_spans"][0]["child_spans"][0]["span_name"] == "deeper_fn") | 1 | 22 | 0 | 164 | 2 | 467 | 499 | 467 | ['logs', 'entries'] | Returns | {"Assign": 2, "Expr": 5, "Return": 3, "With": 1} | 10 | 33 | 10 | ["deeper_fn", "inner_fn", "inner_fn", "unify.Log", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "len", "len"] | 0 | [] | The function (test_traced_async_within_log_context) defined within the public class called public.The function start at line 467 and ends at 499. It contains 22 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 declares 10.0 functions, and It has 10.0 functions called inside which are ["deeper_fn", "inner_fn", "inner_fn", "unify.Log", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_async_source_code.some_func | async def some_func(a, b):c = a + breturn c | 1 | 3 | 2 | 14 | 0 | 506 | 508 | 506 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async_source_code.some_func) defined within the public class called public.The function start at line 506 and ends at 508. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [506.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async_source_code | async def test_traced_async_source_code():@unify.tracedasync def some_func(a, b):c = a + breturn cawait some_func(1, 2)_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1source = inspect.getsource(some_func).replace(" ", "").replace("\n", "")assert (logs[0].entries["trace"]["code"].replace(" ", "").replace("\n", "")== f"```python{source}```") | 1 | 12 | 0 | 89 | 3 | 504 | 518 | 504 | ['logs', 'source', 'c'] | Returns | {"Assign": 3, "Expr": 2, "Return": 1} | 9 | 15 | 9 | ["some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "replace", "replace", "inspect.getsource", "replace", "replace"] | 0 | [] | The function (test_traced_async_source_code) defined within the public class called public.The function start at line 504 and ends at 518. It contains 12 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 declares 9.0 functions, and It has 9.0 functions called inside which are ["some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "replace", "replace", "inspect.getsource", "replace", "replace"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_async_with_exception.some_func | async def some_func():raise ValueError("Something went wrong") | 1 | 2 | 0 | 9 | 0 | 525 | 526 | 525 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_async_with_exception.some_func) defined within the public class called public.The function start at line 525 and ends at 526. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_async_with_exception | async def test_traced_async_with_exception():@unify.tracedasync def some_func():raise ValueError("Something went wrong")try:await some_func()except ValueError:pass_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1assert "Something went wrong" in logs[0].entries["trace"]["errors"] | 2 | 11 | 0 | 53 | 1 | 523 | 536 | 523 | ['logs'] | None | {"Assign": 1, "Expr": 2, "Try": 1} | 5 | 14 | 5 | ["ValueError", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len"] | 0 | [] | The function (test_traced_async_with_exception) defined within the public class called public.The function start at line 523 and ends at 536. It contains 11 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 declares 5.0 functions, and It has 5.0 functions called inside which are ["ValueError", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_class.__init__ | def __init__(self, a):self.a = a | 1 | 2 | 2 | 12 | 0 | 543 | 544 | 543 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_class.__init__) defined within the public class called public.The function start at line 543 and ends at 544. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [543.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_class.add | def add(self, b):return self.a + b | 1 | 2 | 2 | 13 | 0 | 546 | 547 | 546 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_class.add) defined within the public class called public.The function start at line 546 and ends at 547. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [546.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_class.result | def result(self):return self.a | 1 | 2 | 1 | 9 | 0 | 549 | 550 | 549 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_class.result) defined within the public class called public.The function start at line 549 and ends at 550. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_class | def test_traced_class():@unify.tracedclass Foo:def __init__(self, a):self.a = adef add(self, b):return self.a + bdef result(self):return self.afoo = Foo(0)foo.add(1)foo.result()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 2sorted_logs = sorted(logs, key=lambda x: x.entries["trace"]["span_name"])assert sorted_logs[0].entries["trace"]["span_name"] == "Foo.add"assert ["self", "b"] == list(sorted_logs[0].entries["trace"]["inputs"].keys())assert sorted_logs[0].entries["trace"]["inputs"]["b"] == 1assert sorted_logs[1].entries["trace"]["span_name"] == "Foo.result"assert ["self"] == list(sorted_logs[1].entries["trace"]["inputs"].keys()) | 1 | 18 | 0 | 170 | 3 | 540 | 567 | 540 | ['logs', 'sorted_logs', 'foo'] | Returns | {"Assign": 4, "Expr": 3, "Return": 2} | 11 | 28 | 11 | ["Foo", "foo.add", "foo.result", "_wait_for_trace_logger", "unify.get_logs", "len", "sorted", "list", "keys", "list", "keys"] | 0 | [] | The function (test_traced_class) defined within the public class called public.The function start at line 540 and ends at 567. It contains 18 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 declares 11.0 functions, and It has 11.0 functions called inside which are ["Foo", "foo.add", "foo.result", "_wait_for_trace_logger", "unify.get_logs", "len", "sorted", "list", "keys", "list", "keys"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_instance.__init__ | def __init__(self, a):self.a = a | 1 | 2 | 2 | 12 | 0 | 573 | 574 | 573 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_instance.__init__) defined within the public class called public.The function start at line 573 and ends at 574. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [573.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_instance.add | def add(self, b):return self.a + b | 1 | 2 | 2 | 13 | 0 | 576 | 577 | 576 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_instance.add) defined within the public class called public.The function start at line 576 and ends at 577. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [576.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_instance.sub | def sub(self, b):return self.a - b | 1 | 2 | 2 | 13 | 0 | 579 | 580 | 579 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_instance.sub) defined within the public class called public.The function start at line 579 and ends at 580. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [579.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_instance | def test_traced_instance():class Foo:def __init__(self, a):self.a = adef add(self, b):return self.a + bdef sub(self, b):return self.a - bfoo = Foo(10)unify.traced(foo)# trace only *this* instancefoo.add(3)foo.sub(5)_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 2# order in the queue isn't guaranteed – sort by span namesorted_logs = sorted(logs, key=lambda x: x.entries["trace"]["span_name"])assert sorted_logs[0].entries["trace"]["span_name"] == "Foo.add"assert sorted_logs[0].entries["trace"]["inputs"]["b"] == 3assert sorted_logs[0].entries["trace"]["outputs"] == 13assert sorted_logs[1].entries["trace"]["span_name"] == "Foo.sub"assert sorted_logs[1].entries["trace"]["inputs"]["b"] == 5assert sorted_logs[1].entries["trace"]["outputs"] == 5 | 1 | 19 | 0 | 171 | 3 | 571 | 600 | 571 | ['logs', 'sorted_logs', 'foo'] | Returns | {"Assign": 4, "Expr": 4, "Return": 2} | 8 | 30 | 8 | ["Foo", "unify.traced", "foo.add", "foo.sub", "_wait_for_trace_logger", "unify.get_logs", "len", "sorted"] | 0 | [] | The function (test_traced_instance) defined within the public class called public.The function start at line 571 and ends at 600. It contains 19 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 declares 8.0 functions, and It has 8.0 functions called inside which are ["Foo", "unify.traced", "foo.add", "foo.sub", "_wait_for_trace_logger", "unify.get_logs", "len", "sorted"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_module | def test_traced_module():source_code = """def add(a, b):return a + bdef sub(a, b):return a - bclass Foo:def __init__(self, a):self.a = adef add(self, b):return self.a + b"""spec = importlib.util.spec_from_loader("test_module", loader=None)module = importlib.util.module_from_spec(spec)exec(source_code, module.__dict__)unify.traced(module)module.add(1, 0)module.sub(1, 2)module.Foo(0).add(2)_wait_for_trace_logger()logs = list(reversed(unify.get_logs()))assert len(logs) == 3assert logs[0].entries["trace"]["span_name"] == "test_module.add"assert logs[0].entries["trace"]["inputs"] == {"a": 1, "b": 0}assert logs[0].entries["trace"]["outputs"] == 1assert logs[1].entries["trace"]["span_name"] == "test_module.sub"assert logs[1].entries["trace"]["inputs"] == {"a": 1, "b": 2}assert logs[1].entries["trace"]["outputs"] == -1assert logs[2].entries["trace"]["span_name"] == "test_module.Foo.add" | 1 | 33 | 0 | 217 | 4 | 604 | 639 | 604 | ['logs', 'source_code', 'module', 'spec'] | None | {"Assign": 4, "Expr": 6} | 13 | 36 | 13 | ["importlib.util.spec_from_loader", "importlib.util.module_from_spec", "exec", "unify.traced", "module.add", "module.sub", "add", "module.Foo", "_wait_for_trace_logger", "list", "reversed", "unify.get_logs", "len"] | 0 | [] | The function (test_traced_module) defined within the public class called public.The function start at line 604 and ends at 639. It contains 33 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 13.0 functions, and It has 13.0 functions called inside which are ["importlib.util.spec_from_loader", "importlib.util.module_from_spec", "exec", "unify.traced", "module.add", "module.sub", "add", "module.Foo", "_wait_for_trace_logger", "list", "reversed", "unify.get_logs", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_install_and_disable_tracing_hook | def test_traced_install_and_disable_tracing_hook():from unify.logging.utils.tracing import TraceFinderunify.install_tracing_hook(["test_tracing_package"])assert any(isinstance(finder, TraceFinder) for finder in sys.meta_path)unify.disable_tracing_hook()assert not any(isinstance(finder, TraceFinder) for finder in sys.meta_path) | 3 | 6 | 0 | 60 | 0 | 643 | 650 | 643 | [] | None | {"Expr": 2} | 6 | 8 | 6 | ["unify.install_tracing_hook", "any", "isinstance", "unify.disable_tracing_hook", "any", "isinstance"] | 0 | [] | The function (test_traced_install_and_disable_tracing_hook) defined within the public class called public.The function start at line 643 and ends at 650. 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 6.0 functions, and It has 6.0 functions called inside which are ["unify.install_tracing_hook", "any", "isinstance", "unify.disable_tracing_hook", "any", "isinstance"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_install_tracing_hook | def test_traced_install_tracing_hook(tmpdir):package_dir = tmpdir.join("test_tracing_package")package_dir.mkdir()with open(package_dir.join("__init__.py"), "w") as f:f.write("# Package initialization\n")f.write("from .module1 import add_abs\n")with open(package_dir.join("module1.py"), "w") as f:f.write("""from .module2 import absdef add_abs(a, b):return abs(a) + abs(b)""",)with open(package_dir.join("module2.py"), "w") as f:f.write("""def abs(a):return a if a > 0 else -a""",)sys.path.insert(0, tmpdir.strpath)unify.install_tracing_hook(["test_tracing_package"])try:import test_tracing_packagetest_tracing_package.add_abs(-2, -3)finally:sys.path.remove(tmpdir.strpath)unify.disable_tracing_hook()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1entry = logs[0].entries["trace"]assert entry["span_name"] == "test_tracing_package.module1.add_abs"assert entry["inputs"] == {"a": -2, "b": -3}assert entry["outputs"] == 5assert len(entry["child_spans"]) == 2assert entry["child_spans"][0]["span_name"] == "test_tracing_package.module2.abs"assert entry["child_spans"][1]["span_name"] == "test_tracing_package.module2.abs" | 2 | 40 | 1 | 235 | 3 | 654 | 702 | 654 | tmpdir | ['logs', 'package_dir', 'entry'] | None | {"Assign": 3, "Expr": 11, "Try": 1, "With": 3} | 21 | 49 | 21 | ["tmpdir.join", "package_dir.mkdir", "open", "package_dir.join", "f.write", "f.write", "open", "package_dir.join", "f.write", "open", "package_dir.join", "f.write", "sys.path.insert", "unify.install_tracing_hook", "test_tracing_package.add_abs", "sys.path.remove", "unify.disable_tracing_hook", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_traced_install_tracing_hook) defined within the public class called public.The function start at line 654 and ends at 702. It contains 40 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 declares 21.0 functions, and It has 21.0 functions called inside which are ["tmpdir.join", "package_dir.mkdir", "open", "package_dir.join", "f.write", "f.write", "open", "package_dir.join", "f.write", "open", "package_dir.join", "f.write", "sys.path.insert", "unify.install_tracing_hook", "test_tracing_package.add_abs", "sys.path.remove", "unify.disable_tracing_hook", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. |
unifyai_unify | public | public | 0 | 0 | test_traced_context.some_func | def some_func(arg):return arg + 1 | 1 | 2 | 1 | 9 | 0 | 710 | 711 | 710 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_context.some_func) defined within the public class called public.The function start at line 710 and ends at 711. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_context | def test_traced_context():unify.set_trace_context("Tracing")@unify.traceddef some_func(arg):return arg + 1with unify.Context("Foo"):unify.log(a=1)[some_func(i) for i in range(5)]with unify.Context("Foo"):unify.log(a=2)_wait_for_trace_logger()logs = unify.get_logs(context="Foo")assert len(logs) == 2logs = unify.get_logs(context="Tracing")assert len(logs) == 5unify.set_trace_context(None) | 2 | 15 | 0 | 104 | 1 | 706 | 728 | 706 | ['logs'] | Returns | {"Assign": 2, "Expr": 6, "Return": 1, "With": 2} | 13 | 23 | 13 | ["unify.set_trace_context", "unify.Context", "unify.log", "some_func", "range", "unify.Context", "unify.log", "_wait_for_trace_logger", "unify.get_logs", "len", "unify.get_logs", "len", "unify.set_trace_context"] | 0 | [] | The function (test_traced_context) defined within the public class called public.The function start at line 706 and ends at 728. It contains 15 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 13.0 functions, and It has 13.0 functions called inside which are ["unify.set_trace_context", "unify.Context", "unify.log", "some_func", "range", "unify.Context", "unify.log", "_wait_for_trace_logger", "unify.get_logs", "len", "unify.get_logs", "len", "unify.set_trace_context"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_context_set_get | def test_traced_context_set_get():unify.set_trace_context("Tracing")assert unify.get_trace_context() == "Tracing"unify.set_trace_context(None)assert unify.get_trace_context() is None | 1 | 5 | 0 | 32 | 0 | 732 | 737 | 732 | [] | None | {"Expr": 2} | 4 | 6 | 4 | ["unify.set_trace_context", "unify.get_trace_context", "unify.set_trace_context", "unify.get_trace_context"] | 0 | [] | The function (test_traced_context_set_get) defined within the public class called public.The function start at line 732 and ends at 737. 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 4.0 functions, and It has 4.0 functions called inside which are ["unify.set_trace_context", "unify.get_trace_context", "unify.set_trace_context", "unify.get_trace_context"]. | |
unifyai_unify | public | public | 0 | 0 | test_with_traced_context | def test_with_traced_context():a = 0b = 1ll = []msg = "Bye"e = 10f = "a"g = 0with unify.Traced("First Context"):c = a + bb = 20d = b - 20msg = f"Hello {msg}"ll.append(0)f = "b"g += 1_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "First Context"assert trace["type"] == "context"assert trace["inputs"] == {"a": 0, "b": 1, "ll": [], "msg": "Bye", "f": "a", "g": 0}assert trace["outputs"] == {"c": 1,"b": 20,"d": 0,"msg": "Hello Bye","ll": [0],"f": "b","g": 1,}assert len(trace["child_spans"]) == 0 | 1 | 33 | 0 | 185 | 11 | 741 | 774 | 741 | ['g', 'trace', 'e', 'logs', 'a', 'b', 'c', 'll', 'f', 'msg', 'd'] | None | {"Assign": 14, "AugAssign": 1, "Expr": 2, "With": 1} | 6 | 34 | 6 | ["unify.Traced", "ll.append", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_with_traced_context) defined within the public class called public.The function start at line 741 and ends at 774. It contains 33 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, and It has 6.0 functions called inside which are ["unify.Traced", "ll.append", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_with_traced_context_nested | def test_with_traced_context_nested():with unify.Traced("First Context"):with unify.Traced("Second Context"):pass_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "First Context"assert trace["type"] == "context"assert len(trace["child_spans"]) == 1assert trace["child_spans"][0]["span_name"] == "Second Context"assert trace["child_spans"][0]["type"] == "context" | 1 | 13 | 0 | 99 | 2 | 778 | 791 | 778 | ['logs', 'trace'] | None | {"Assign": 2, "Expr": 1, "With": 2} | 6 | 14 | 6 | ["unify.Traced", "unify.Traced", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_with_traced_context_nested) defined within the public class called public.The function start at line 778 and ends at 791. It contains 13 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, and It has 6.0 functions called inside which are ["unify.Traced", "unify.Traced", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_with_traced_context_w_exception | def test_with_traced_context_w_exception():try:with unify.Traced("exception"):raise ValueError("Something went wrong")except ValueError:pass_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "exception"assert trace["type"] == "context"assert trace["inputs"] is Noneassert trace["outputs"] is Noneassert len(trace["child_spans"]) == 0assert "Something went wrong" in trace["errors"] | 2 | 16 | 0 | 96 | 2 | 795 | 811 | 795 | ['logs', 'trace'] | None | {"Assign": 2, "Expr": 1, "Try": 1, "With": 1} | 6 | 17 | 6 | ["unify.Traced", "ValueError", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_with_traced_context_w_exception) defined within the public class called public.The function start at line 795 and ends at 811. It contains 16 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 declares 6.0 functions, and It has 6.0 functions called inside which are ["unify.Traced", "ValueError", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_with_traced_context_and_traced_fn.some_func | def some_func(a, b):return a + b | 1 | 2 | 2 | 11 | 0 | 817 | 818 | 817 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_with_traced_context_and_traced_fn.some_func) defined within the public class called public.The function start at line 817 and ends at 818. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [817.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_with_traced_context_and_traced_fn | def test_with_traced_context_and_traced_fn():@unify.traceddef some_func(a, b):return a + bwith unify.Traced("Foo"):ret = some_func(1, 2)_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "Foo"assert trace["type"] == "context"assert trace["outputs"] == {"ret": 3}assert len(trace["child_spans"]) == 1assert trace["child_spans"][0]["span_name"] == "some_func"assert trace["child_spans"][0]["type"] == "function" | 1 | 15 | 0 | 115 | 3 | 815 | 832 | 815 | ['logs', 'trace', 'ret'] | Returns | {"Assign": 3, "Expr": 1, "Return": 1, "With": 1} | 6 | 18 | 6 | ["unify.Traced", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_with_traced_context_and_traced_fn) defined within the public class called public.The function start at line 815 and ends at 832. It contains 15 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 declares 6.0 functions, and It has 6.0 functions called inside which are ["unify.Traced", "some_func", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | baz | def baz():return 1 | 1 | 2 | 0 | 6 | 0 | 838 | 839 | 838 | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_locals_py.bar", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_tracebacks_py.test_format_task_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.bar"] | The function (baz) defined within the public class called public.The function start at line 838 and ends at 839. 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 3.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_locals_py.bar", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_tracebacks_py.test_format_task_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.bar"]. | |
unifyai_unify | public | public | 0 | 0 | bar | def bar():x = baz()return x + baz() | 1 | 3 | 0 | 15 | 1 | 842 | 844 | 842 | ['x'] | Returns | {"Assign": 1, "Return": 1} | 2 | 3 | 2 | ["baz", "baz"] | 7 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_nested_decorator_2", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961514_blacktwin_jbops.utility.library_growth_py.plex_released", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_locals_py.foo", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_tracebacks_py.test_format_task_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94634754_pytorch_executorch.exir.program.test.test_program_py.get_config_methods", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.foo", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_w_local_function"] | The function (bar) defined within the public class called public.The function start at line 842 and ends at 844. 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 declares 2.0 functions, It has 2.0 functions called inside which are ["baz", "baz"], It has 7.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_nested_decorator_2", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961514_blacktwin_jbops.utility.library_growth_py.plex_released", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_locals_py.foo", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_tracebacks_py.test_format_task_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94634754_pytorch_executorch.exir.program.test.test_program_py.get_config_methods", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.foo", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_w_local_function"]. | |
unifyai_unify | public | public | 0 | 0 | foo | def foo():return bar() | 1 | 2 | 0 | 8 | 0 | 847 | 848 | 847 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["bar"] | 27 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_background_transaction_decorator_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_background_transaction_decorator_async_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_context_manager_async_await_later", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async_return_awaitable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async_return_awaitable_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_web_transaction_decorator_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_web_transaction_decorator_async_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.unit.test_compat_py.test_unwrap_decorators_one_decorator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_document_py.test_bare_decorator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_document_py.test_decorator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_nested_decorator_2", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3950047_swistakm_pyimgui.tests.test_crazy_callbacks_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_funcutils_fb_py3_py.test_wraps_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3967063_matthew_brett_delocate.delocate.tests.test_tools_py.test_ensure_writable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69559863_google_vizier.vizier._src.pyglove.pythia_test_py.TunerPolicyTest.test_random_algorithm_on_simple_search_space", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_from_awaitable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_from_awaitable__raises_cancel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_from_awaitable__sleeping_is_cancelled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_transitions_to", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_locals_py.assert_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_tracebacks_py.test_format_task_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.78343331_desh2608_gss.gss.wpe.wpe_py.window_mean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_chained_methods"] | The function (foo) defined within the public class called public.The function start at line 847 and ends at 848. 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 which is ["bar"], It has 27.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_background_transaction_decorator_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_background_transaction_decorator_async_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_context_manager_async_await_later", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async_return_awaitable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_instrument_decorator_async_return_awaitable_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_web_transaction_decorator_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.integration.test_api_py.test_web_transaction_decorator_async_misconfigured", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.unit.test_compat_py.test_unwrap_decorators_one_decorator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_document_py.test_bare_decorator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_document_py.test_decorator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913804_knio_dominate.tests.test_html_py.test_nested_decorator_2", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3950047_swistakm_pyimgui.tests.test_crazy_callbacks_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3957920_mahmoud_boltons.tests.test_funcutils_fb_py3_py.test_wraps_async", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3967063_matthew_brett_delocate.delocate.tests.test_tools_py.test_ensure_writable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69559863_google_vizier.vizier._src.pyglove.pythia_test_py.TunerPolicyTest.test_random_algorithm_on_simple_search_space", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_from_awaitable", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_from_awaitable__raises_cancel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_from_awaitable__sleeping_is_cancelled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.test_services_py.test_Service.test_transitions_to", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_locals_py.assert_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77620428_lqhuang_mode_ng.tests.unit.utils.test_tracebacks_py.test_format_task_stack", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.78343331_desh2608_gss.gss.wpe.wpe_py.window_mean", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_chained_methods"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive | def test_traced_recursive():fn = unify.traced(foo, recursive=True)res = fn()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "foo"assert len(trace["child_spans"]) == 1assert trace["outputs"] == resbar_trace = trace["child_spans"][0]assert bar_trace["span_name"] == "bar"assert len(bar_trace["child_spans"]) == 2assert bar_trace["child_spans"][0]["span_name"] == "baz"assert bar_trace["child_spans"][0]["outputs"] == 1assert bar_trace["child_spans"][1]["span_name"] == "baz"assert bar_trace["child_spans"][1]["outputs"] == 1assert bar_trace["outputs"] == 2 | 1 | 18 | 0 | 158 | 5 | 852 | 871 | 852 | ['fn', 'res', 'trace', 'logs', 'bar_trace'] | None | {"Assign": 5, "Expr": 1} | 7 | 20 | 7 | ["unify.traced", "fn", "_wait_for_trace_logger", "unify.get_logs", "len", "len", "len"] | 0 | [] | The function (test_traced_recursive) defined within the public class called public.The function start at line 852 and ends at 871. It contains 18 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 functions called inside which are ["unify.traced", "fn", "_wait_for_trace_logger", "unify.get_logs", "len", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_w_local_function.test_traced_recursive_w_local_function.bar.foo | def foo(i):return i | 1 | 2 | 1 | 7 | 0 | 878 | 879 | 878 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_w_local_function.test_traced_recursive_w_local_function.bar.foo) defined within the public class called public.The function start at line 878 and ends at 879. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_w_local_function.bar | def bar():def foo(i):return ireturn foo(1) + foo(2) | 1 | 3 | 0 | 16 | 0 | 877 | 881 | 877 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_w_local_function.bar) defined within the public class called public.The function start at line 877 and ends at 881. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_w_local_function | def test_traced_recursive_w_local_function():@unify.traced(recursive=True)def bar():def foo(i):return ireturn foo(1) + foo(2)res = bar()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "bar"assert trace["outputs"] == resassert len(trace["child_spans"]) == 2assert trace["child_spans"][0]["span_name"] == "foo"assert trace["child_spans"][0]["inputs"] == {"i": 1}assert trace["child_spans"][0]["outputs"] == 1assert trace["child_spans"][1]["span_name"] == "foo"assert trace["child_spans"][1]["inputs"] == {"i": 2}assert trace["child_spans"][1]["outputs"] == 2 | 1 | 17 | 0 | 158 | 3 | 875 | 899 | 875 | ['logs', 'res', 'trace'] | Returns | {"Assign": 3, "Expr": 1, "Return": 2} | 8 | 25 | 8 | ["foo", "foo", "unify.traced", "bar", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_traced_recursive_w_local_function) defined within the public class called public.The function start at line 875 and ends at 899. It contains 17 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 declares 8.0 functions, and It has 8.0 functions called inside which are ["foo", "foo", "unify.traced", "bar", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | A | public | 0 | 0 | __init__ | def __init__(self):self.x = 0 | 1 | 2 | 1 | 10 | 0 | 903 | 904 | 903 | self | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 14,667 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ParameterValidationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.RequestError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Command.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Group.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._context_py.Context.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._option_groups_py.OptionGroupMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Argument.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Option.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._sections_py.SectionMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._util_py.FrozenSpaceMeta.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.AcceptBetween.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.RequireExactly.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._support_py.ConstraintMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.ConstraintViolated.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.UnsatisfiableConstraint.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.tests.test_commands_py.test_group_command_class_is_used_to_create_subcommands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.explorer_py.MainWindow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.search_filter_py.QudFilterModel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudObjTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudPopTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudTreeView.__init__"] | The function (__init__) defined within the public class called A.The function start at line 903 and ends at 904. 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 14667.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.AllocationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ContentError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.ParameterValidationError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.query_py.RequestError.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.http_client_py.HTTPClient.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Command.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._commands_py.Group.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._context_py.Context.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._option_groups_py.OptionGroupMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Argument.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._params_py.Option.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._sections_py.SectionMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup._util_py.FrozenSpaceMeta.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.AcceptBetween.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._core_py.RequireExactly.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints._support_py.ConstraintMixin.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.ConstraintViolated.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.constraints.exceptions_py.UnsatisfiableConstraint.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.cloup.formatting._formatter_py.HelpFormatter.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.18358916_janluke_cloup.tests.test_commands_py.test_group_command_class_is_used_to_create_subcommands", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.explorer_py.MainWindow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.search_filter_py.QudFilterModel.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudObjTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudPopTreeView.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.26231153_trashmonks_qud_wiki.qbe.tree_view_py.QudTreeView.__init__"]. |
unifyai_unify | A | public | 0 | 0 | set_value | def set_value(self, value):self.x = valuereturn self | 1 | 3 | 2 | 14 | 0 | 906 | 908 | 906 | self,value | [] | Returns | {"Assign": 1, "Return": 1} | 0 | 3 | 0 | [] | 41 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574492_gstreamer_gst_python.testsuite.old.test_caps_py.CapsTest.testNoneValue", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.field_py.FieldSet.set_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3678342_kieranjol_ifiscripts.pymmconfig_py.add_db_credentials", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3678342_kieranjol_ifiscripts.pymmconfig_py.select_option", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3954907_linuxmint_mintmenu.usr.lib.linuxmint.mintMenu.plugins.applications_py.pluginclass.Filter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70178690_paddlepaddle_paddlers.paddlers.models.ppgan.models.styleganv2_model_py.StyleGAN2Model.model_ema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77509666_iterative_dvc_data.tests.hashfile.test_cache_py.test_pickle_backwards_compat", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77509666_iterative_dvc_data.tests.hashfile.test_cache_py.test_pickle_protocol_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py.LimitFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py.OffsetFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._AssetDependencyFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._DagIdAssetReferenceFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._ExcludeStaleFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._FavoriteFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._HasAssetScheduleFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._OwnersFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._PendingActionsFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._TagsFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.OnlyActiveFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.dag_run_py.get_list_dag_runs_batch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.task_instances_py.get_task_instances_batch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.ui.grid_py.get_dag_structure", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.ui.grid_py.get_grid_runs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.ui.grid_py.get_grid_ti_summaries", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.metrics.otel_logger_py.MetricsMap.set_gauge_value"] | The function (set_value) defined within the public class called A.The function start at line 906 and ends at 908. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [906.0], and this function return a value. It has 41.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574492_gstreamer_gst_python.testsuite.old.test_caps_py.CapsTest.testNoneValue", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3594492_mangroveorg_mangrove.mangrove.form_model.field_py.FieldSet.set_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3678342_kieranjol_ifiscripts.pymmconfig_py.add_db_credentials", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3678342_kieranjol_ifiscripts.pymmconfig_py.select_option", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3954907_linuxmint_mintmenu.usr.lib.linuxmint.mintMenu.plugins.applications_py.pluginclass.Filter", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70178690_paddlepaddle_paddlers.paddlers.models.ppgan.models.styleganv2_model_py.StyleGAN2Model.model_ema", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77509666_iterative_dvc_data.tests.hashfile.test_cache_py.test_pickle_backwards_compat", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.77509666_iterative_dvc_data.tests.hashfile.test_cache_py.test_pickle_protocol_error", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py.LimitFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py.OffsetFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._AssetDependencyFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._DagIdAssetReferenceFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._ExcludeStaleFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._FavoriteFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._HasAssetScheduleFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._OwnersFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._PendingActionsFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.common.parameters_py._TagsFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.assets_py.OnlyActiveFilter.depends", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.dag_run_py.get_list_dag_runs_batch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.public.task_instances_py.get_task_instances_batch", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.ui.grid_py.get_dag_structure", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.ui.grid_py.get_grid_runs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.api_fastapi.core_api.routes.ui.grid_py.get_grid_ti_summaries", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.airflow_core.src.airflow.metrics.otel_logger_py.MetricsMap.set_gauge_value"]. |
unifyai_unify | A | public | 0 | 0 | get_value | def get_value(self):return self.x | 1 | 2 | 1 | 9 | 0 | 910 | 911 | 910 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574492_gstreamer_gst_python.old_examples.debugslider_py.DebugSlider.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3711514_c0d3d3v_moodle_downloader_2.moodle_dl.downloader.extractors.googledrive_py.GoogleDriveIE._real_extract", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.dogpile.cache.region_py.CacheRegion.get_or_create_multi", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913781_flask_restful_flask_restful.flask_restful.fields_py.List.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913781_flask_restful_flask_restful.flask_restful.fields_py.Nested.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913781_flask_restful_flask_restful.flask_restful.fields_py.Raw.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.base_commands_py.FandoghCommand._check_for_error_collection_permission", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.List.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.Nested.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.Polymorph.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.Raw.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70140879_conductor_sdk_conductor_python.src.conductor.shared.automator.utils_py.convert_from_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70140879_conductor_sdk_conductor_python.src.conductor.shared.automator.utils_py.get_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.84727806_quixio_quix_streams.tests.test_quixstreams.test_state.test_rocksdb.test_windowed.test_state_py.test_add_to_collection", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.84727806_quixio_quix_streams.tests.test_quixstreams.test_state.test_rocksdb.test_windowed.test_state_py.test_delete_windows_with_values", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.weaviate.src.airflow.providers.weaviate.hooks.weaviate_py.WeaviateHook._prepare_document_to_uuid_map", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_chained_methods"] | The function (get_value) defined within the public class called A.The function start at line 910 and ends at 911. 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 17.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574492_gstreamer_gst_python.old_examples.debugslider_py.DebugSlider.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3711514_c0d3d3v_moodle_downloader_2.moodle_dl.downloader.extractors.googledrive_py.GoogleDriveIE._real_extract", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719407_sqlalchemy_dogpile_cache.dogpile.cache.region_py.CacheRegion.get_or_create_multi", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913781_flask_restful_flask_restful.flask_restful.fields_py.List.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913781_flask_restful_flask_restful.flask_restful.fields_py.Nested.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913781_flask_restful_flask_restful.flask_restful.fields_py.Raw.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3961676_fandoghpaas_fandogh_cli.fandogh_cli.base_commands_py.FandoghCommand._check_for_error_collection_permission", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.List.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.Nested.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.Polymorph.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3964638_python_restx_flask_restx.flask_restx.fields_py.Raw.output", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70140879_conductor_sdk_conductor_python.src.conductor.shared.automator.utils_py.convert_from_dict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70140879_conductor_sdk_conductor_python.src.conductor.shared.automator.utils_py.get_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.84727806_quixio_quix_streams.tests.test_quixstreams.test_state.test_rocksdb.test_windowed.test_state_py.test_add_to_collection", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.84727806_quixio_quix_streams.tests.test_quixstreams.test_state.test_rocksdb.test_windowed.test_state_py.test_delete_windows_with_values", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94556628_apache_airflow.providers.weaviate.src.airflow.providers.weaviate.hooks.weaviate_py.WeaviateHook._prepare_document_to_uuid_map", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053461_unifyai_unify.tests.test_logging.test_tracing_py.test_traced_recursive_chained_methods"]. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_method.__init__ | def __init__(self):self.x = 0 | 1 | 2 | 1 | 10 | 0 | 917 | 918 | 917 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_method.__init__) defined within the public class called public.The function start at line 917 and ends at 918. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_method.set_value | def set_value(self, value):self.x = valuereturn self | 1 | 3 | 2 | 14 | 0 | 920 | 922 | 920 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_method.set_value) defined within the public class called public.The function start at line 920 and ends at 922. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [920.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_method.get_value | def get_value(self):return self.x | 1 | 2 | 1 | 9 | 0 | 924 | 925 | 924 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_method.get_value) defined within the public class called public.The function start at line 924 and ends at 925. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_method.foo | def foo():a = A()a.set_value(1)return a.get_value() | 1 | 4 | 0 | 21 | 0 | 928 | 931 | 928 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_method.foo) defined within the public class called public.The function start at line 928 and ends at 931. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_method | def test_traced_recursive_method():class A:def __init__(self):self.x = 0def set_value(self, value):self.x = valuereturn selfdef get_value(self):return self.x@unify.traced(recursive=True)def foo():a = A()a.set_value(1)return a.get_value()res = foo()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "foo"assert trace["outputs"] == resassert len(trace["child_spans"]) == 2assert trace["child_spans"][0]["span_name"] == "set_value"assert trace["child_spans"][1]["span_name"] == "get_value" | 1 | 17 | 0 | 107 | 4 | 915 | 942 | 915 | ['logs', 'res', 'trace', 'a'] | Returns | {"Assign": 6, "Expr": 2, "Return": 3} | 9 | 28 | 9 | ["A", "a.set_value", "a.get_value", "unify.traced", "foo", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_traced_recursive_method) defined within the public class called public.The function start at line 915 and ends at 942. It contains 17 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 declares 9.0 functions, and It has 9.0 functions called inside which are ["A", "a.set_value", "a.get_value", "unify.traced", "foo", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_skip_function._bar | def _bar():return 0 | 1 | 2 | 0 | 6 | 0 | 947 | 948 | 947 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_skip_function._bar) defined within the public class called public.The function start at line 947 and ends at 948. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_skip_function._baz | def _baz():return 1 | 1 | 2 | 0 | 6 | 0 | 950 | 951 | 950 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_skip_function._baz) defined within the public class called public.The function start at line 950 and ends at 951. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_skip_function._foo | def _foo():return _bar() + _baz() | 1 | 2 | 0 | 12 | 0 | 954 | 955 | 954 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_skip_function._foo) defined within the public class called public.The function start at line 954 and ends at 955. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_skip_function | def test_traced_recursive_skip_function():def _bar():return 0def _baz():return 1@unify.traced(recursive=True, skip_functions=[_bar])def _foo():return _bar() + _baz()res = _foo()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "_foo"assert trace["outputs"] == resassert len(trace["child_spans"]) == 1assert trace["child_spans"][0]["span_name"] == "_baz"assert trace["child_spans"][0]["outputs"] == 1 | 1 | 15 | 0 | 108 | 3 | 946 | 967 | 946 | ['logs', 'res', 'trace'] | Returns | {"Assign": 3, "Expr": 1, "Return": 3} | 8 | 22 | 8 | ["_bar", "_baz", "unify.traced", "_foo", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_traced_recursive_skip_function) defined within the public class called public.The function start at line 946 and ends at 967. It contains 15 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 declares 8.0 functions, and It has 8.0 functions called inside which are ["_bar", "_baz", "unify.traced", "_foo", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_chained_methods.__init__ | def __init__(self):self.x = 0 | 1 | 2 | 1 | 10 | 0 | 973 | 974 | 973 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_chained_methods.__init__) defined within the public class called public.The function start at line 973 and ends at 974. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_chained_methods.set_value | def set_value(self, value):self.x = valuereturn self | 1 | 3 | 2 | 14 | 0 | 976 | 978 | 976 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_chained_methods.set_value) defined within the public class called public.The function start at line 976 and ends at 978. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [976.0] and does not return any value.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_chained_methods.get_value | def get_value(self):return self.x | 1 | 2 | 1 | 9 | 0 | 980 | 981 | 980 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_chained_methods.get_value) defined within the public class called public.The function start at line 980 and ends at 981. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_chained_methods.foo | def foo():a.set_value(1).get_value() | 1 | 2 | 0 | 14 | 0 | 986 | 987 | 986 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_traced_recursive_chained_methods.foo) defined within the public class called public.The function start at line 986 and ends at 987. 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.. |
unifyai_unify | public | public | 0 | 0 | test_traced_recursive_chained_methods | def test_traced_recursive_chained_methods():class A:def __init__(self):self.x = 0def set_value(self, value):self.x = valuereturn selfdef get_value(self):return self.xa = A()@unify.traced(recursive=True)def foo():a.set_value(1).get_value()foo()_wait_for_trace_logger()logs = unify.get_logs()assert len(logs) == 1trace = logs[0].entries["trace"]assert trace["span_name"] == "foo"assert len(trace["child_spans"]) == 2assert trace["child_spans"][0]["span_name"] == "set_value"assert trace["child_spans"][1]["span_name"] == "get_value"assert trace["child_spans"][1]["outputs"] == 1 | 1 | 18 | 0 | 116 | 3 | 971 | 999 | 971 | ['logs', 'trace', 'a'] | Returns | {"Assign": 5, "Expr": 3, "Return": 2} | 9 | 29 | 9 | ["A", "get_value", "a.set_value", "unify.traced", "foo", "_wait_for_trace_logger", "unify.get_logs", "len", "len"] | 0 | [] | The function (test_traced_recursive_chained_methods) defined within the public class called public.The function start at line 971 and ends at 999. It contains 18 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 declares 9.0 functions, and It has 9.0 functions called inside which are ["A", "get_value", "a.set_value", "unify.traced", "foo", "_wait_for_trace_logger", "unify.get_logs", "len", "len"]. | |
unifyai_unify | public | public | 0 | 0 | test_async_logger | def test_async_logger():try:logs_sync = [unify.log(x=i, y=i * 2, z=i * 3) for i in range(10)]unify.initialize_async_logger()logs_async = [unify.log(x=i, y=i * 2, z=i * 3) for i in range(10)]unify.shutdown_async_logger()assert len(logs_async) == len(logs_sync)for log_async, log_sync in zip(sorted(logs_async, key=lambda x: x.entries["x"]),sorted(logs_sync, key=lambda x: x.entries["x"]),):assert log_async.entries == log_sync.entriesassert unify.ASYNC_LOGGING == Falseexcept Exception as e:unify.shutdown_async_logger()raise e | 5 | 16 | 0 | 157 | 2 | 7 | 24 | 7 | ['logs_sync', 'logs_async'] | None | {"Assign": 2, "Expr": 3, "For": 1, "Try": 1} | 12 | 18 | 12 | ["unify.log", "range", "unify.initialize_async_logger", "unify.log", "range", "unify.shutdown_async_logger", "len", "len", "zip", "sorted", "sorted", "unify.shutdown_async_logger"] | 0 | [] | The function (test_async_logger) defined within the public class called public.The function start at line 7 and ends at 24. It contains 16 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 12.0 functions, and It has 12.0 functions called inside which are ["unify.log", "range", "unify.initialize_async_logger", "unify.log", "range", "unify.shutdown_async_logger", "len", "len", "zip", "sorted", "sorted", "unify.shutdown_async_logger"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_context | def test_create_context():assert len(unify.get_contexts()) == 0unify.create_context("my_context")assert len(unify.get_contexts()) == 1assert "my_context" in unify.get_contexts() | 1 | 5 | 0 | 40 | 0 | 7 | 11 | 7 | [] | None | {"Expr": 1} | 6 | 5 | 6 | ["len", "unify.get_contexts", "unify.create_context", "len", "unify.get_contexts", "unify.get_contexts"] | 0 | [] | The function (test_create_context) defined within the public class called public.The function start at line 7 and ends at 11. 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 6.0 functions, and It has 6.0 functions called inside which are ["len", "unify.get_contexts", "unify.create_context", "len", "unify.get_contexts", "unify.get_contexts"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_contexts_names_only | def test_create_contexts_names_only():assert len(unify.get_contexts()) == 0unify.create_contexts(["foo", "bar"])assert len(unify.get_contexts()) == 2assert "foo" in unify.get_contexts()assert "bar" in unify.get_contexts() | 1 | 6 | 0 | 52 | 0 | 15 | 20 | 15 | [] | None | {"Expr": 1} | 7 | 6 | 7 | ["len", "unify.get_contexts", "unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts"] | 0 | [] | The function (test_create_contexts_names_only) defined within the public class called public.The function start at line 15 and ends at 20. It contains 6 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 functions called inside which are ["len", "unify.get_contexts", "unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_contexts_dicts | def test_create_contexts_dicts():assert len(unify.get_contexts()) == 0unify.create_contexts([{"name": "foo", "description": "bar"},{"name": "bar", "description": "baz"},],)assert len(unify.get_contexts()) == 2assert "foo" in unify.get_contexts()assert "bar" in unify.get_contexts()assert unify.get_context("foo")["description"] == "bar"assert unify.get_context("bar")["description"] == "baz" | 1 | 13 | 0 | 94 | 0 | 24 | 37 | 24 | [] | None | {"Expr": 1} | 9 | 14 | 9 | ["len", "unify.get_contexts", "unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.get_context", "unify.get_context"] | 0 | [] | The function (test_create_contexts_dicts) defined within the public class called public.The function start at line 24 and ends at 37. It contains 13 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 It has 9.0 functions called inside which are ["len", "unify.get_contexts", "unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.get_context", "unify.get_context"]. | |
unifyai_unify | public | public | 0 | 0 | test_create_contexts_nested | def test_create_contexts_nested():unify.create_contexts(["foo","foo/bar","foo/bar/baz",],)assert len(unify.get_contexts()) == 3assert "foo" in unify.get_contexts()assert "foo/bar" in unify.get_contexts()assert "foo/bar/baz" in unify.get_contexts()unify.delete_context("foo")assert len(unify.get_contexts()) == 0# Reverse order should work as wellunify.create_contexts(["foo/bar/baz","foo/bar","foo",],)assert len(unify.get_contexts()) == 3assert "foo" in unify.get_contexts()assert "foo/bar" in unify.get_contexts()assert "foo/bar/baz" in unify.get_contexts() | 1 | 25 | 0 | 119 | 0 | 41 | 69 | 41 | [] | None | {"Expr": 3} | 15 | 29 | 15 | ["unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.delete_context", "len", "unify.get_contexts", "unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts"] | 0 | [] | The function (test_create_contexts_nested) defined within the public class called public.The function start at line 41 and ends at 69. 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 15.0 functions, and It has 15.0 functions called inside which are ["unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.delete_context", "len", "unify.get_contexts", "unify.create_contexts", "len", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts", "unify.get_contexts"]. | |
unifyai_unify | public | public | 0 | 0 | test_get_contexts | def test_get_contexts():assert len(unify.get_contexts()) == 0unify.log(x=0, context="a/b")unify.log(x=1, context="a/b")unify.log(x=0, context="b/c")unify.log(x=1, context="b/c")contexts = unify.get_contexts()assert len(contexts) == 2assert "a/b" in contextsassert "b/c" in contextscontexts = unify.get_contexts(prefix="a")assert len(contexts) == 1assert "a/b" in contextsassert "a/c" not in contextscontexts = unify.get_contexts(prefix="b")assert len(contexts) == 1assert "b/c" in contextsassert "a/b" not in contexts | 1 | 18 | 0 | 137 | 1 | 73 | 90 | 73 | ['contexts'] | None | {"Assign": 3, "Expr": 4} | 12 | 18 | 12 | ["len", "unify.get_contexts", "unify.log", "unify.log", "unify.log", "unify.log", "unify.get_contexts", "len", "unify.get_contexts", "len", "unify.get_contexts", "len"] | 0 | [] | The function (test_get_contexts) defined within the public class called public.The function start at line 73 and ends at 90. It contains 18 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 12.0 functions, and It has 12.0 functions called inside which are ["len", "unify.get_contexts", "unify.log", "unify.log", "unify.log", "unify.log", "unify.get_contexts", "len", "unify.get_contexts", "len", "unify.get_contexts", "len"]. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.