Quick environment solver
Project description
mungo
IMPORTANT WARNING mungo is experimental, things are very likely to break.
mungo acts as a drop-in replacement for conda create
and conda install
-
but with way faster environment resolution.
The improvements in speed are achieved by employing linear programming instead
of sat-solving and caching of intermediate results (see "The ILP" for more information).
Note that we do not want to replace conda - we merely wish to share our solution so that it can be tested and perhaps someday be integrated into conda itself.
Caveats
- mungo only exposes basic functionality:
install (package_spec)+ (--name NAME)? (--channel CHANNEL)* (--file FILE)?
create (package_spec)* (--name NAME)? (--channel CHANNEL)* (--file FILE)?
- mungo's solutions will not be the same as conda's.
- mungo cannot handle custom channel urls. Any channel which has
repodata.json.bz2
files available fromhttps://conda.anaconda.org/CHANNEL/ARCH
is fine, though. - mungo only reads channels from
~/.condarc
(but also uses the--channel
arguments, if supplied, of course). - mungo only supports linux at the moment.
Installation
You need a working conda installation, since actual package installation is delegated to conda.
from PIP
pip install mungo
Examples
# create an environment named 'foo' with the specified packages
mungo create -n foo "python>=3.7" pulp packaging pyyaml
# create an environment from an environment file (such as mungo.yml)
mungo create --file mungo.yml
# install packages into the current environment
mungo install bwa
# install packages into a different environment
mungo install -n foo bwa
The ILP
mungo uses an integer linear program to determine a configuration of compatible packages which maximizes version numbers while also keeping channel order in mind.
After merging, ILP variables ∈ {0, 1} are created for each p-node. These variables relate to (package, version)
configurations and tell us whether a configuration is selected for installation (1) or not (0).
In a second step, the following ILP constraints are generated from the constrain nodes defined above:
For each parent p
(variable), the sum of all children (variables) C
must be greater or equal to p
; in other words: If p
is selected, at least one available version of each dependent package must also be selected. If p
is not selected for installation (i.e. p = 0
), installation status of its dependencies is not relevant (for p
).
Changelog
- version 0.1.0: Initial version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mungo-0.1.2.tar.gz
.
File metadata
- Download URL: mungo-0.1.2.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a28a48451ff3cb7c2e541bf70a60b110c18dff8a2fd4ea6941c641cdeea24751 |
|
MD5 | e6397c8b99cd07ec9348b9187605e347 |
|
BLAKE2b-256 | 53981bc82b80eece9ff8af7be929e7c9d76813fc7cceff8d04e679824104a8d1 |
File details
Details for the file mungo-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: mungo-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ef8f09d550df5c14a0264d40b7890f715b8592a0c18f5727c077233989b85f8 |
|
MD5 | 7a1cfa9099b5da230010382c4d27e9d3 |
|
BLAKE2b-256 | f43e63d1c38be3a1af92a4996549d674ac15ee0e0cf30feb85a724cb9ea66874 |