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
aiondemand_AIOD-rest-api
CaseStudyRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called CaseStudyRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions callin...
aiondemand_AIOD-rest-api
CaseStudyRouter
public
0
1
resource_name
def resource_name(self) -> str:return "case_study"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called CaseStudyRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
CaseStudyRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "case_studies"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called CaseStudyRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
CaseStudyRouter
public
0
1
resource_class
def resource_class(self) -> type[CaseStudy]:return CaseStudy
1
2
1
12
0
19
20
19
self
[]
type[CaseStudy]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called CaseStudyRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
ComputationalAssetRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
11
12
11
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called ComputationalAssetRouter, that inherit another class.The function start at line 11 and ends at 12. 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 20.0 funct...
aiondemand_AIOD-rest-api
ComputationalAssetRouter
public
0
1
resource_name
def resource_name(self) -> str:return "computational_asset"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called ComputationalAssetRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
ComputationalAssetRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "computational_assets"
1
2
1
9
0
19
20
19
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called ComputationalAssetRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
ComputationalAssetRouter
public
0
1
resource_class
def resource_class(self) -> type[ComputationalAsset]:return ComputationalAsset
1
2
1
12
0
23
24
23
self
[]
type[ComputationalAsset]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called ComputationalAssetRouter, that inherit another class.The function start at line 23 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
ContactRouter
public
0
1
__init__
def __init__(self, resource: VersionedResource | None = None):super().__init__(resource)# Ugly hack to avoid "field "organisation" not yet prepared so type is still a ForwardRef"# error. This is caused by the circular relationship between (contact, organisation),# and also between (contact, person). See https://github....
2
6
2
60
0
16
24
16
self,resource
[]
None
{"Assign": 2, "Expr": 2, "For": 1}
3
9
3
["__init__", "super", "model.update_forward_refs"]
8,182
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi...
The function (__init__) defined within the public class called ContactRouter, that inherit another class.The function start at line 16 and ends at 24. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [16.0] and does not return any value. It declares 3.0 function...
aiondemand_AIOD-rest-api
ContactRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
27
28
27
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called ContactRouter, that inherit another class.The function start at line 27 and ends at 28. 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 20.0 functions callin...
aiondemand_AIOD-rest-api
ContactRouter
public
0
1
resource_name
def resource_name(self) -> str:return "contact"
1
2
1
9
0
31
32
31
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called ContactRouter, that inherit another class.The function start at line 31 and ends at 32. 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..
aiondemand_AIOD-rest-api
ContactRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "contacts"
1
2
1
9
0
35
36
35
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called ContactRouter, that inherit another class.The function start at line 35 and ends at 36. 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..
aiondemand_AIOD-rest-api
ContactRouter
public
0
1
resource_class
def resource_class(self) -> type[Contact]:return Contact
1
2
1
12
0
39
40
39
self
[]
type[Contact]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called ContactRouter, that inherit another class.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
ContactRouter
public
0
1
_mask_or_filter
def _mask_or_filter(resources: Sequence[type[Contact]], session: Session, user: KeycloakUser | None) -> Sequence[type[Contact]]:"""Only authenticated users can see the contact email.For the old ai4europe_cms platform, only users with "full_view_ai4europe_cms_resources" rolecan view the contact emails."""for contact in ...
5
10
3
75
0
43
57
43
resources,session,user
[]
Sequence[type[Contact]]
{"Assign": 1, "Expr": 1, "For": 1, "If": 1, "Return": 1}
2
15
2
["user.has_role", "Email"]
0
[]
The function (_mask_or_filter) defined within the public class called ContactRouter, that inherit another class.The function start at line 43 and ends at 57. It contains 10 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [43.0] and does not return any value. It declares 2.0 ...
aiondemand_AIOD-rest-api
DatasetRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
14
15
14
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called DatasetRouter, that inherit another class.The function start at line 14 and ends at 15. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions callin...
aiondemand_AIOD-rest-api
DatasetRouter
public
0
1
resource_name
def resource_name(self) -> str:return "dataset"
1
2
1
9
0
18
19
18
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called DatasetRouter, that inherit another class.The function start at line 18 and ends at 19. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
DatasetRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "datasets"
1
2
1
9
0
22
23
22
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called DatasetRouter, that inherit another class.The function start at line 22 and ends at 23. 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..
aiondemand_AIOD-rest-api
DatasetRouter
public
0
1
resource_class
def resource_class(self) -> type[Dataset]:return Dataset
1
2
1
12
0
26
27
26
self
[]
type[Dataset]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called DatasetRouter, that inherit another class.The function start at line 26 and ends at 27. 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..
aiondemand_AIOD-rest-api
DatasetRouter
public
0
1
schema_converters
def schema_converters(self,) -> dict[str, SchemaConverter[Dataset, SchemaDotOrgDataset | DcatApWrapper]]:return {"schema.org": dataset_converter_schema_dot_org_instance,"dcat-ap": dataset_converter_dcatap_instance,}
1
7
1
31
0
30
36
30
self
[]
dict[str, SchemaConverter[Dataset, SchemaDotOrgDataset | DcatApWrapper]]
{"Return": 1}
0
7
0
[]
0
[]
The function (schema_converters) defined within the public class called DatasetRouter, that inherit another class.The function start at line 30 and ends at 36. 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..
aiondemand_AIOD-rest-api
EducationalResourceRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
11
12
11
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called EducationalResourceRouter, that inherit another class.The function start at line 11 and ends at 12. 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 20.0 func...
aiondemand_AIOD-rest-api
EducationalResourceRouter
public
0
1
resource_name
def resource_name(self) -> str:return "educational_resource"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called EducationalResourceRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
EducationalResourceRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "educational_resources"
1
2
1
9
0
19
20
19
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called EducationalResourceRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
EducationalResourceRouter
public
0
1
resource_class
def resource_class(self) -> type[EducationalResource]:return EducationalResource
1
2
1
12
0
23
24
23
self
[]
type[EducationalResource]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called EducationalResourceRouter, that inherit another class.The function start at line 23 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
EventRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called EventRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions calling th...
aiondemand_AIOD-rest-api
EventRouter
public
0
1
resource_name
def resource_name(self) -> str:return "event"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called EventRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
EventRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "events"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called EventRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
EventRouter
public
0
1
resource_class
def resource_class(self) -> type[Event]:return Event
1
2
1
12
0
19
20
19
self
[]
type[Event]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called EventRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
ExperimentRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called ExperimentRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions calli...
aiondemand_AIOD-rest-api
ExperimentRouter
public
0
1
resource_name
def resource_name(self) -> str:return "experiment"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called ExperimentRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
ExperimentRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "experiments"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called ExperimentRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
ExperimentRouter
public
0
1
resource_class
def resource_class(self) -> type[Experiment]:return Experiment
1
2
1
12
0
19
20
19
self
[]
type[Experiment]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called ExperimentRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
MLModelRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called MLModelRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions calling ...
aiondemand_AIOD-rest-api
MLModelRouter
public
0
1
resource_name
def resource_name(self) -> str:return "ml_model"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called MLModelRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
MLModelRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "ml_models"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called MLModelRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
MLModelRouter
public
0
1
resource_class
def resource_class(self) -> type[MLModel]:return MLModel
1
2
1
12
0
19
20
19
self
[]
type[MLModel]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called MLModelRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
NewsRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called NewsRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions calling thi...
aiondemand_AIOD-rest-api
NewsRouter
public
0
1
resource_name
def resource_name(self) -> str:return "news"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called NewsRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
NewsRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "news"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called NewsRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
NewsRouter
public
0
1
resource_class
def resource_class(self) -> type[News]:return News
1
2
1
12
0
19
20
19
self
[]
type[News]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called NewsRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
27
28
27
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 27 and ends at 28. 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 20.0 functions c...
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
resource_name
def resource_name(self) -> str:return "organisation"
1
2
1
9
0
31
32
31
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 31 and ends at 32. 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..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "organisations"
1
2
1
9
0
35
36
35
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 35 and ends at 36. 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..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
resource_class
def resource_class(self) -> type[Organisation]:return Organisation
1
2
1
12
0
39
40
39
self
[]
type[Organisation]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
validate_image_type
def validate_image_type(self, file: UploadFile):if file.content_type not in ALLOWED_IMAGE_TYPES:raise HTTPException(status_code=HTTPStatus.UNSUPPORTED_MEDIA_TYPE,detail=f"Unsupported file type {file.content_type}. Allowed image types: {ALLOWED_IMAGE_TYPES}.",)
2
6
2
32
0
42
47
42
self,file
[]
None
{"If": 1}
1
6
1
["HTTPException"]
0
[]
The function (validate_image_type) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 42 and ends at 47. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [42.0] and does not return any value. It decla...
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
_get_resource
def _get_resource(self, session: Session, identifier: str) -> Organisation:resource = session.exec(select(Organisation).where(Organisation.identifier == identifier)).one_or_none()if not resource:raise HTTPException(status_code=HTTPStatus.NOT_FOUND,detail=f"Organisation {identifier} not found in the database.",)return r...
2
10
3
60
0
49
58
49
self,session,identifier
[]
Organisation
{"Assign": 1, "If": 1, "Return": 1}
5
10
5
["one_or_none", "session.exec", "where", "select", "HTTPException"]
0
[]
The function (_get_resource) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 49 and ends at 58. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [49.0] and does not return any value. It declares 5...
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
_check_user_can_edit
def _check_user_can_edit(self, user: KeycloakUser, resource: Organisation, resource_name: str):if not (user_can_write(user, resource.aiod_entry)or user.has_role(f"update_{self.resource_name_plural}")):raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,detail=f"You do not have permission to edit {self.resource_na...
4
14
4
78
0
60
74
60
self,user,resource,resource_name
[]
None
{"If": 2}
4
15
4
["user_can_write", "user.has_role", "HTTPException", "HTTPException"]
0
[]
The function (_check_user_can_edit) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 60 and ends at 74. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [60.0] and does not return any value. It dec...
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
read_image_file
async def read_image_file(self, file: UploadFile) -> bytes:blob = await file.read()if len(blob) > MAX_FILE_SIZE_BYTES:raise HTTPException(status_code=HTTPStatus.REQUEST_ENTITY_TOO_LARGE,detail="File too large (max 1MB).",)return blob
2
8
2
43
0
76
83
76
self,file
[]
bytes
{"Assign": 1, "If": 1, "Return": 1}
3
8
3
["file.read", "len", "HTTPException"]
0
[]
The function (read_image_file) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 76 and ends at 83. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [76.0] and does not return any value. It declares ...
aiondemand_AIOD-rest-api
public
public
0
0
add_custom_routes.organisation_image
async def organisation_image(identifier: str,file: UploadFile = File(...),name: str = Query(..., description="Uploaded image filename", example="logo"),session=Depends(get_session),user: KeycloakUser | None = Depends(get_user_or_raise),):self.validate_image_type(file)try:resource = self._get_resource(session, identifie...
5
29
2
219
0
95
135
95
null
[]
None
null
0
0
0
null
0
null
The function (add_custom_routes.organisation_image) defined within the public class called public.The function start at line 95 and ends at 135. It contains 29 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [95.0] and does not return any value..
aiondemand_AIOD-rest-api
public
public
0
0
add_custom_routes.organisation_image
async def organisation_image(identifier: str,file: UploadFile = File(...),name: str = Query(...),session=Depends(get_session),user: KeycloakUser | None = Depends(get_user_or_raise),):self.validate_image_type(file)try:resource = self._get_resource(session, identifier)self._check_user_can_edit(user, resource, self.resour...
7
31
2
211
0
138
176
138
null
[]
None
null
0
0
0
null
0
null
The function (add_custom_routes.organisation_image) defined within the public class called public.The function start at line 138 and ends at 176. It contains 31 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [138.0] and does not return any value..
aiondemand_AIOD-rest-api
public
public
0
0
add_custom_routes.organisation_image
async def organisation_image(identifier: str,session=Depends(get_session),user: KeycloakUser | None = Depends(get_user_or_none),):org = session.exec(select(Organisation).where(Organisation.identifier == identifier)).one_or_none()if not org:raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail=f"Organisation {ide...
4
18
2
109
0
179
199
179
null
[]
None
null
0
0
0
null
0
null
The function (add_custom_routes.organisation_image) defined within the public class called public.The function start at line 179 and ends at 199. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [179.0] and does not return any value..
aiondemand_AIOD-rest-api
public
public
0
0
add_custom_routes.organisation_image
async def organisation_image(identifier: str,name: str = Query(..., description="Name of the image to delete"),session=Depends(get_session),user: KeycloakUser | None = Depends(get_user_or_raise),):try:resource = session.exec(select(Organisation).where(Organisation.identifier == identifier)).one_or_none()if not resource...
8
36
3
198
0
204
243
204
null
[]
None
null
0
0
0
null
0
null
The function (add_custom_routes.organisation_image) defined within the public class called public.The function start at line 204 and ends at 243. It contains 36 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [204.0] and does not return any value..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
add_custom_routes
def add_custom_routes(self, router: APIRouter, path: str):""" "Organisation image endpoints.Currently supports POST, PUT, GET, DELETE (image blob, ex. logo) for an Organisation.This is the only resource with image support at the moment,but the logic can be extended to other resource types in the future if needed."""@ro...
1
11
3
86
0
85
243
85
self,router,path
[]
Returns
{"Assign": 15, "Expr": 19, "For": 1, "If": 8, "Return": 4, "Try": 5}
66
159
66
["File", "Query", "Depends", "Depends", "self.validate_image_type", "self._get_resource", "self._check_user_can_edit", "any", "HTTPException", "self.read_image_file", "media_cls", "resource.media.append", "session.add", "session.add", "session.commit", "self._raise_clean_http_exception", "self._raise_clean_http_excepti...
0
[]
The function (add_custom_routes) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 85 and ends at 243. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [85.0], and this function return a value. It d...
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
create
def create(self, url_prefix: str, version: Version = Version.LATEST) -> APIRouter:router = super().create(url_prefix)path = f"/{self.resource_name_plural}/{{identifier}}/image"self.add_custom_routes(router, path)return router
1
5
3
43
0
245
251
245
self,url_prefix,version
[]
APIRouter
{"Assign": 2, "Expr": 1, "Return": 1}
3
7
3
["create", "super", "self.add_custom_routes"]
158
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.frigg.deployments.managers_py.PRDeploymentManager.create", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3635000_umutbozkurt_django_rest_framework_mongoengine.tests.test_reference_py.ComboRefe...
The function (create) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 245 and ends at 251. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [245.0] and does not return any value. It declares 3.0 fu...
aiondemand_AIOD-rest-api
public
public
0
0
get_resources_func.get_resources
def get_resources(pagination: PaginationParams,resource_filters: ResourceFiltersParams,schema: self._possible_schemas_type = "aiod",# type:ignoreget_image: bool = Query(False, description="Include image bytes in response?"),user: KeycloakUser | None = Depends(get_user_or_none),):return self.get_resources(schema=schema,...
1
14
5
70
0
254
267
254
null
[]
None
null
0
0
0
null
0
null
The function (get_resources_func.get_resources) defined within the public class called public.The function start at line 254 and ends at 267. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [254.0] and does not return any value..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
get_resources_func
def get_resources_func(self):def get_resources(pagination: PaginationParams,resource_filters: ResourceFiltersParams,schema: self._possible_schemas_type = "aiod",# type:ignoreget_image: bool = Query(False, description="Include image bytes in response?"),user: KeycloakUser | None = Depends(get_user_or_none),):return self...
1
3
1
9
0
253
269
253
self
[]
Returns
{"Return": 2}
3
17
3
["Query", "Depends", "self.get_resources"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915747_balena_io_balena_sdk_python.tests.functional.models.test_tag_py.BaseTagTest.test_remove"]
The function (get_resources_func) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 253 and ends at 269. 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 dec...
aiondemand_AIOD-rest-api
public
public
0
0
get_resource_func.get_resource
def get_resource(identifier: str,schema: self._possible_schemas_type = "aiod",# type: ignoreget_image: bool = Query(False, description="Include image bytes in response?"),user: KeycloakUser | None = Depends(get_user_or_none),):resource = self.get_resource(identifier=identifier, schema=schema, user=user, platform=None, ...
1
10
4
68
0
278
288
278
null
[]
None
null
0
0
0
null
0
null
The function (get_resource_func.get_resource) defined within the public class called public.The function start at line 278 and ends at 288. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [278.0] and does not return any value..
aiondemand_AIOD-rest-api
OrganisationRouter
public
0
1
get_resource_func
def get_resource_func(self):"""Return a function that can be used to retrieve a single resource.This function returns a function (instead of being that function directly) because thedocstring and the variables are dynamic, and used in Swagger."""def get_resource(identifier: str,schema: self._possible_schemas_type = "ai...
1
3
1
10
0
271
290
271
self
[]
Returns
{"Assign": 1, "Expr": 1, "Return": 2}
3
20
3
["Query", "Depends", "self.get_resource"]
0
[]
The function (get_resource_func) defined within the public class called OrganisationRouter, that inherit another class.The function start at line 271 and ends at 290. 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 decl...
aiondemand_AIOD-rest-api
PersonRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
11
12
11
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called PersonRouter, that inherit another class.The function start at line 11 and ends at 12. 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 20.0 functions calling...
aiondemand_AIOD-rest-api
PersonRouter
public
0
1
resource_name
def resource_name(self) -> str:return "person"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called PersonRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
PersonRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "persons"
1
2
1
9
0
19
20
19
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called PersonRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
PersonRouter
public
0
1
resource_class
def resource_class(self) -> type[Person]:return Person
1
2
1
12
0
23
24
23
self
[]
type[Person]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called PersonRouter, that inherit another class.The function start at line 23 and ends at 24. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
PersonRouter
public
0
1
_mask_or_filter
def _mask_or_filter(resources: Sequence[type[Person]], session: Session, user: KeycloakUser | None) -> Sequence[type[Person]]:"""For the old ai4europe_cms platform, only users with "full_view_ai4europe_cms_resources"role can see the person's sensitive information."""for person in resources:if (person.platform == Platfo...
5
11
3
77
0
27
41
27
resources,session,user
[]
Sequence[type[Person]]
{"Assign": 3, "Expr": 1, "For": 1, "If": 1, "Return": 1}
1
15
1
["user.has_role"]
0
[]
The function (_mask_or_filter) defined within the public class called PersonRouter, that inherit another class.The function start at line 27 and ends at 41. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [27.0] and does not return any value. It declare 1.0 fu...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
__init__
def __init__(self):self.resource_class_create = resource_create(self.resource_class)self.resource_class_read = resource_read(self.resource_class)
1
3
1
25
0
30
32
30
self
[]
None
{"Assign": 2}
2
3
2
["resource_create", "resource_read"]
8,182
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15197461_googleapis_python_cloud_core.google.cloud._helpers.__init___py._LocalStack.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16798231_kapji_capital_gains_calculator.cgt_calc.exceptions_py.AmountMissi...
The function (__init__) defined within the public class called PlatformRouter.The function start at line 30 and ends at 32. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
version
def version(self) -> int:return 1
1
2
1
9
0
35
36
35
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called PlatformRouter.The function start at line 35 and ends at 36. 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 20.0 functions calling this function which are [...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
resource_name
def resource_name(self) -> str:return "platform"
1
2
1
9
0
39
40
39
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called PlatformRouter.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
resource_name_plural
def resource_name_plural(self) -> str:return "platforms"
1
2
1
9
0
43
44
43
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called PlatformRouter.The function start at line 43 and ends at 44. 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..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
resource_class
def resource_class(self) -> type[Platform]:return Platform
1
2
1
12
0
47
48
47
self
[]
type[Platform]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called PlatformRouter.The function start at line 47 and ends at 48. 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..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
create
def create(self, url_prefix: str, version: Version) -> APIRouter:router = APIRouter()default_kwargs = {"response_model_exclude_none": True,"deprecated": False,"tags": [self.resource_name_plural],}response_model = self.resource_class_read# type:ignoreresponse_model_plural = list[self.resource_class_read]# type:ignorerou...
1
59
3
283
0
50
113
50
self,url_prefix,version
[]
APIRouter
{"Assign": 4, "Expr": 6, "Return": 1}
13
64
13
["APIRouter", "router.add_api_route", "self.get_resources_func", "router.add_api_route", "self.get_resource_count_func", "router.add_api_route", "self.register_resource_func", "router.add_api_route", "self.get_resource_func", "router.add_api_route", "self.put_resource_func", "router.add_api_route", "self.delete_resourc...
158
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.frigg.deployments.managers_py.PRDeploymentManager.create", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3635000_umutbozkurt_django_rest_framework_mongoengine.tests.test_reference_py.ComboRefe...
The function (create) defined within the public class called PlatformRouter.The function start at line 50 and ends at 113. It contains 59 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [50.0] and does not return any value. It declares 13.0 functions, It has 13.0 functions c...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
get_resources
def get_resources(self, pagination: Pagination):"""Fetch all resources."""with DbSession(autoflush=False) as session:try:resources: Any = self._retrieve_resources(session, pagination)return [self.resource_class_read.model_validate(resource) for resource in resources]except Exception as e:raise as_http_exception(e)
3
7
2
59
0
115
122
115
self,pagination
[]
Returns
{"AnnAssign": 1, "Expr": 1, "Return": 1, "Try": 1, "With": 1}
4
8
4
["DbSession", "self._retrieve_resources", "self.resource_class_read.model_validate", "as_http_exception"]
0
[]
The function (get_resources) defined within the public class called PlatformRouter.The function start at line 115 and ends at 122. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [115.0], and this function return a value. It declares 4.0 functions, and It has ...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
get_resource
def get_resource(self, identifier: str):"""Get the resource identified by AIoD identifier."""try:with DbSession(autoflush=False) as session:resource: Any = self._retrieve_resource(session, identifier)return self.resource_class_read.model_validate(resource)except Exception as e:raise as_http_exception(e)
2
7
2
53
0
124
131
124
self,identifier
[]
Returns
{"AnnAssign": 1, "Expr": 1, "Return": 1, "Try": 1, "With": 1}
4
8
4
["DbSession", "self._retrieve_resource", "self.resource_class_read.model_validate", "as_http_exception"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70001713_aws_controllers_k8s_test_infra.src.acktest.k8s.resource_py.get_resource_condition", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70001713_aws_controllers_k8s_test_infra.src.acktest.k8s.resource_py.get_reso...
The function (get_resource) defined within the public class called PlatformRouter.The function start at line 124 and ends at 131. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [124.0], and this function return a value. It declares 4.0 functions, It has 4.0 fu...
aiondemand_AIOD-rest-api
public
public
0
0
get_resources_func.get_resources
def get_resources(pagination: PaginationParams):resources = self.get_resources(pagination=pagination)return resources
1
3
1
19
0
140
142
140
null
[]
None
null
0
0
0
null
0
null
The function (get_resources_func.get_resources) defined within the public class called public.The function start at line 140 and ends at 142. 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..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
get_resources_func
def get_resources_func(self):"""Return a function that can be used to retrieve a list of resources.This function returns a function (instead of being that function directly) because thedocstring and the variables are dynamic, and used in Swagger."""def get_resources(pagination: PaginationParams):resources = self.get_re...
1
3
1
10
0
133
144
133
self
[]
Returns
{"Assign": 1, "Expr": 1, "Return": 2}
1
12
1
["self.get_resources"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3915747_balena_io_balena_sdk_python.tests.functional.models.test_tag_py.BaseTagTest.test_remove"]
The function (get_resources_func) defined within the public class called PlatformRouter.The function start at line 133 and ends at 144. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 fu...
aiondemand_AIOD-rest-api
public
public
0
0
get_resource_count_func.get_resource_count
def get_resource_count():try:with DbSession() as session:return session.query(self.resource_class).count()except Exception as e:raise as_http_exception(e)
2
6
0
36
0
153
159
153
null
[]
None
null
0
0
0
null
0
null
The function (get_resource_count_func.get_resource_count) defined within the public class called public.The function start at line 153 and ends at 159. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
get_resource_count_func
def get_resource_count_func(self):"""Gets the total number of resources from the database.This function returns a function (instead of being that function directly) because thedocstring and the variables are dynamic, and used in Swagger."""def get_resource_count():try:with DbSession() as session:return session.query(se...
1
3
1
10
0
146
161
146
self
[]
Returns
{"Expr": 1, "Return": 2, "Try": 1, "With": 1}
4
16
4
["DbSession", "count", "session.query", "as_http_exception"]
0
[]
The function (get_resource_count_func) defined within the public class called PlatformRouter.The function start at line 146 and ends at 161. 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 4.0 functions, and I...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
get_resource_func
def get_resource_func(self):"""Return a function that can be used to retrieve a single resource.This function returns a function (instead of being that function directly) because thedocstring and the variables are dynamic, and used in Swagger."""return self.get_resource
1
2
1
10
0
163
170
163
self
[]
Returns
{"Expr": 1, "Return": 1}
0
8
0
[]
0
[]
The function (get_resource_func) defined within the public class called PlatformRouter.The function start at line 163 and ends at 170. 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..
aiondemand_AIOD-rest-api
public
public
0
0
register_resource_func.register_resource
def register_resource(resource_create: clz_create,# type: ignoreuser: KeycloakUser = Depends(get_user_or_raise),):if not user.has_role("create_platforms"):raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,detail=f"You do not have permission to create {self.resource_name_plural}.",)try:with DbSession() as sessio...
4
18
2
95
0
180
197
180
null
[]
None
null
0
0
0
null
0
null
The function (register_resource_func.register_resource) defined within the public class called public.The function start at line 180 and ends at 197. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [180.0] and does not return any value..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
register_resource_func
def register_resource_func(self):"""Return a function that can be used to register a resource.This function returns a function (instead of being that function directly) because thedocstring is dynamic and used in Swagger."""clz_create = self.resource_class_createdef register_resource(resource_create: clz_create,# type:...
1
4
1
15
0
172
199
172
self
[]
Returns
{"Assign": 2, "Expr": 2, "If": 1, "Return": 2, "Try": 2, "With": 1}
7
28
7
["Depends", "user.has_role", "HTTPException", "DbSession", "self.create_resource", "self._raise_clean_http_exception", "as_http_exception"]
0
[]
The function (register_resource_func) defined within the public class called PlatformRouter.The function start at line 172 and ends at 199. It contains 4 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 7.0 functions, and It...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
create_resource
def create_resource(self, session: Session, resource_create_instance: SQLModel, user: KeycloakUser | None = None):"""Store a resource in the database"""resource = self.resource_class.model_validate(resource_create_instance)deserialize_resource_relationships(session, self.resource_class, resource, resource_create_instan...
1
10
4
59
0
201
211
201
self,session,resource_create_instance,user
[]
Returns
{"Assign": 1, "Expr": 4, "Return": 1}
4
11
4
["self.resource_class.model_validate", "deserialize_resource_relationships", "session.add", "session.commit"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70001713_aws_controllers_k8s_test_infra.src.acktest.k8s.resource_py.load_and_create_resource"]
The function (create_resource) defined within the public class called PlatformRouter.The function start at line 201 and ends at 211. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [201.0], and this function return a value. It declares 4.0 functions, It has 4....
aiondemand_AIOD-rest-api
public
public
0
0
put_resource_func.put_resource
def put_resource(identifier: int,resource_create_instance: clz_create,# type: ignoreuser: KeycloakUser = Depends(get_user_or_raise),):if not user.has_role("update_platforms"):raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,detail=f"You do not have permission to edit {self.resource_name_plural}.",)with DbSessi...
6
28
3
158
0
221
249
221
null
[]
None
null
0
0
0
null
0
null
The function (put_resource_func.put_resource) defined within the public class called public.The function start at line 221 and ends at 249. It contains 28 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [221.0] and does not return any value..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
put_resource_func
def put_resource_func(self):"""Return a function that can be used to update a resource.This function returns a function (instead of being that function directly) because thedocstring is dynamic and used in Swagger."""clz_create = self.resource_class_createdef put_resource(identifier: int,resource_create_instance: clz_c...
1
4
1
15
0
213
251
213
self
[]
Returns
{"AnnAssign": 1, "Assign": 2, "Expr": 6, "For": 1, "If": 2, "Return": 2, "Try": 2, "With": 1}
14
39
14
["Depends", "user.has_role", "HTTPException", "DbSession", "self._retrieve_resource", "resource.schema", "hasattr", "getattr", "setattr", "deserialize_resource_relationships", "session.merge", "session.commit", "self._raise_clean_http_exception", "self._raise_clean_http_exception"]
0
[]
The function (put_resource_func) defined within the public class called PlatformRouter.The function start at line 213 and ends at 251. It contains 4 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 14.0 functions, and It has...
aiondemand_AIOD-rest-api
public
public
0
0
delete_resource_func.delete_resource
def delete_resource(identifier: str,user: KeycloakUser = Depends(get_user_or_raise),):with DbSession() as session:if not user.has_role("delete_platforms"):raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,detail=f"You do not have permission to delete {self.resource_name_plural}.",)try:# Raise error if it does n...
3
17
2
85
0
260
277
260
null
[]
None
null
0
0
0
null
0
null
The function (delete_resource_func.delete_resource) defined within the public class called public.The function start at line 260 and ends at 277. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [260.0] and does not return any value..
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
delete_resource_func
def delete_resource_func(self):"""Return a function that can be used to delete a resource.This function returns a function (instead of being that function directly) because thedocstring is dynamic and used in Swagger."""def delete_resource(identifier: str,user: KeycloakUser = Depends(get_user_or_raise),):with DbSession...
1
3
1
10
0
253
279
253
self
[]
Returns
{"AnnAssign": 1, "Expr": 3, "If": 1, "Return": 2, "Try": 1, "With": 1}
8
27
8
["Depends", "DbSession", "user.has_role", "HTTPException", "self._retrieve_resource", "session.delete", "session.commit", "as_http_exception"]
0
[]
The function (delete_resource_func) defined within the public class called PlatformRouter.The function start at line 253 and ends at 279. 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 8.0 functions, and It h...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
_retrieve_resource
def _retrieve_resource(self,session: Session,identifier: int | str,) -> Platform:"""Retrieve a resource from the database based on the provided identifier."""query = select(self.resource_class).where(self.resource_class.identifier == identifier)resource = session.scalars(query).first()if not resource:name = f"{self.res...
2
12
3
77
0
281
294
281
self,session,identifier
[]
Platform
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1}
6
14
6
["where", "select", "first", "session.scalars", "self.resource_name.capitalize", "HTTPException"]
0
[]
The function (_retrieve_resource) defined within the public class called PlatformRouter.The function start at line 281 and ends at 294. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [281.0] and does not return any value. It declares 6.0 functions, and It ha...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
_retrieve_resources
def _retrieve_resources(self,session: Session,pagination: Pagination,) -> Sequence[Platform]:"""Retrieve a sequence of resources from the database based on the provided identifier."""query = select(self.resource_class).offset(pagination.offset).limit(pagination.limit)resources: Sequence = session.scalars(query).all()re...
1
8
3
58
0
296
306
296
self,session,pagination
[]
Sequence[Platform]
{"AnnAssign": 1, "Assign": 1, "Expr": 1, "Return": 1}
5
11
5
["limit", "offset", "select", "all", "session.scalars"]
0
[]
The function (_retrieve_resources) defined within the public class called PlatformRouter.The function start at line 296 and ends at 306. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [296.0] and does not return any value. It declares 5.0 functions, and It ha...
aiondemand_AIOD-rest-api
PlatformRouter
public
0
0
_raise_clean_http_exception
def _raise_clean_http_exception(self, e: Exception, session: Session):"""Raise an understandable exception based on this SQL IntegrityError."""session.rollback()if isinstance(e, HTTPException):raise eif len(e.args) == 0:traceback.print_exc()raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,detail="U...
8
25
3
146
0
308
336
308
self,e,session
[]
None
{"Assign": 3, "Expr": 3, "If": 4}
8
29
8
["session.rollback", "isinstance", "len", "traceback.print_exc", "HTTPException", "HTTPException", "error.split", "HTTPException"]
0
[]
The function (_raise_clean_http_exception) defined within the public class called PlatformRouter.The function start at line 308 and ends at 336. It contains 25 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [308.0] and does not return any value. It declares 8.0 functions, a...
aiondemand_AIOD-rest-api
ProjectRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called ProjectRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions calling ...
aiondemand_AIOD-rest-api
ProjectRouter
public
0
1
resource_name
def resource_name(self) -> str:return "project"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called ProjectRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
ProjectRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "projects"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called ProjectRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
ProjectRouter
public
0
1
resource_class
def resource_class(self) -> type[Project]:return Project
1
2
1
12
0
19
20
19
self
[]
type[Project]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called ProjectRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
PublicationRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called PublicationRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions call...
aiondemand_AIOD-rest-api
PublicationRouter
public
0
1
resource_name
def resource_name(self) -> str:return "publication"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called PublicationRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
PublicationRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "publications"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called PublicationRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
PublicationRouter
public
0
1
resource_class
def resource_class(self) -> type[Publication]:return Publication
1
2
1
12
0
19
20
19
self
[]
type[Publication]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called PublicationRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
ResourceBundleRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called ResourceBundleRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions c...
aiondemand_AIOD-rest-api
ResourceBundleRouter
public
0
1
resource_name
def resource_name(self) -> str:return "resource_bundle"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called ResourceBundleRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
ResourceBundleRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "resource_bundles"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called ResourceBundleRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
aiondemand_AIOD-rest-api
ResourceBundleRouter
public
0
1
resource_class
def resource_class(self) -> type[ResourceBundle]:return ResourceBundle
1
2
1
12
0
19
20
19
self
[]
type[ResourceBundle]
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_class) defined within the public class called ResourceBundleRouter, that inherit another class.The function start at line 19 and ends at 20. 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..
aiondemand_AIOD-rest-api
ServiceRouter
public
0
1
version
def version(self) -> int:return 1
1
2
1
9
0
7
8
7
self
[]
int
{"Return": 1}
0
2
0
[]
20
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719382_myint_rstcheck.src.rstcheck._cli_py.version_callback", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3913638_scijava_scyjava.src.scyjava._versions_py.get_version", "_.content.gdrive.MyDrive.Phd_Thesis.Datase...
The function (version) defined within the public class called ServiceRouter, that inherit another class.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 20.0 functions calling ...
aiondemand_AIOD-rest-api
ServiceRouter
public
0
1
resource_name
def resource_name(self) -> str:return "service"
1
2
1
9
0
11
12
11
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name) defined within the public class called ServiceRouter, that inherit another class.The function start at line 11 and ends at 12. 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..
aiondemand_AIOD-rest-api
ServiceRouter
public
0
1
resource_name_plural
def resource_name_plural(self) -> str:return "services"
1
2
1
9
0
15
16
15
self
[]
str
{"Return": 1}
0
2
0
[]
0
[]
The function (resource_name_plural) defined within the public class called ServiceRouter, that inherit another class.The function start at line 15 and ends at 16. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..