-
Notifications
You must be signed in to change notification settings - Fork 6
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
[WIP] Refactor comparison #14
base: master
Are you sure you want to change the base?
Conversation
* Create BuildSource object which might point to Koji tag or Brew tag * Create Comparison object, which stores data about comparison results * Render html, json and txt output via templates engine * Allow full comparison or comparison per package
38e422e
to
e1047cf
Compare
Overall, it looks good to me; just a few suggestions listed above. :) |
if source_id == "rhel": | ||
# FIXME | ||
infra = koji.ClientSession('https://brew') | ||
tag = "rhel-9.0.0-alpha" |
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.
I'd also added a condition here where source_id
doesn't equal all these cases.
It will help to debug if something goes wrong.
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.
Would be great to add some
tests here ;)
""" | ||
merged_packages = set() | ||
|
||
distro_url = "https://tiny.distro.builders" |
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.
All those constant should be in a separate place.
else: | ||
content = sorted(get_content()) | ||
|
||
C = Comparison(content, source1, source2) |
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.
Not the best name for the instance :)
between different distributions. | ||
""" | ||
|
||
epoch = "0" |
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.
Is it necessary to create a separate variable here?
Couldn't find where it uses instead of return
.
|
||
logging.debug("downloading {url}".format(url=url)) | ||
|
||
r = requests.get(url, allow_redirects=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.
Please, use try
construction for requests.
"source2": "{{ source2 }}", | ||
"stats": {{ stats|tojson }}, | ||
"packages": {{ results|tojson }} | ||
} |
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.
Add a newline at the end of this file.
Complete rewrite of the eln-check script