Skip to content

Commit

Permalink
cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswebb09 committed Dec 15, 2023
1 parent fc8fdc5 commit 412efb6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 47 deletions.
4 changes: 3 additions & 1 deletion DirectReport/browserview/reportbp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def team_report():
if request.method == "POST":
json_data = request.get_json()
report_model = ReportModel(json_data["id"], json_data['summary'], json_data['created_at'])
print(report_model)
return render_template('team/teamreport.html', title='Team Report', data=[])


Expand All @@ -74,7 +75,8 @@ def detail(uid=None):
json_data["id"], json_data['entry'], json_data['topic'], json_data['created_at'], json_data['week_id']
)
entry = item.get_entry(uid).to_dict()
return render_template('detail.html', title='Detail', data=reportJSON)
print(entry)
return render_template('detail.html', title='Detail', data=entry)


@reportsbp.route("/getreport/<uid>", methods=['GET'])
Expand Down
43 changes: 0 additions & 43 deletions DirectReport/datadependencies/prompts.py
Original file line number Diff line number Diff line change
@@ -1,44 +1 @@
#!/usr/bin/env python3

global GENERATE_EMAIL_PROMPT_PREFIX
global GENERATE_SUMMARY_PROMPT_PREIX

GENERATE_EMAIL_PROMPT_PREFIX = (
"can you take this data and summarize in professional manner for an email on the team status for my manager?\n"
+ "Data: "
)
GENERATE_SUMMARY_PROMPT_PREIX = (
"can you provide a short summary of what what was accomplished overall along with the time frame it was accomplished in, please categorize the majors improvements in areas_of__focus and please provide individual breakdown based on the following list of team members, list each contributor as a team member, and work using the following "
+ "Format: \n"
+ "{ \n"
+ "'team'"
+ ": [{"
+ "\n 'name'"
+ ": '', "
+ "\n 'accomplishments'"
+ ": '' "
+ " ,"
+ "\n 'commits'"
+ ": '' \n"
+ "}],"
+ "\n'report'"
+ ": {"
+ "\n 'summary'"
+ ": ''"
+ ", \n 'highlights'"
+ ": [{"
+ "\n 'title'"
+ ": '' ,"
+ "\n 'description'"
+ ": '' "
+ "\n }], \n"
+ "'areas_of_focus'"
+ ": [], \n"
+ " 'conclusion'"
+ ": ''"
+ "\n}"
+ "\n}"
+ "\n"
" under no circumstances show the reponse include triple single quotes or extraneous newline characters the response data must use double quotes not single quote. The highlights section must be included in own element outside of the summary, THE RESPONSE MUST BE PROPERLY FORMATTED JSON "
+ "Data:"
)
4 changes: 1 addition & 3 deletions DirectReport/models/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ def __init__(self, uuid, topic, message, created_at, modified_on):
:type created_at: float
:param modified_on: The timestamp when the entry was last modified.
:type modified_on: float
:param week_uuid: The unique identifier for the week.
:type week_uuid: str
"""
self.uuid = uuid
self.topic = topic
Expand Down Expand Up @@ -79,7 +77,7 @@ def from_dict(cls, data):
message = data.get("message")
created_at = datetime.datetime.fromisoformat(data.get("created_at")).timestamp()
modified_on = datetime.datetime.fromisoformat(data.get("modified_on")).timestamp()
return cls(uuid, topic, message, created_at, modified_on, week_uuid)
return cls(uuid, topic, message, created_at, modified_on)

def mark_modified(self):
"""
Expand Down
1 change: 1 addition & 0 deletions DirectReport/models/team_member_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import sqlite3
import uuid
from .team_member import TeamMember


class TeamMemberModel:
Expand Down
1 change: 1 addition & 0 deletions DirectReport/models/team_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import sqlite3
import uuid
from .team import Team


class TeamModel:
Expand Down

0 comments on commit 412efb6

Please sign in to comment.