Per-user file storage model changes
Review Request #6022 — Created June 23, 2014 and submitted
Model changes for enabling ownership of FileAttachments
- Evolutions manually run successfully
- Test suite run
Description | From | Last Updated |
---|---|---|
Col: 5 E265 block comment should start with '# ' |
reviewbot | |
Col: 43 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 45 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 56 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 58 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 5 E265 block comment should start with '# ' |
reviewbot | |
Col: 56 W291 trailing whitespace |
reviewbot | |
Col: 48 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 50 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 61 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
Col: 63 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
undefined name 'self' |
reviewbot | |
Col: 80 E501 line too long (95 > 79 characters) |
reviewbot | |
The first line of this file should be from __future__ import unicode_literals |
david | |
Col: 80 E501 line too long (96 > 79 characters) |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 80 E501 line too long (96 > 79 characters) |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
You'll need to prepend this line to the file, followed by a blank line: from __future__ import unicode_literals This ensures … |
chipx86 | |
Imports should be alphabetical. |
chipx86 | |
Since file and review_request are now optional, they should default to None. |
chipx86 | |
Remove this blank line. |
chipx86 | |
This is referencing file, since it's None. Doesn't look like this form was tested? |
chipx86 | |
You need 2 blank lines between classes. You removed one of them. |
chipx86 | |
Alphabetical. |
chipx86 | |
Alphabetical. |
chipx86 | |
Should name this 'file_attachments'. |
chipx86 | |
No blank line here. |
chipx86 | |
Since we're dealing with optional keyword arguments now, can you do: form.create(file=..., review_request=...) |
chipx86 | |
'guess_mimetype' imported but unused |
reviewbot | |
undefined name 'is_exe_in_path' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
'guess_mimetype' imported but unused |
reviewbot | |
undefined name 'is_exe_in_path' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
undefined name 'subprocess' |
reviewbot | |
Too many blank lines. Should only be one at this level. |
chipx86 |
- Change Summary:
-
Abandoned usage statistics as discussed at the last UCOSP meeting. Added test/evolution for simple change to the FileAttachment model.
- Description:
-
~ Preliminary changes for user file storage
~ Preliminary back-end changes for user file storage
- Testing Done:
-
~ Standard unit tests run, nothing seems to break. Not ready for a full review yet.
~ - Added test_file_ownership to FileAttachments
+ - Old tests pass
- Commit:
-
c967b15849a705fe80b6caaa7d9220c106a072f2b9fe14ff99e039f88d17b8c1e63ee7358aa6e819
-
Tool: Pyflakes Processed Files: reviewboard/attachments/tests.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/tests.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/tests.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: Pyflakes Processed Files: reviewboard/attachments/tests.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py
- Summary:
-
[WIP] Per-user file storagePer-user file storage model changes
- Description:
-
~ Preliminary back-end changes for user file storage
~ Model changes for enabling ownership of FileAttachments
- Testing Done:
-
~ - Added test_file_ownership to FileAttachments
~ - Old tests pass
~ - Evolutions manually run successfully
~ - Test suite run
- Commit:
-
4286bde44f2d2c74cc519ee612d2eee43b97a7100a1b794936322ee6267f878ddbaf763b5fab5bd5
-
Tool: Pyflakes Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py
-
-
- Change Summary:
-
Updated base_file_attachment resource to allow for empty path
- Commit:
-
0a1b794936322ee6267f878ddbaf763b5fab5bd54facd8a7564dd026a519541f1fe408efe31ad83d
- Diff:
-
Revision 5 (+86 -62)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/base_file_attachment.py reviewboard/attachments/models.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/evolutions/file_attachment_ownership.py reviewboard/attachments/forms.py Tool: Pyflakes Processed Files: reviewboard/webapi/resources/base_file_attachment.py reviewboard/attachments/models.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/evolutions/file_attachment_ownership.py reviewboard/attachments/forms.py
-
-
- Change Summary:
-
Style changes
- Commit:
-
4facd8a7564dd026a519541f1fe408efe31ad83dbd07aa5cf76e7fb44d0e7d48ea22ea1b2bb470cc
- Diff:
-
Revision 6 (+88 -62)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/base_file_attachment.py reviewboard/attachments/models.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/evolutions/file_attachment_ownership.py reviewboard/attachments/forms.py Tool: Pyflakes Processed Files: reviewboard/webapi/resources/base_file_attachment.py reviewboard/attachments/models.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/evolutions/file_attachment_ownership.py reviewboard/attachments/forms.py
-
I thought we decided that
UploadFileForm
was going to be refactored to have a base class for the common bits, and then subclasses for general file uploading an review request-related uploading? -
You'll need to prepend this line to the file, followed by a blank line:
from __future__ import unicode_literals
This ensures all strings in our codebase are in Unicode format.
-
-
-
-
-
-
-
-
-
-
Since we're dealing with optional keyword arguments now, can you do:
form.create(file=..., review_request=...)
- Commit:
-
bd07aa5cf76e7fb44d0e7d48ea22ea1b2bb470cc61eabedf4c5cd1138981a3447268091be643c253
- Diff:
-
Revision 7 (+71 -5)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/base_file_attachment.py reviewboard/attachments/models.py reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/evolutions/file_attachment_ownership.py reviewboard/attachments/forms.py
-
Tool: Pyflakes Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py
-
-
-
-
-
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: Pyflakes Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py
-
-
-
-
-
-
-
Tool: Pyflakes Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py
-
Tool: PEP8 Style Checker Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py Tool: Pyflakes Processed Files: reviewboard/attachments/evolutions/__init__.py reviewboard/attachments/mimetypes.py reviewboard/attachments/models.py reviewboard/attachments/forms.py reviewboard/attachments/evolutions/file_attachment_ownership.py