-
Notifications
You must be signed in to change notification settings - Fork 17
Saving more file information in the models #90 #93
base: develop
Are you sure you want to change the base?
Conversation
JonoYang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay! We appreciate your work. Please take a look at the comments. @pombredanne can also provide his thoughts too.
|
|
||
| scan = models.ForeignKey(Scan) | ||
| path = models.CharField(max_length=400, help_text='Path of file scanned') | ||
| type = models.CharField(max_length=400, help_text='Type of the entity being scanned') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, there is no proper documentation of what the fields are in ScanCode, so we may use this help text as a definition for the fields. Thanks for getting it started for us!
That said, there can be some improvements made to the text to make it more accurate. For example, in the case of type, it should just say "Type of resource: file or directory". Do not use "entity" as anything we scan is either a file or a directory. Also remove "being scanned" from the text, it is not necessary.
Some other suggestions:
name: "Name of the file or directory"
date: "Creation date of file or directory"
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that seems fair...
| help_text='Base name of entity without extension', | ||
| ) | ||
| extension = models.CharField( | ||
| max_length=400, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
400 seems to be big for a field that just stores the file extension. This can be changed to something smaller. You should also take a look at other field sizes and make them smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com
* Remove scan_error field from ScannedFile model * change the corresponding migrations Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com
* Change the models to add defaults to BooleanFields * Change the migrations due to changes in the models Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com
4e15a89 to
2ff6a0e
Compare
Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com