-
Notifications
You must be signed in to change notification settings - Fork 86
Update CI + add upgrade tests #416
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 2021.04.08-95-gbf7866c | ||
| 2021.04.08-97-g74b81ba |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Adding upgrade tests |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,6 +150,23 @@ def latest_content_version(content_query, version): | |
| return latest_content | ||
|
|
||
|
|
||
| def json_to_dict(data): | ||
| """ | ||
| Converts a JSON string into a Python dictionary. | ||
|
Comment on lines
+153
to
+155
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is interesting. Why is it needed? I see its use later on in another method, just safer this way?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the post-test was breaking because the data was already a dict: https://github.com/pulp/pulp_python/runs/3406807006?check_suite_focus=true#step:12:645 |
||
|
|
||
| Args: | ||
| data (string): JSON string | ||
|
|
||
| Returns: | ||
| dictionary: of JSON string | ||
|
|
||
| """ | ||
| if isinstance(data, dict): | ||
| return data | ||
|
|
||
| return json.loads(data) | ||
|
|
||
|
|
||
| def python_content_to_info(content): | ||
| """ | ||
| Takes in a PythonPackageContent instance and returns a dictionary of the Info fields | ||
|
|
@@ -175,10 +192,10 @@ def python_content_to_info(content): | |
| "package_url": content.project_url or "", # These two are usually identical | ||
| "project_url": content.project_url or "", # They also usually point to PyPI | ||
| "release_url": f"{content.project_url}{content.version}/" if content.project_url else "", | ||
| "project_urls": json.loads(content.project_urls) or None, | ||
| "project_urls": json_to_dict(content.project_urls) or None, | ||
| "platform": content.platform or "", | ||
| "requires_dist": json.loads(content.requires_dist) or None, | ||
| "classifiers": json.loads(content.classifiers) or None, | ||
| "requires_dist": json_to_dict(content.requires_dist) or None, | ||
| "classifiers": json_to_dict(content.classifiers) or None, | ||
| "yanked": False, # These are no longer used on PyPI, but are still present | ||
| "yanked_reason": None, | ||
| } | ||
|
|
||
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.
@gerrod3 here is where the upgrade tests will start to run