Skip to content

Commit 011aa19

Browse files
committed
Merge branch 'dev' of https://github.com/Code4GovTech/DMP-CMS-Backend-API into supabase_migration_orm
2 parents ac775c3 + e711754 commit 011aa19

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def get_issues_by_owner_id(owner, issue):
265265
if val['body_text']:
266266
if "Weekly Goals" in val['body_text'] and not w_goal_url:
267267
w_goal_url = val['body_text']
268-
plain_text_body = markdown2.markdown(val['body_text'])
268+
plain_text_body = markdown.markdown(val['body_text'])
269269

270270
tasks = re.findall(r'\[(x| )\]', plain_text_body)
271271
total_tasks = len(tasks)

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ python-dotenv==1.0.1
44
supabase==2.4.5
55
gunicorn==22.0.0
66
flasgger==0.9.7.1
7-
markdown2==2.4.13
7+
markdown==3.4.1
88
requests==2.32.2
99
flask-cors==4.0.1
1010
Flask-SQLAlchemy==3.1.1

utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import requests,re,markdown2,os
1+
import requests,re,markdown,os
22
from collections import defaultdict
33
from datetime import datetime, timedelta
44
from dateutil import parser
@@ -115,7 +115,7 @@ def find_week_data(issue_details):
115115

116116
for week in weekly_updates:
117117

118-
plain_text_body = markdown2.markdown(week['val']['body'])
118+
plain_text_body = markdown.markdown(week['val']['body'])
119119

120120
tasks = re.findall(r'\[(x| )\]', plain_text_body)
121121
total_tasks = len(tasks)
@@ -154,7 +154,7 @@ def find_week_avg(url):
154154

155155
if "Weekly Goals" in item['body']:
156156
w_goal_url = item['body']
157-
plain_text_body = markdown2.markdown(issue_details[0]['body'])
157+
plain_text_body = markdown.markdown(issue_details[0]['body'])
158158

159159
tasks = re.findall(r'\[(x| )\]', plain_text_body)
160160
total_tasks = len(tasks)

v2_app.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import traceback,re
22
from flask import Blueprint, jsonify, request
3-
import markdown2
3+
import markdown
44
from utils import require_secret_key
55
from db import SupabaseInterface
66
from utils import determine_week
@@ -51,15 +51,15 @@ def get_issues_by_owner_id_v2(owner, issue):
5151
if val['body_text']:
5252
if ("Weekly Goals" in val['body_text'] and not w_goal_url):
5353
w_goal_url = val['body_text']
54-
plain_text_body = markdown2.markdown(val['body_text'])
54+
plain_text_body = markdown.markdown(val['body_text'])
5555
tasks = re.findall(r'\[(x| )\]', plain_text_body)
5656
total_tasks = len(tasks)
5757
completed_tasks = tasks.count('x')
5858
avg = round((completed_tasks/total_tasks)*100) if total_tasks!=0 else 0
5959

6060
if ("Weekly Learnings" in val['body_text'] and not w_learn_url):
6161
w_learn_url = val['body_text']
62-
plain_text_wurl = markdown2.markdown(val['body_text'])
62+
plain_text_wurl = markdown.markdown(val['body_text'])
6363

6464

6565
# mentors = mentors_data['mentors']

v2_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import logging,re,markdown2
1+
import logging,re,markdown
22

33
# Func to create name and link for all mentors and contributors
44
def define_link_data(usernames):

0 commit comments

Comments
 (0)