-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gentoo client support #652
base: master
Are you sure you want to change the base?
Conversation
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.
Looks good. Worth considering though. View full project report here.
e894daf
to
c73a5b8
Compare
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.
Some things to consider. View full project report here.
c73a5b8
to
4a9a140
Compare
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.
Worth considering. View full project report here.
4a9a140
to
9160512
Compare
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.
Looks good. Worth considering though. View full project report here.
9160512
to
90f9408
Compare
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.
Some things to consider. View full project report here.
90f9408
to
51cb45b
Compare
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.
Worth considering. View full project report here.
51cb45b
to
d3b29a4
Compare
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.
Some things to consider. View full project report here.
d3b29a4
to
1efefc9
Compare
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.
Looks good. Worth considering though. View full project report here.
choices=PACKAGE_TYPES, | ||
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) |
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.
null=True
on a string field causes inconsistent data types because the value can be either str
or None
. This adds complexity and maybe bugs, but can be solved by replacing null=True
with default=""
. Read more.
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) | ||
category = models.ForeignKey(PackageCategory, blank=True, null=True, on_delete=models.SET_NULL) |
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.
Django automatically creates a related_name
if it's not set. If it were set then a more readable and explicit relationship is set up. Read more.
name = models.CharField(max_length=255) | ||
version = models.CharField(max_length=255) | ||
epoch = models.CharField(max_length=255, blank=True, null=True) | ||
release = models.CharField(max_length=255, blank=True, null=True) | ||
arch = models.CharField(max_length=255) | ||
packagetype = models.CharField(max_length=1, blank=True, null=True) | ||
category = models.CharField(max_length=255, blank=True, null=True) |
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.
category = models.CharField(max_length=255, blank=True, null=True) | |
category = models.CharField(max_length=255, blank=True, default='') |
Likewise, consider replacing null=True
with default=""
(and blank=True
to pass validation checks).
1efefc9
to
3264e62
Compare
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.
Worth considering. View full project report here.
choices=PACKAGE_TYPES, | ||
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) |
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.
null=True
on a string field causes inconsistent data types because the value can be either str
or None
. This adds complexity and maybe bugs, but can be solved by replacing null=True
with default=""
. More.
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) | ||
category = models.ForeignKey(PackageCategory, blank=True, null=True, on_delete=models.SET_NULL) |
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.
Django automatically creates a related_name
if it's not set. If it were set then a more readable and explicit relationship is set up. More info.
name = models.CharField(max_length=255) | ||
version = models.CharField(max_length=255) | ||
epoch = models.CharField(max_length=255, blank=True, null=True) | ||
release = models.CharField(max_length=255, blank=True, null=True) | ||
arch = models.CharField(max_length=255) | ||
packagetype = models.CharField(max_length=1, blank=True, null=True) | ||
category = models.CharField(max_length=255, blank=True, null=True) |
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.
category = models.CharField(max_length=255, blank=True, null=True) | |
category = models.CharField(max_length=255, blank=True, default='') |
Similarly, consider replacing null=True
with default=""
(and blank=True
to pass validation checks).
3264e62
to
9493ca8
Compare
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.
Some things to consider. View full project report here.
choices=PACKAGE_TYPES, | ||
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) |
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.
null=True
on a string field causes inconsistent data types because the value can be either str
or None
. This adds complexity and maybe bugs, but can be solved by replacing null=True
with default=""
. More details.
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) | ||
category = models.ForeignKey(PackageCategory, blank=True, null=True, on_delete=models.SET_NULL) |
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.
Django automatically creates a related_name
if it's not set. If it were set then a more readable and explicit relationship is set up. Explained here.
name = models.CharField(max_length=255) | ||
version = models.CharField(max_length=255) | ||
epoch = models.CharField(max_length=255, blank=True, null=True) | ||
release = models.CharField(max_length=255, blank=True, null=True) | ||
arch = models.CharField(max_length=255) | ||
packagetype = models.CharField(max_length=1, blank=True, null=True) | ||
category = models.CharField(max_length=255, blank=True, null=True) |
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.
category = models.CharField(max_length=255, blank=True, null=True) | |
category = models.CharField(max_length=255, blank=True, default='') |
As above, consider replacing null=True
with default=""
(and blank=True
to pass validation checks).
reports/utils.py
Outdated
with transaction.atomic(): | ||
repo_arch, created = machine_arches.get_or_create(name='any') | ||
|
||
repo_name = f'Gentoo Linux' |
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.
repo_name = f'Gentoo Linux' | |
repo_name = 'Gentoo Linux' |
f-string is unnecessary here. This can just be a string. Read more.
9493ca8
to
a133181
Compare
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.
Looks good. Worth considering though. View full project report here.
choices=PACKAGE_TYPES, | ||
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) |
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.
null=True
on a string field causes inconsistent data types because the value can be either str
or None
. This adds complexity and maybe bugs, but can be solved by replacing null=True
with default=""
. More info.
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) | ||
category = models.ForeignKey(PackageCategory, blank=True, null=True, on_delete=models.SET_NULL) |
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.
Django automatically creates a related_name
if it's not set. If it were set then a more readable and explicit relationship is set up. More info.
name = models.CharField(max_length=255) | ||
version = models.CharField(max_length=255) | ||
epoch = models.CharField(max_length=255, blank=True, null=True) | ||
release = models.CharField(max_length=255, blank=True, null=True) | ||
arch = models.CharField(max_length=255) | ||
packagetype = models.CharField(max_length=1, blank=True, null=True) | ||
category = models.CharField(max_length=255, blank=True, null=True) |
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.
category = models.CharField(max_length=255, blank=True, null=True) | |
category = models.CharField(max_length=255, blank=True, default='') |
Likewise, consider replacing null=True
with default=""
(and blank=True
to pass validation checks).
a133181
to
4a2c475
Compare
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.
Worth considering. View full project report here.
choices=PACKAGE_TYPES, | ||
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) |
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.
null=True
on a string field causes inconsistent data types because the value can be either str
or None
. This adds complexity and maybe bugs, but can be solved by replacing null=True
with default=""
. Explained here.
blank=True, | ||
null=True) | ||
packagetype = models.CharField(max_length=1, choices=PACKAGE_TYPES, blank=True, null=True) | ||
category = models.ForeignKey(PackageCategory, blank=True, null=True, on_delete=models.SET_NULL) |
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.
Django automatically creates a related_name
if it's not set. If it were set then a more readable and explicit relationship is set up. More details.
name = models.CharField(max_length=255) | ||
version = models.CharField(max_length=255) | ||
epoch = models.CharField(max_length=255, blank=True, null=True) | ||
release = models.CharField(max_length=255, blank=True, null=True) | ||
arch = models.CharField(max_length=255) | ||
packagetype = models.CharField(max_length=1, blank=True, null=True) | ||
category = models.CharField(max_length=255, blank=True, null=True) |
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.
category = models.CharField(max_length=255, blank=True, null=True) | |
category = models.CharField(max_length=255, blank=True, default='') |
Again, consider replacing null=True
with default=""
(and blank=True
to pass validation checks).
No description provided.