-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplan_sprint.py
39 lines (29 loc) · 1.05 KB
/
plan_sprint.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import settings
from planner.export import CsvExport
from planner.visualise import print_calendar, print_issues
from planner.propose_schedule import Algorithm, propose_schedule
from services.google_calendar import GoogleCalendarEventsClient
from services.jira_client import JiraClient
def main():
jira_client = JiraClient()
issues = jira_client.get_issues_list()
current_sprint = jira_client.get_current_sprint()
google_event_client = GoogleCalendarEventsClient(
start_date=current_sprint.startDate, end_date=current_sprint.endDate
)
calendar = google_event_client.get_calendar_list()
print("Available calendar:\n")
print_calendar(calendar)
result = propose_schedule(
calendar,
issues,
time_per_estimation_point=settings.TIME_PER_ESTIMATION_POINT,
algorithm=Algorithm[settings.ALGORITHM],
)
result.print_stats()
print("Output:\n")
print_calendar(result.schedule)
exporter = CsvExport("sprint_plan", result)
exporter.export_all()
if __name__ == "__main__":
main()