mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-21 15:13:55 +02:00
Removed dead docstrings
This commit is contained in:
@ -11,14 +11,7 @@ test_company = 13 # 2213 # 13
|
||||
|
||||
|
||||
def find_company_relations(company_id: int) -> pd.DataFrame:
|
||||
"""_summary_.
|
||||
|
||||
Args:
|
||||
company_id (int): _description_
|
||||
|
||||
Returns:
|
||||
pd.DataFrame: _description_
|
||||
"""
|
||||
"""_summary_."""
|
||||
session = connector.get_session(JsonFileConfigProvider("./secrets.json"))
|
||||
query_companies = session.query(entities.Company)
|
||||
query_relations = session.query(entities.CompanyRelation)
|
||||
@ -54,14 +47,7 @@ def find_company_relations(company_id: int) -> pd.DataFrame:
|
||||
|
||||
# Plotly figure
|
||||
def network_graph(company_id: int) -> go.Figure:
|
||||
"""_summary_.
|
||||
|
||||
Args:
|
||||
company_id (int): _description_
|
||||
|
||||
Returns:
|
||||
go.Figure: _description_
|
||||
"""
|
||||
"""_summary_."""
|
||||
edges = []
|
||||
for _, row in find_company_relations(company_id).iterrows():
|
||||
edges.append([row["company_name"], row["connected_company_name"]])
|
||||
@ -136,14 +122,7 @@ def network_graph(company_id: int) -> go.Figure:
|
||||
|
||||
|
||||
def networkx_component(company_id: int) -> html.Div:
|
||||
"""Retruns the Layout with a Graph.
|
||||
|
||||
Args:
|
||||
company_id (int): _description_
|
||||
|
||||
Returns:
|
||||
any: _description_
|
||||
"""
|
||||
"""Returns the Layout with a Graph."""
|
||||
return html.Div(
|
||||
[
|
||||
dcc.Graph(id="my-graph", figure=network_graph(company_id)),
|
||||
|
@ -11,11 +11,7 @@ test_company = 13 # 2213 # 13
|
||||
|
||||
|
||||
def find_all_company_relations() -> pd.DataFrame:
|
||||
"""Searches for all companies and their relation in the DB.
|
||||
|
||||
Returns:
|
||||
pd.DataFrame: _description_
|
||||
"""
|
||||
"""Searches for all companies and their relation in the DB."""
|
||||
session = connector.get_session(JsonFileConfigProvider("./secrets.json"))
|
||||
query_companies = session.query(entities.Company) # .all()
|
||||
query_relations = session.query(entities.CompanyRelation) # .all()
|
||||
@ -57,11 +53,7 @@ def find_all_company_relations() -> pd.DataFrame:
|
||||
|
||||
# Plotly figure
|
||||
def create_network_graph() -> go.Figure:
|
||||
"""Create a NetworkX Graph.
|
||||
|
||||
Returns:
|
||||
go.Figure: _description_
|
||||
"""
|
||||
"""Create a NetworkX Graph."""
|
||||
edges = []
|
||||
for _, row in find_all_company_relations().iterrows():
|
||||
edges.append([row["company_name"], row["connected_company_name"]])
|
||||
|
Reference in New Issue
Block a user