Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add a simple update #966

wants to merge 4 commits into from

Conversation

isuruf
Copy link
Member

@isuruf isuruf commented Apr 20, 2020

No description provided.

@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

Merging #966 into master will decrease coverage by 0.50%.
The diff coverage is 40.54%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
conda_forge_tick/migrators/version.py 71.63% <40.54%> (-7.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a86474c...9559005. Read the comment docs.

@@ -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():
Copy link
Contributor

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.

Copy link
Contributor

@beckermr beckermr left a 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"
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants