Giter Club home page Giter Club logo

conda-devenv's Introduction

conda-devenv

image

Documentation Status

image

image

image

conda-devenv is conda extension to work with multiple projects in development mode.

It works by processing environment.devenv.yml files, similar to how conda env processes environment.yml files, with this additional features:

  • Jinja 2 support: gives more flexibility to the environment definition, for example making it simple to conditionally add dependencies based on platform.
  • include other environment.devenv.yml files: this allows you to easily work in several dependent projects at the same time, managing a single conda environment with your dependencies.
  • Environment variables: you can define a environment: section with environment variables that should be defined when the environment is activated.

Here's a simple environment.devenv.yml file:

{% set conda_py = os.environ.get('CONDA_PY', '35') %}
name: web-ui-py{{ conda_py }}

includes:
  - {{ root }}/../core-business/environment.devenv.yml

dependencies:
  - gcc  # [linux]

environment:
  PYTHONPATH:
    - {{ root }}/src
  STAGE: DEVELOPMENT

To use this file, execute:

$ cd ~/projects/web-ui
$ conda devenv
> Executing: conda env update --file environment.yml --prune
Fetching package metadata .........
Solving package specifications: ..........
Linking packages ...
[      COMPLETE      ]|############################| 100%
#
# To activate this environment, use:
# > source activate web-ui-py35
#
# To deactivate this environment, use:
# > source deactivate web-ui-py35
#

$ source activate web-ui-py35

$ env PYTHONPATH
/home/user/projects/web-ui/src

$ echo $STAGE
DEVELOPMENT

mamba support

conda-devenv also supports mamba.

As of today mamba is not auto detected and to use it with conda-devenv you can:

  • Use the --env-manager (short version -e), like mamba devenv -e mamba or conda devenv -e mamba.
  • Define the environment variable CONDA_DEVENV_ENV_MANAGER=mamba.
  • Call directly mamba-devenv (this normally work just in the conda's base envaronment).

Documentation

https://conda-devenv.readthedocs.io.

Development

Please see CONTRIBUTING.

License

Free software: MIT license

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.