vericast / conda-mirror

Mirror upstream conda channels
BSD 3-Clause "New" or "Revised" License
72 stars 60 forks source link

Capture information on downloaded and removed packages #50

Closed ericdill closed 7 years ago

ericdill commented 7 years ago

I want to know how many packages were removed and how many were successfully downloaded without scraping the conda-mirror output. This PR enables that functionality by having the main function keep track of what is removed and what is downloaded and returning that information. By doing this, I can import the main() function from conda-mirror and embed that in a script that parses this output and does things (like alert me via some pathway) if conda-mirror fails or removes a large number of packages or any other error condition I can think of to make an alert off of.

codecov[bot] commented 7 years ago

Codecov Report

Merging #50 into master will increase coverage by 1.83%. The diff coverage is 87.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage   94.53%   96.37%   +1.83%     
==========================================
  Files           2        2              
  Lines         238      248      +10     
==========================================
+ Hits          225      239      +14     
+ Misses         13        9       -4
Impacted Files Coverage Δ
conda_mirror/conda_mirror.py 96.32% <87.87%> (+1.85%) :arrow_up:

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 586a0f4...5c1766d. Read the comment docs.

parente commented 7 years ago

No comments other than the one so far. Let me know if you want me to look again after it's not WIP.