mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-05-13 19:18:47 +02:00
Removed docstring ruins. (#367)
This commit is contained in:
parent
3b2f9b98f2
commit
24c55c68b7
@ -143,7 +143,7 @@ class CompanyMongoService:
|
|||||||
company (Company): _description_
|
company (Company): _description_
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
_type_: _description_
|
_description_
|
||||||
"""
|
"""
|
||||||
with self.lock:
|
with self.lock:
|
||||||
return self.collection.insert_one(company.to_dict())
|
return self.collection.insert_one(company.to_dict())
|
||||||
|
@ -18,17 +18,17 @@ def create_2d_graph( # noqa PLR0913
|
|||||||
"""This Method creates a 2d Network in Plotly with a Scatter Graph and retuns it.
|
"""This Method creates a 2d Network in Plotly with a Scatter Graph and retuns it.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
graph (_type_): NetworkX Graph.
|
graph: NetworkX Graph.
|
||||||
nodes (_type_): List of Nodes
|
nodes: List of Nodes
|
||||||
edges (_type_): List of Edges
|
edges: List of Edges
|
||||||
metrics (_type_): DataFrame with the MEtrics
|
metrics: DataFrame with the Metrics
|
||||||
metric (_type_): Selected Metric
|
metric: Selected Metric
|
||||||
edge_annotation: Enables the Description of Edges
|
edge_annotation: Enables the Description of Edges
|
||||||
edge_thickness: Int Value of the Edge thickness
|
edge_thickness: Int Value of the Edge thickness
|
||||||
layout: String which defines the Graph Layout
|
layout: String which defines the Graph Layout
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
_type_: Plotly Figure
|
Plotly Figure
|
||||||
"""
|
"""
|
||||||
# Set 2D Layout
|
# Set 2D Layout
|
||||||
pos = nx.spring_layout(graph)
|
pos = nx.spring_layout(graph)
|
||||||
@ -87,7 +87,7 @@ def create_2d_graph( # noqa PLR0913
|
|||||||
hoverinfo="none",
|
hoverinfo="none",
|
||||||
mode="lines",
|
mode="lines",
|
||||||
)
|
)
|
||||||
# Add the Edgedescriptiontext to the scatter plot according to its Position.
|
# Add the Edge description text to the scatter plot according to its Position.
|
||||||
edge_weights_trace = go.Scatter(
|
edge_weights_trace = go.Scatter(
|
||||||
x=edge_weight_x,
|
x=edge_weight_x,
|
||||||
y=edge_weight_y,
|
y=edge_weight_y,
|
||||||
@ -144,7 +144,7 @@ def create_2d_graph( # noqa PLR0913
|
|||||||
node_trace.marker.color = colors
|
node_trace.marker.color = colors
|
||||||
node_trace.text = node_names
|
node_trace.text = node_names
|
||||||
|
|
||||||
# Highlight the Node Size in regards to the selected Metric.
|
# Highlight the Node Size with regard to the selected Metric.
|
||||||
if metric != "None":
|
if metric != "None":
|
||||||
node_trace.marker.size = list(np.sqrt(metrics[metric]) * 200)
|
node_trace.marker.size = list(np.sqrt(metrics[metric]) * 200)
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ def create_3d_graph( # noqa : PLR0913
|
|||||||
metric: Selected Metric
|
metric: Selected Metric
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
_type_: Plotly Figure
|
Plotly Figure
|
||||||
"""
|
"""
|
||||||
# 3d spring layout
|
# 3d spring layout
|
||||||
pos = nx.spring_layout(graph, dim=3)
|
pos = nx.spring_layout(graph, dim=3)
|
||||||
|
@ -173,7 +173,7 @@ def create_edge_and_node_list(
|
|||||||
company_relations (pd.DataFrame): _description_
|
company_relations (pd.DataFrame): _description_
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
_type_: _description_
|
_description_
|
||||||
"""
|
"""
|
||||||
nodes: dict = {}
|
nodes: dict = {}
|
||||||
edges: list = []
|
edges: list = []
|
||||||
@ -296,7 +296,7 @@ def create_edge_and_node_list_for_company(
|
|||||||
company_relations (pd.DataFrame): _description_
|
company_relations (pd.DataFrame): _description_
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
_type_: _description_
|
_description_
|
||||||
"""
|
"""
|
||||||
nodes: dict = {}
|
nodes: dict = {}
|
||||||
edges: list = []
|
edges: list = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user