Browse Source

Better comments

Guénaël Muller 7 years ago
parent
commit
5416aff358

+ 4 - 4
tracim/config.py View File

@@ -87,7 +87,7 @@ class CFG(object):
87 87
             '',
88 88
         )
89 89
 
90
-        # TODO - G.M - 26-03-2018 - These params seems deprecated for tracimv2,
90
+        # TODO - G.M - 26-03-2018 - [Cleanup] These params seems deprecated for tracimv2,
91 91
         # Verify this
92 92
         #
93 93
         # self.WEBSITE_HOME_TITLE_COLOR = settings.get(
@@ -138,7 +138,7 @@ class CFG(object):
138 138
             '604800',
139 139
         ))
140 140
 
141
-        # TODO - G.M - 27-03-2018 - Restore email config
141
+        # TODO - G.M - 27-03-2018 - [Email] Restore email config
142 142
         ###
143 143
         # EMAIL related stuff (notification, reply)
144 144
         ###
@@ -312,7 +312,7 @@ class CFG(object):
312 312
         # WSGIDAV (Webdav server)
313 313
         ###
314 314
 
315
-        # TODO - G.M - 27-03-2018 - Restore wsgidav config
315
+        # TODO - G.M - 27-03-2018 - [WebDav] Restore wsgidav config
316 316
         #self.WSGIDAV_CONFIG_PATH = settings.get(
317 317
         #    'wsgidav.config_path',
318 318
         #    'wsgidav.conf',
@@ -346,7 +346,7 @@ class CFG(object):
346 346
         # if not self.WSGIDAV_CLIENT_BASE_URL.endswith('/'):
347 347
         #     self.WSGIDAV_CLIENT_BASE_URL += '/'
348 348
 
349
-        # TODO - G.M - 27-03-2018 - Restore radicale config
349
+        # TODO - G.M - 27-03-2018 - [Caldav] Restore radicale config
350 350
         ###
351 351
         # RADICALE (Caldav server)
352 352
         ###

+ 1 - 1
tracim/fixtures/content.py View File

@@ -1,4 +1,4 @@
1
-# TODO : Reenable this when API where availables
1
+# TODO : [LibContent] Reenable this when API where availables
2 2
 # # -*- coding: utf-8 -*-
3 3
 # from depot.io.utils import FileIntent
4 4
 #

+ 7 - 5
tracim/lib/user.py View File

@@ -6,7 +6,7 @@ import typing as typing
6 6
 
7 7
 from tracim.models.auth import User
8 8
 
9
-# TODO - G.M -28-03-2018 - Check if "current user" stuff is always needed for tracimv2
9
+# TODO - G.M -28-03-2018 - [CurrentUser] Check if "current user" stuff is always needed for tracimv2
10 10
 # CURRENT_USER_WEB = 'WEB'
11 11
 # CURRENT_USER_WSGIDAV = 'WSGIDAV'
12 12
 
@@ -55,7 +55,7 @@ class UserApi(object):
55 55
         if email and self._user and user.user_id==self._user.user_id:
56 56
             pass
57 57
             # this is required for the _session to keep on being up-to-date
58
-            # TODO - G.M - 28-03-2018 - Check for pyramid equivalent
58
+            # TODO - G.M - 28-03-2018 - [CurrentUser] Check for pyramid equivalent
59 59
             # tg.request.identity['repoze.who.userid'] = email
60 60
             # tg.auth_force_login(email)
61 61
 
@@ -91,7 +91,7 @@ class UserApi(object):
91 91
         :return:
