Skip to content

Commit 29d30fd

Browse files
authored
Merge pull request #253 from Seluj78/removed-todos
Removed all TODOs (Moved to issues)
2 parents 3dd386e + bf18516 commit 29d30fd

File tree

9 files changed

+0
-21
lines changed

9 files changed

+0
-21
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ services:
1111
- mysql
1212
- redis
1313

14-
# TODO: Reformat file as it is ugly. separatee jobs in yml, and lint as the last job to run
15-
1614
jobs:
1715
include:
1816
- stage: build

backend/PyMatcha/routes/api/auth/password.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838

3939
auth_password_bp = Blueprint("auth_password", __name__)
4040

41-
# TODO: Test to reset password in postman
42-
4341

4442
@auth_password_bp.route("/auth/password/forgot", methods=["POST"])
4543
@validate_params(REQUIRED_KEYS_PASSWORD_FORGOT)

backend/PyMatcha/routes/api/like.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def like_profile(uid):
3636
superlike_counter = int(redis.get(f"superlikes:{current_user.id}"))
3737
if superlike_counter <= 0:
3838
set_user_superlikes.apply_async(current_user.id, amount=5, eta=86400)
39-
# TODO: Test this in postman
4039
raise BadRequestError("No more superlikes today !", "Try later")
4140
else:
4241
redis.decr(f"superlikes:{current_user.id}")

backend/PyMatcha/routes/api/messages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def send_message():
7777
@messages_bp.route("/conversations/<with_uid>", methods=["GET"])
7878
@jwt_required
7979
def get_conversation_messsages(with_uid):
80-
# TODO: Limit to 200 messages and if need be get more
8180
try:
8281
with_user = get_user(with_uid)
8382
except NotFoundError:

backend/PyMatcha/utils/orm/_model.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ def delete(self):
216216
logging.fatal("{} Not in table {}".format(self.id, self.table_name))
217217
raise Exception("{} Not in table {}".format(self.id, self.table_name))
218218

219-
# TODO: Consolidate get, get_multi and get_multis in one function !
220-
221219
@classmethod
222220
def get(cls, **kwargs):
223221
"""
@@ -301,7 +299,6 @@ def get_multi(cls, **kwargs):
301299
if data:
302300
return cls(data)
303301
else:
304-
# TODO: All db gets return None instead of valuerror
305302
raise ValueError("Not found.")
306303

307304
@classmethod

backend/PyMatcha/utils/populate_database.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def populate_users(amount=150, drop_user_table=False):
8989
Tag.create(name=tag, user_id=u.id)
9090
except ConflictError:
9191
pass # Pass on the conflict error, this user wont be created because the username is taken. Who cares ?
92-
# TODO: Add images
9392

9493

9594
if __name__ == "__main__":

backend/PyMatcha/utils/tables.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def _create_matches_table(db):
150150
) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ;
151151
"""
152152
)
153-
# TODO: Is conversation started boolean ?
154153
c.execute(ENABLE_SQL_NOTES)
155154
c.close()
156155

backend/PyMatcha/utils/tasks.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ def update_heat_scores():
3737
score += 100
3838
score += likes_received * 2
3939
score += matches * 4
40-
# TODO: Superlike received = 5 pts
4140
score -= reports_received * 10
4241
score += views
4342
score += ceil(messages / 5)
44-
# TODO: remove 10 pts per week of inactivity
4543
user.heat_score = score
4644
user.save()
4745
return f"Updated heat score for user {user.id}: {user.heat_score}."
@@ -68,7 +66,6 @@ def update_offline_users():
6866
# Edge case where the user has been deleted from DB while he was still online
6967
pass
7068
else:
71-
# TODO: array of id and one DB call to update the db as offline
7269
u.date_lastseen = datetime.datetime.fromtimestamp(date_lastseen)
7370
u.is_online = False
7471
u.save()
@@ -110,7 +107,6 @@ def update_user_recommendations():
110107
for user_to_update in User.select_all():
111108
count += 1
112109
user_to_update_recommendations = []
113-
# TODO: Find a way to bypass that
114110
if not user_to_update.birthdate:
115111
continue
116112
if not user_to_update.geohash:

backend/schemas/swagger.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ info:
1010
name: GNU GPL 3
1111
url: https://github.com/Seluj78/PyMatcha/blob/dev/LICENSE
1212

13-
# TODO: Email and password once rewritten with new frontend
14-
# TODO: https://swagger.io/docs/specification/links/
15-
# TODO: https://stackoverflow.com/questions/47447403/how-to-define-different-responses-for-same-http-status-code-in-openapi-swagger
16-
1713
tags:
1814
- name: Authentication
1915
description: Login and register routes
@@ -1302,7 +1298,6 @@ components:
13021298
details:
13031299
type: string
13041300
example: He spammed me of dick pics
1305-
# TODO: Add descriptions
13061301
User:
13071302
type: object
13081303
properties:
@@ -1616,7 +1611,6 @@ components:
16161611
type: string
16171612
example: 1
16181613
description: The user id who received the message
1619-
# TODO: Add descriptions
16201614
Recommendation:
16211615
type: object
16221616
properties:

0 commit comments

Comments
 (0)