GithubHelp home page GithubHelp logo

so1us2 / gradle-miniconda-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from palantir/gradle-miniconda-plugin

0.0 0.0 0.0 196 KB

Plugin that sets up a Python environment for building and running tests using Miniconda.

License: Apache License 2.0

Shell 0.32% Groovy 23.25% Java 75.94% Python 0.49%

gradle-miniconda-plugin's Introduction

Gradle Miniconda Plugin Circle CI

Plugin that sets up a Python environment for building and running tests using Miniconda.

Usage

Apply the plugin to your project following https://plugins.gradle.org/plugin/com.palantir.python.miniconda, and configure the associated extension:

Minimal configuration:

miniconda {
    minicondaVersion = '3.19.0'
    packages = ['python']
}

Then invoke the setupPython task and use the resulting installation directory from Exec tasks:

task launchNotebook(type: Exec) {
    dependsOn 'setupPython'
    executable "${miniconda.buildEnvironmentDirectory}/bin/python"
    args '-c', 'print("Hello world!")'
}

Options

Name Default Value Description Optional
minicondaVersion N/A The miniconda version which you want to use. See the miniconda repo false
packages N/A The conda packages you want installed into your conda environment. This list must contain at least one argument. false
bootstrapDirectoryPrefix new File(System.getProperty('user.home'), '.miniconda') The root directory to put the root install of miniconda. This helps performance by caching the root environment by pythonVersion and minicondaVersion. true
buildEnvironmentDirectory new File(buildDir, 'miniconda') The directory to place your specific miniconda environment. true
pythonVersion 2 The python version you want for your miniconda. If you want Miniconda3, this value is 3. true
channels ['https://repo.continuum.io/pkgs/free'] The list of conda channels you want to use for downloading conda packages. Must not be empty. true

Here is an example of the plugin with all the bells and whistles.

miniconda {
    bootstrapDirectoryPrefix = new File(System.getProperty('user.home'), '.miniconda')
    buildEnvironmentDirectory = new File(buildDir, 'python')
    minicondaVersion = '3.19.0'
    packages = ['ipython-notebook']
    pythonVersion = 2
    channels = ['https://repo.continuum.io/pkgs/free', 'conda-forge']
}

If you need to customize where the Miniconda installer script is downloaded from, you can add your artifact to the minicondaInstaller configuration. The default location where it is downloaded from is: https://repo.continuum.io.

Tasks

bootstrapPython

Installs Miniconda.

setupPython

Sets up conda environment in the project running conda create.

condaBuildSetup

Installs conda-build using conda install conda-build.

condaBuildCheck

Only checks (validates) the recipe.

condaBuild

Builds and packages the project using conda build.

License

Gradle Miniconda Plugin is released by Palantir Technologies, Inc. under the Apache 2.0 License. See the included LICENSE file for details.

Backwards Compatibility Breaks

0.5.0

The bootstrap Python is now placed in bootstrapDirectoryPrefix/python-$pythonVersion/miniconda-$minicondaVersion.

0.4.0

The bootstrap Python is now placed in bootstrapDirectoryPrefix/minicondaVersion. Users now must set bootstrapDirectoryPrefix instead of bootstrapDirectory. You can still get the new directory of the bootstrap Python by referring to the bootstrapDirectory property.

gradle-miniconda-plugin's People

Contributors

bavardage avatar gatesn avatar gracew avatar jakobjuelich avatar justinuang avatar mnazbro avatar nmiyake avatar punya avatar sixinli avatar

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.