92 92
         """
93 93
         # NOTE: Cyclic import
94
-        # TODO - G.M - 28-03-2018 - Reenable Calendar stuff
94
+        # TODO - G.M - 28-03-2018 - [Calendar] Reenable Calendar stuff
95 95
         #from tracim.lib.calendar import CalendarManager
96 96
         #from tracim.model.organisational import UserCalendar
97 97
 
@@ -101,6 +101,7 @@ class UserApi(object):
101 101
         self._session.flush()
102 102
         transaction.commit()
103 103
 
104
+        # TODO - G.M - 28-03-2018 - [Calendar] Reenable Calendar stuff
104 105
         # calendar_manager = CalendarManager(created_user)
105 106
         # calendar_manager.create_then_remove_fake_event(
106 107
         #     calendar_class=UserCalendar,
@@ -108,6 +109,7 @@ class UserApi(object):
108 109
         # )
109 110
 
110 111
 
112
+# TODO - G.M - 28-03-2018 - [CurrentUser] Check for pyramid equivalent
111 113
 # class CurrentUserGetterInterface(object):
112 114
 #     def get_current_user(self) -> typing.Union[None, User]:
113 115
 #         raise NotImplementedError()
@@ -117,7 +119,7 @@ class UserApi(object):
117 119
 #     def __init__(self) -> None:
118 120
 #         self.api = UserApi(None)
119 121
 
120
-# TODO - G.M - 28-03-2018 - Check for pyramid equivalent
122
+
121 123
 # class WebCurrentUserGetter(BaseCurrentUserGetter):
122 124
 #     def get_current_user(self) -> typing.Union[None, User]:
123 125
 #         # HACK - D.A. - 2015-09-02
@@ -132,7 +134,7 @@ class UserApi(object):
132 134
 #
133 135
 #         return None
134 136
 
135
-# TODO - G.M - 28-03-2018 - Reenable Webdav stuff
137
+# TODO - G.M - 28-03-2018 - [Webdav] Reenable Webdav stuff
136 138
 # class WsgidavCurrentUserGetter(BaseCurrentUserGetter):
137 139
 #     def get_current_user(self) -> typing.Union[None, User]:
138 140
 #         if hasattr(cherrypy.request, 'current_user_email'):

+ 1 - 1
tracim/models/auth.py View File

@@ -156,7 +156,7 @@ class User(DeclarativeBase):
156 156
             profile_id = max(group.group_id for group in self.groups)
157 157
         return Profile(profile_id)
158 158
 
159
-    # TODO - G-M - 27-03-2018 - Check about calendar code
159
+    # TODO - G-M - 27-03-2018 - [Calendar] Check about calendar code
160 160
     # @property
161 161
     # def calendar_url(self) -> str:
162 162
     #     # TODO - 20160531 - Bastien: Cyclic import if import in top of file

+ 2 - 3
tracim/models/data.py View File

@@ -86,7 +86,7 @@ class Workspace(DeclarativeBase):
86 86
 
87 87
         return contents
88 88
 
89
-    # TODO - G-M - 27-03-2018 - Check about calendar code
89
+    # TODO - G-M - 27-03-2018 - [Calendar] Check about calendar code
90 90
     # @property
91 91
     # def calendar_url(self) -> str:
92 92
     #     # TODO - 20160531 - Bastien: Cyclic import if import in top of file
@@ -1365,7 +1365,7 @@ class VirtualEvent(object):
1365 1365
 
1366 1366
         label = content.get_label()
1367 1367
         if content.type==ContentType.Comment:
1368
-            # todo :voir le _('.... si le _ est utile
1368
+            # TODO :  28-03-2018 [i18n] Internationalize this ?
1369 1369
             label = ('<strong>{}</strong> wrote:').format(content.owner.get_display_name())
1370 1370
 
1371 1371
         return VirtualEvent(id=content.content_id,
@@ -1397,7 +1397,6 @@ class VirtualEvent(object):
1397 1397
         self.content = content
1398 1398
         self.ref_object = ref_object
1399 1399
 
1400
-        # todo moi ? print(type)
1401 1400
         assert hasattr(type, 'id')
1402 1401
         assert hasattr(type, 'css')
1403 1402
         assert hasattr(type, 'icon')

+ 1 - 1
tracim/models/meta.py View File

@@ -7,7 +7,7 @@ from sqlalchemy.schema import MetaData
7 7
 NAMING_CONVENTION = {
8 8
     "ix": "ix_%(column_0_label)s",
9 9
     "uq": "uq_%(table_name)s_%(column_0_name)s",
10
-    # TODO - G.M - 28-03-2018 - Convert database to allow naming convention
10
+    # TODO - G.M - 28-03-2018 - [Database] Convert database to allow naming convention
11 11
     # for ck contraint.
12 12
     # "ck": "ck_%(table_name)s_%(constraint_name)s",
13 13
     "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",

+ 1 - 1
tracim/models/mymodel.py View File

@@ -7,7 +7,7 @@ from sqlalchemy import (
7 7
 
8 8
 from .meta import DeclarativeBase
9 9
 
10
-
10
+# TODO - G.M - 28-03-2018 - [Cleanup] Remove this example Model
11 11
 class MyModel(DeclarativeBase):
12 12
     __tablename__ = 'models'
13 13
     id = Column(Integer, primary_key=True)

+ 1 - 1
tracim/scripts/initializedb.py View File

@@ -37,7 +37,7 @@ def main(argv=sys.argv):
37 37
     DeclarativeBase.metadata.create_all(engine)
38 38
 
39 39
     session_factory = get_session_factory(engine)
40
-
40
+    # TODO - G.M - 28-03-2018 - [Cleanup] Remove code related to example
41 41
     with transaction.manager:
42 42
         dbsession = get_tm_session(session_factory, transaction.manager)
43 43
 

+ 1 - 0
tracim/templates/404.jinja2 View File

@@ -1,3 +1,4 @@
1
+<!-- TODO - G.M - 28-03-2018 - [Cleanup] Replace this example template -->
1 2
 {% extends "layout.jinja2" %}
2 3
 
3 4
 {% block content %}

+ 1 - 0
tracim/templates/layout.jinja2 View File

@@ -1,3 +1,4 @@
1
+<!-- TODO - G.M - 28-03-2018 - [Cleanup] Remove this example template -->
1 2
 <!DOCTYPE html>
2 3
 <html lang="{{request.locale_name}}">
3 4
   <head>

+ 1 - 0
tracim/templates/mytemplate.jinja2 View File

@@ -1,3 +1,4 @@
1
+<!-- TODO - G.M - 28-03-2018 - [Cleanup] Remove this example template -->
1 2
 {% extends "layout.jinja2" %}
2 3
 
3 4
 {% block content %}

+ 1 - 1
tracim/tests/models/test_content.py View File

@@ -27,7 +27,7 @@ class TestContent(StandardTest):
27 27
         content1 = self.test_create()
28 28
         content1.description = 'FOO'  # Raise ContentRevisionUpdateError because revision can't be updated
29 29
 
30
-    # TODO - G.M - 28-03-2018 - Reenable this test when libContent is available
30
+    # TODO - G.M - 28-03-2018 - [libContent] Reenable this test when libContent is available
31 31
     # def test_query(self):
32 32
     #     content1 = self.test_create()
33 33
     #     with new_revision(content1):

+ 1 - 1
tracim/tests/models/test_content_revision.py View File

@@ -36,7 +36,7 @@ class TestContentRevision(BaseTest):
36 36
             dict_repr.pop(key_to_remove, None)
37 37
         return dict_repr
38 38
 
39
-    # TODO - G.M - 28-03-2018 - Reenable this test
39
+    # TODO - G.M - 28-03-2018 - [libContent] Reenable this test
40 40
     # def test_new_revision(self):
41 41
     #     admin = self._session.query(User).filter(User.email == 'admin@admin.admin').one()
42 42
     #     workspace = self._create_workspace_and_test(name='workspace_1', user=admin)

+ 1 - 1
tracim/translation.py View File

@@ -1,4 +1,4 @@
1 1
 
2
-# TODO - G.M - 27-03-2018 - Reconnect true internationalization
2
+# TODO - G.M - 27-03-2018 - [i18n] Reconnect true internationalization
3 3
 def fake_translator(text: str):
4 4
     return text