-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add a simple update #966
base: main
Are you sure you want to change the base?
Add a simple update #966
Conversation
Codecov Report
@@ Coverage Diff @@
## master #966 +/- ##
==========================================
- Coverage 61.66% 61.16% -0.51%
==========================================
Files 43 43
Lines 4156 4215 +59
==========================================
+ Hits 2563 2578 +15
- Misses 1593 1637 +44
Continue to review full report at Codecov.
|
@@ -492,7 +493,69 @@ def migrate( | |||
attrs["new_version_errors"][version] = _fmt_error_message(errors, version) | |||
return {} | |||
|
|||
if len(list(_gen_key_selector(cmeta.meta, "source"))) > 0: | |||
def _try_simple_update(): |
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.
Let's make this a full function with inputs etc outside of here. There is a lot of logic and separate tests of it might be useful.
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.
Let's add a test recipe that has some recipe that is supposed to be updated by the simpler version and some recipe that is not and make sure the logic in the code that catches errors is doing it's job.
if source_section.count("url:") != len(sources): | ||
return {}, "there are more URLs than expected" | ||
if source_section.count(hash_type + ":") != len(sources): | ||
return {}, "there are more hashes than expected" |
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.
These errors are not quite descriptive.
No description provided.