# -*- coding: utf-8 -*-
from distutils.core import setup

packages = \
['renv', 'renv.cookies']

package_data = \
{'': ['*'],
 'renv.cookies': ['init/*',
                  'init/{{cookiecutter.renv_init_dir}}/cran/*',
                  'nt/*',
                  'nt/{{cookiecutter.dirname}}/*',
                  'posix/*',
                  'posix/{{cookiecutter.dirname}}/*']}

install_requires = \
['click>=7.0,<8.0', 'cookiecutter>=1.6,<2.0', 'pyyaml>=3.12,<4.0']

entry_points = \
{'console_scripts': ['renv = renv.renv:renv']}

setup_kwargs = {
    'name': 'renv',
    'version': '0.3.1',
    'description': 'The renv package is a CLI tool for creating environments for the R statistical programming language.  It takes advantage of the python venv module and its modular EnvBuilder class.',
    'long_description': '[![PyPI version](https://badge.fury.io/py/renv.svg)](https://badge.fury.io/py/renv)\n[![Build Status](https://travis-ci.com/datasnakes/renv.svg?branch=master)](https://travis-ci.com/datasnakes/renv)\n\n# renv (beta)\n\nCreating virtual environments for R. (currently a Linux-only implementation)\n\n## Description\n\nOne of the problems with using R for data analysis can be dependency issues especially for\nscientists who use multiple versions of R or R packages and have a large number of\nprojects that they are developing with R. Dependency issues are especially prevalent among those individuals or groups\nthat are developing R packages.  `renv` is a [Python style](https://github.com/python/cpython/blob/3.6/Lib/venv/__init__.py)\nvirtual environment manager for creating virtual environments for R.\n\n## Installation\n\nThis package is being managed with [`poetry`](https://github.com/sdispater/poetry) and is also available on PyPi.\n\n```bash\npip install renv\n```\n\n## Usage\n\nRenv is currently in beta and is only supported in Linux so there may be some issues if your R has been\ninstalled in a way other than the default. There are probably plenty of\nunforeseen bugs, misspellings, and general use cases where the code could be\nmore efficient. Please submit an [issue](https://github.com/datasnakes/renv/issues)\nor [PR](https://github.com/datasnakes/renv/pulls). We\'d love to get\ncommunity feedback.\n\nThe default .Rprofile also prompts you to install some commonly used\npackages. The functionality of this is useful, but will change for the\nactual release of this package.\n\n### Commands\n\nOnce you have renv installed, you need to initialize renv to set up the `.beRi/.renv` folder in your `$HOME` directory:\n\n```bash\nrenv init\n```\n\nNow, you can easily create an environment:\n\n```bash\nrenv -e myenv -r /path/to/R/folder # Find your current R folder is using `which R` on Linux.\n```\n\nAn environment folder named `myenv` will be created in `$HOME/.beRi/.renv`.\n\nTo activate the environment:\n```\ncd $HOME/.beRi/.renv/myenv/bin\n. ./activate \n```\n\nTo deactivate the R environment:\n\n```bash\ndeactivate\n```\n\n\nUse `--help` to see the other command-line options.\n\n```console\nuser@host:~$ renv --help\nUsage: renv [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  -r, --r_home TEXT               Provide the root of the directory tree where\n                                  R is installed ($R_HOME).  This would be R\'s\n                                  installation directory when using\n                                  ./configure --prefix=<r_home>.  [required]\n  -e, --env_name TEXT             Name of the environment.  [required]\n  -p, --path TEXT                 An absolute installation path for renv.\n                                  [default: ~/.beRi]\n  -n, --name TEXT                 A directory name for renv.  [default: .renv]\n  -b, --bindir TEXT               Provide the bin directory if R was installed\n                                  when using ./configure --bindir=<binpath>.\n  -l, --libdir TEXT               Provide the lib directory if R was installed\n                                  when using ./configure --libdir=<libpath>.\n  -i, --includedir TEXT           Provide the include directory if R was\n                                  installed when using ./configure\n                                  --includedir=<includepath>.\n  -rp, --recommended_packages BOOLEAN\n                                  This determines wheather or not the\n                                  recommended packages are installed in theR\n                                  environment along with the base packages.\n                                  In most cases it\'s best to keep thedefault\n                                  value.\n  --clear BOOLEAN                 Deletes the contents of the environment\n                                  directory if it already exists, before\n                                  environment creation.\n  -u, --upgrade BOOLEAN           Upgrades the environment directory to use\n                                  this version of R.\n  -p, --prompt TEXT               Provide an alternative prompt prefix for\n                                  this environment.\n  -v, --verbose                   Show verbose cli output.\n  --help                          Show this message and exit.\n\nCommands:\n  init  Initialize renv using the <path>/<name>.\n                         Show this message and exit.\n```\n\n\n### Creating an R Environment\n\n```console\nuser@host:~$ renv  -e ~/projects/rna-brain -r /usr/local/apps/R/R-3.4.4/\nuser@host:~$ source ~/projects/rna-brain/bin/activate\n(rna-brain) user@host:~$ R\n\nR version x.y.z (YYY-MM-DD) -- "Dist"\nCopyright (C) YYY The R Foundation for Statistical Computing\nPlatform: Renv is working for some linux distrubutions\n\nR is free software and comes with ABSOLUTELY NO WARRANTY.\nYou are welcome to redistribute it under certain conditions.\nType \'license()\' or \'licence()\' for distribution details.\n\nR is a collaborative project with many contributors.\nType \'contributors()\' for more information and\n\'citation()\' on how to cite R or R packages in publications.\n\nType \'demo()\' for some demos, \'help()\' for on-line help, or\n\'help.start()\' for an HTML browser interface to help.\nType \'q()\' to quit R.\n\n\n..................Attempting to Load Bioconductor...................\n\nWarning: Prompting for Bioconductor Installation...\n\nDo you want to install Bioconductor??? [Y/N]\nn\n\n..................Attempting to Load Devtools...................\n\nWarning: Prompting for Devtools Installation...\n\nDo you want to install Devtools??? [Y/N]\nn\n\n..................Attempting to Load Tidyverse...................\n\nWarning: Prompting for Tidyverse Installation...\n\nDo you want to install Tidyverse??? [Y/N]\nn\nWarning messages:\n1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :\n  there is no package called ‘BiocInstaller’\n2: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :\n  there is no package called ‘devtools’\n3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :\n  there is no package called ‘tidyverse’\n>\n\n```\n## Features\n\n1.  Creates a default R virtual environment using default config settings\n    or a YAML file in the pre-existing environment directory.\n2.  Manages the user\'s and the environment\'s .Rprofile and .Renviron\n    files.\n\nBelow is an example of the YAML config file (there may be mistakes or\nmissing keys). Try to use absolute paths.\n\n```yaml\nR_ABS_HOME: "/home/grabear/R-installs/R-3.4.3/lib64/R"\nR_ENV_HOME: "/home/grabear/rna-brain"\nR_LIBS_USER: "/home/grabear/rna-brain/lib64/R/library"\nR_INCLUDE_DIR: "/home/grabear/rna-brain/lib64/R/include"\nR_VERSION: "3.4.3"\n\n# LIST OF DEFAULT variables for .Rprofile\nCRAN_MIRROR: "https://cran.rstudio.com/"\nCRANEXTRA_MIRROR: "https://mirrors.nics.utk.edu/cran/"\n\n# Determine how to format this for .Rprofile\nSTANDARD_PKG_LIST:\n  BiocInstaller: "Bioconductor"\n  devtools: "Devtools"\n  tidyverse: "Tidyverse"\n\nREPRODUCIBLE_WORKFLOW_PKG_LIST:\n  packrat: "Packrat"\n  miniCRAN: "MiniCRAN"\n```\n\n## Questions ???\n\n### Why renv?\n\nTools for creating reproducible workflows with R have been needed for a\nlong time. Renv gets its inspiration from\n[packrat](https://rstudio.github.io/packrat/), which allows you to\ncreate isolated package libraries, and python\'s\n[venv](https://docs.python.org/3/library/venv.html) module, which\ncreates an environment with its own package library **AND** python\nbinaries. Renv, therefore, helps user better manage a system with\nmultiple installations of R by creating a virtual environments for\nspecific versions of R that have their own R binaries (R and Rscript) as\nwell as their own isolated package libraries.\n\n### Why click and poetry?\n\nClick is used over argparse for speed of development. It requires an\nextra dependency, but it\'s easy to use and what we know. Poetry is used\nfor similar reasons. It\'s a developing project, so we may have regrets\nlater down the road, but for now it\'s proven to be a very useful tool.\n\n### Why not develop everything in R?\n\nAgain, we are going with what we know. We aren\'t unfamiliar with\nprogramming or making packages with R, but we are way better at\ndeveloping and maintaining python code. Virtual environments are already\nwidely used for the python language, which means we don\'t have to\nrecreate the _.whl_.\n\n## Maintainers\n\nRob Gilmore | [@grabear](https://github.com/grabear) | [✉](mailto:robgilmore127@gmail.com)  \nSantina Lin | [@santina](https://github.com/santina) | [✉](mailto:santina424@gmail.com)  \nShaurita Hutchins | [@sdhutchins](https://github.com/sdhutchins) | [✉](mailto:sdhutchins@outlook.com)\n',
    'author': 'Rob Gilmore',
    'author_email': 'robgilmore127@gmail.com',
    'url': 'https://github.com/datasnakes/renv',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.4',
}


setup(**setup_kwargs)
