Skip to content

Commit edcb4c6

Browse files
committed
Added missing fields of RubricComments, v0.2.27, thx @josephlou5! 🎉
1 parent c6335eb commit edcb4c6

File tree

15 files changed

+235
-193
lines changed

15 files changed

+235
-193
lines changed

Pipfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pytest-mock = "*"
1717
requests-mock = "*"
1818

1919
[packages]
20-
better-exceptions = "*"
2120
blessings = "*"
2221
colorama = "*"
2322
eliot = "*"

Pipfile.lock

Lines changed: 213 additions & 177 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codepost/api_requestor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from urllib import urlencode as urlencode
3131

3232
# External dependencies
33-
import better_exceptions as _better_exceptions
33+
# import better_exceptions as _better_exceptions
3434
import requests as _requests
3535

3636
# Local imports

codepost/http_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from urllib import urlencode as urlencode
2929

3030
# External dependencies
31-
import better_exceptions as _better_exceptions
31+
# import better_exceptions as _better_exceptions
3232
import requests as _requests
3333

3434
# Local imports

codepost/models/abstract/api_crud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from __future__ import print_function # Python 2
88

99
# External dependencies
10-
import better_exceptions as _better_exceptions
10+
# import better_exceptions as _better_exceptions
1111

1212
# Local imports
1313
import codepost.errors as _errors

codepost/models/abstract/api_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from urllib import urlencode as urlencode
3131

3232
# External dependencies
33-
import better_exceptions as _better_exceptions
33+
# import better_exceptions as _better_exceptions
3434
import requests as _requests
3535

3636
# Local imports

codepost/models/abstract/api_resource_metaclass.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
import sys as _sys
1515

1616
# External dependencies
17-
import better_exceptions as _better_exceptions
17+
# import better_exceptions as _better_exceptions
1818
try:
19-
import forge as _forge
19+
# FIXME: URGENT LINE TO FIX
20+
# (there is a problem with forge and .tests)
21+
_forge = None #import forge as _forge
2022
except ImportError: # pragma: no cover
2123
_forge = None
2224
finally:

codepost/models/abstract/lazy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from urllib import urlencode as urlencode
3131

3232
# External dependencies
33-
import better_exceptions as _better_exceptions
33+
# import better_exceptions as _better_exceptions
3434
import requests as _requests
3535

3636
# Local imports

codepost/models/comments.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ class Comments(
5858

5959
}
6060
_FIELDS_READ_ONLY = []
61+
62+
# NOTE: smart defaults for position arguments added as part of
63+
# https://github.com/codepost-io/codePost-api/pull/176
6164
_FIELDS_REQUIRED = [
65+
"file",
6266
"text",
6367
"startChar", "endChar",
64-
"startLine", "endLine"
68+
"startLine", "endLine"
6569
]
6670

6771
# =============================================================================

codepost/models/rubric_comments.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class RubricComments(
3838
'The key which determines how rubric comments are sorted within a Rubric Category in the codePost UI. Low keys are shown first.'),
3939
'explanation': (str,
4040
'Text (markdown) that, when defined, will be shown in place of rubricComment.text to students from the Code Console.'),
41+
'instructionText': (str, 'Text (markdown) that, when a grader applies this comment, will be shown in the customization bubble.'),
42+
'templateTextOn': (bool, 'Flag that indicates whether the instruction should be used as a template.'),
43+
'name': (str, 'Internal name, for instance to track occurrences of comments across assignments.'),
4144
}
4245
_FIELDS_READ_ONLY = [ "comments" ]
4346
_FIELDS_REQUIRED = [ "text", "pointDelta", "category" ]

0 commit comments

Comments
 (0)