项目作者: k-dominik

项目描述 :
Command line tool for conda environment comparison
高级语言: Python
项目地址: git://github.com/k-dominik/conda-diff.git
创建时间: 2019-08-30T09:17:09Z
项目社区:https://github.com/k-dominik/conda-diff

开源协议:MIT License

下载


conda-diff

Build Status
Code style: black
Current bin version
codecov

Command line tool to compare conda environments

Installation

  1. $ conda install -c kdominik -c conda-forge conda-diff

Usage

Usage is still limited.

You can compare environments specified by either

  • environment name (will run conda list --json)
  • .json files created with conda list --json
  • .yaml files created with conda export[^1]

You can two compare different existing conda environments and/or conda lists generated with conda list --json or conda create --json (e.g. from dry-run).

  1. $ conda create -n tmp --dry-run --json -c conda-forge python=3.6 > py36.json
  2. $ conda create -n tmp --dry-run --json -c conda-forge python=3.7 > py37.json
  3. $ conda-diff py36.json py37.json
  4. Diff report for environments py36.json and py37.json:
  5. Common Packages (without diff)
  6. ------------------------------
  7. _libgcc_mutex
  8. ca-certificates
  9. libffi
  10. libgcc-ng
  11. libstdcxx-ng
  12. ncurses
  13. openssl
  14. readline
  15. sqlite
  16. tk
  17. xz
  18. zlib
  19. Common Packages (with diff)
  20. ---------------------------
  21. certifi
  22. pip
  23. python
  24. setuptools
  25. wheel
  26. Packages Only In py36.json:
  27. --------------------------
  28. Packages Only In py37.json:
  29. --------------------------
  30. bzip2

Increase verbosity to get more detailed output:

  1. $ conda-diff py36.json py37.json -vv
  2. Diff report for environments py36.json and py37.json:
  3. ... (abbreviated for docs)
  4. Common Packages (with diff)
  5. ---------------------------
  6. certifi
  7. build_string: py36_1 -> py37_1
  8. dist_name: certifi-2019.6.16-py36_1 -> certifi-2019.6.16-py37_1
  9. pip
  10. build_string: py36_0 -> py37_0
  11. dist_name: pip-19.2.3-py36_0 -> pip-19.2.3-py37_0
  12. python
  13. build_number: 1005 -> 1
  14. build_string: h357f687_1005 -> h33d41f4_1
  15. dist_name: python-3.6.7-h357f687_1005 -> python-3.7.3-h33d41f4_1
  16. version: 3.6.7 -> 3.7.3
  17. setuptools
  18. build_string: py36_0 -> py37_0
  19. dist_name: setuptools-41.2.0-py36_0 -> setuptools-41.2.0-py37_0
  20. wheel
  21. build_string: py36_0 -> py37_0
  22. dist_name: wheel-0.33.6-py36_0 -> wheel-0.33.6-py37_0
  23. Packages Only In py36.json:
  24. --------------------------
  25. Packages Only In py37.json:
  26. --------------------------
  27. bzip2

Todos:

  • add more, better formatters
    • .md output
  • add json output
  • support pip dependencies
  • support missing build strings

[^1]: comparisons with environment.yaml files are limited as these don’t include per-package channel information