Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: empty memberactivities networkx object! #32

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="tc-analyzer-lib",
version="1.4.8",
version="1.4.9",
author="Mohammad Amin Dadgar, TogetherCrew",
maintainer="Mohammad Amin Dadgar",
maintainer_email="dadgaramin96@gmail.com",
Expand Down
12 changes: 9 additions & 3 deletions tc_analyzer_lib/tc_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,15 @@ def check_platform(self):
f"Platform with platform_id: {self.platform_id} doesn't exist!"
)

def get_latest_networkx_graph(self, member_acitivities_networkx_data: dict):
def get_latest_networkx_graph(
self, member_acitivities_networkx_data: dict
) -> dict | None:
"""
just getting the latest networkx object (latest graph)
"""
latest_date = max(member_acitivities_networkx_data.keys())
return {latest_date: member_acitivities_networkx_data[latest_date]}
# if there was any data availabe
if member_acitivities_networkx_data.keys():
latest_date = max(member_acitivities_networkx_data.keys())
return {latest_date: member_acitivities_networkx_data[latest_date]}
else:
return None
Loading