Skip to content

Commit

Permalink
fix: Adding the from_date as None!
Browse files Browse the repository at this point in the history
in order not to break anything.
  • Loading branch information
amindadgar committed May 27, 2024
1 parent 9a70f86 commit 6b9fd54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dags/hivemind_etl_helpers/src/utils/modules/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def get_learning_platforms(self):
"community_id": "community1",
"organization_ids": ["1111", "2222"],
"repo_ids": ["132", "45232"],
"from_date": datetime(2024, 1, 1)
# "from_date": datetime(2024, 1, 1)
"from_date": None
}]
```
"""
Expand Down Expand Up @@ -52,6 +53,7 @@ def get_learning_platforms(self):
"organization_ids": [organization_id],
"repo_ids": modules_options.get("repoIds", []),
# "from_date": modules_options["fromDate"],
"from_date": None,
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_get_github_communities_data_single_modules(self):
"organization_ids": ["345678"],
"repo_ids": ["111", "234"],
# "from_date": datetime(2024, 1, 1),
"from_date": None,
},
)

Expand Down Expand Up @@ -156,6 +157,7 @@ def test_get_github_communities_data_multiple_platforms(self):
"organization_ids": ["11111"],
"repo_ids": [],
# "from_date": datetime(2024, 1, 1),
"from_date": None,
},
)
self.assertEqual(
Expand All @@ -165,6 +167,7 @@ def test_get_github_communities_data_multiple_platforms(self):
"organization_ids": ["222222"],
"repo_ids": [],
# "from_date": datetime(2024, 2, 2),
"from_date": None,
},
)

Expand Down Expand Up @@ -309,6 +312,7 @@ def test_get_github_communities_data_multiple_platforms_multiple_communities(
"organization_ids": ["11111"],
"repo_ids": [],
# "from_date": datetime(2024, 1, 1),
"from_date": None,
},
)
elif res["organization_ids"] == ["222222"]:
Expand All @@ -319,6 +323,7 @@ def test_get_github_communities_data_multiple_platforms_multiple_communities(
"organization_ids": ["222222"],
"repo_ids": ["AAAAA"],
# "from_date": datetime(2024, 2, 2),
"from_date": None,
},
)
elif res["organization_ids"] == ["333333"]:
Expand All @@ -329,6 +334,7 @@ def test_get_github_communities_data_multiple_platforms_multiple_communities(
"organization_ids": ["333333"],
"repo_ids": [],
# "from_date": datetime(2024, 3, 1),
"from_date": None,
},
)
else:
Expand Down

0 comments on commit 6b9fd54

Please sign in to comment.