conda-leaves

Crates.ioconda-leaves
lib.rsconda-leaves
version0.3.0
sourcesrc
created_at2020-10-11 16:44:33.683898
updated_at2020-10-26 17:54:25.596824
descriptionSimple CLI tool that allows to pretty print all dependencies within conda environment
homepage
repositoryhttps://github.com/lukaszKielar/conda-leaves
max_upload_size
id298393
size107,777
Lukasz Kielar (lukaszKielar)

documentation

README

conda-leaves

Simple CLI tool that allows to pretty print all dependencies within conda environment.

Installation

conda-leaves doesn't require any additional libraries to be installed, but it assumes user has conda and cargo installed and available in system's path.

Installation is as simple as running cargo install conda-leaves.

CLI

Commands

Basic usage of CLI is as simple as:

conda-leaves

It's returning the list of leaves - packages that are not dependent on any other package installed in the environment. Those are usually packages we want to include in environment/requirements file, becauce they sit at the bottom of all dependencies. This CLI is about to simplify the process of understanding dependencies in your conda environment, allowing you to manage it with ease.

help

Prints help information.

conda-leaves help

package

Prints tree view for the package. It helps to understand which libraries are required by the package.

Flags:

  • -d, --dependent-packages - Prints libraries that depend on a given package.

Options:

  • -n, --name - Name of the package that should be printed.

Usage:

conda-leaves package [Flags] --name <name>

Examples:

$ conda-leaves package -n jinja2
jinja2 (v2.11.2)
├── markupsafe (v1.1.1)
└── setuptools (v49.6.0)
    └── certifi (v2020.6.20)
$ conda-leaves package -n dask -d
Following packages depend on dask:
- dask-ml
- dask-xgboost
- dask-glm

export

Exports leaves to the file.

Options:

  • -f, --filename (default: environment.yml) - Name of the output yml file.

Usage:

conda-leaves export [Options]

Development

Running CLI using test data

CONDA_PREFIX="./tests/data" cargo run --release -- <command>

Running tests

cargo test

Compiling documentation

cargo doc
Commit count: 62

cargo fmt