vericast / conda-mirror

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

Add a --dry-run mode #39

Closed ericdill closed 7 years ago

ericdill commented 7 years ago

As the maintainer of the conda-mirror infrastructure at MaxPoint I want to be able to update my yaml config file and see what is going to happen as a result without actually running the full mirror. A --dry-run flag would be a reasonable way to do this. My thoughts are that enabling this flag would do the following:

  1. Use the target yaml config file to compute the packages that we want to have locally
  2. Compare the contents of the target mirror directory with the packages that we want to have that was computed in (1)
  3. If no verbosity (-v) flags are provided, assume that the user is not interested in exactly what packages are going to be mirrored and show a summary statistic of the number of files that will be downloaded, the total download size and the number of files that will be removed and the total size of packages removed. The package size can be obtained from the "size" key in each packages repodata entry.
  4. If any verbosity flag is provided, show all of the packages that are going to be removed and all of the packages that are going to be downloaded in addition to (3)