Skip to content

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

License

Notifications You must be signed in to change notification settings

lukaszKielar/conda-leaves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages