Update environment for new location features

pull/95/head
JulioV 2020-07-21 15:33:28 -04:00
parent 1614d577b8
commit edd46f5d17
4 changed files with 40 additions and 8 deletions

View File

@ -40,6 +40,7 @@ if config["BARNETT_LOCATION"]["COMPUTE"]:
if config["BARNETT_LOCATION"]["LOCATIONS_TO_USE"] == "RESAMPLE_FUSED":
if config["BARNETT_LOCATION"]["DB_TABLE"] in config["PHONE_VALID_SENSED_BINS"]["TABLES"]:
files_to_compute.extend(expand("data/interim/{pid}/phone_sensed_bins.csv", pid=config["PIDS"]))
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_resampled.csv", pid=config["PIDS"], sensor=config["BARNETT_LOCATION"]["DB_TABLE"]))
else:
raise ValueError("Error: Add your locations table (and as many sensor tables as you have) to [PHONE_VALID_SENSED_BINS][TABLES] in config.yaml. This is necessary to compute phone_sensed_bins (bins of time when the smartphone was sensing data) which is used to resample fused location data (RESAMPLED_FUSED)")
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_raw.csv", pid=config["PIDS"], sensor=config["BARNETT_LOCATION"]["DB_TABLE"]))
@ -119,6 +120,7 @@ if config["DORYAB_LOCATION"]["COMPUTE"]:
if config["DORYAB_LOCATION"]["LOCATIONS_TO_USE"] == "RESAMPLE_FUSED":
if config["DORYAB_LOCATION"]["DB_TABLE"] in config["PHONE_VALID_SENSED_BINS"]["TABLES"]:
files_to_compute.extend(expand("data/interim/{pid}/phone_sensed_bins.csv", pid=config["PIDS"]))
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_resampled.csv", pid=config["PIDS"], sensor=config["DORYAB_LOCATION"]["DB_TABLE"]))
else:
raise ValueError("Error: Add your locations table (and as many sensor tables as you have) to [PHONE_VALID_SENSED_BINS][TABLES] in config.yaml. This is necessary to compute phone_sensed_bins (bins of time when the smartphone was sensing data) which is used to resample fused location data (RESAMPLED_FUSED)")
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_raw.csv", pid=config["PIDS"], sensor=config["DORYAB_LOCATION"]["DB_TABLE"]))

View File

@ -0,0 +1,18 @@
Manage virtual environments
====================
**Add new packages**
Try to install any new package using `conda install my_package`. If a package is not available in one of conda's channels you can install it with pip but make sure your virtual environment is active.
**Update your conda environment.yaml**
After installing a new package you can use the following command in your terminal to update your ``environment.yaml`` before publishing your pipeline. Note that we ignore the package version for ``libfortran`` to keep compatibility with Linux:
``conda env export --no-builds | sed 's/^.*libgfortran.*$/ - libgfortran/' > environment.yml``
**Update and prune your conda environment from a environment.yaml file**
Execute the following command in your terminal. See https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#updating-an-environment
``conda env update --prefix ./env --file environment.yml --prune``

View File

@ -32,6 +32,7 @@ Contents:
develop/documentation
develop/features
develop/environments
develop/contributors
develop/testing
develop/test_cases

View File

@ -1,24 +1,25 @@
name: moshi-env
name: rapids202007
channels:
- anaconda
- conda-forge
- anaconda
- defaults
dependencies:
- appdirs=1.4.3
- arrow=0.15.2
- asn1crypto=1.2.0
- astropy=4.0.1.post1
- attrs=19.3.0
- binaryornot=0.4.4
- blas=1.0
- bzip2=1.0.8
- ca-certificates=2019.10.16
- certifi=2019.9.11
- ca-certificates=2020.6.24
- certifi=2020.6.20
- cffi=1.13.1
- chardet=3.0.4
- click=7.0
- cookiecutter=1.6.0
- cryptography=2.7
- datrie=0.8
- datrie=0.8.2
- docutils=0.15.2
- future=0.18.1
- gitdb2=2.0.6
@ -28,10 +29,13 @@ dependencies:
- intel-openmp=2019.4
- jinja2=2.10.3
- jinja2-time=0.2.0
- joblib=0.16.0
- jsonschema=3.1.1
- libcxx=9.0.0
- libedit=3.1.20181209
- libffi=3.2.1
- libgfortran
- llvm-openmp=10.0.0
- markupsafe=1.1.1
- mkl=2019.4
- mkl-service=2.3.0
@ -41,7 +45,7 @@ dependencies:
- ncurses=6.1
- numpy=1.17.2
- numpy-base=1.17.2
- openssl=1.1.1
- openssl=1.1.1g
- pandas=0.25.2
- pbr=5.4.3
- pip=19.3.1
@ -58,6 +62,7 @@ dependencies:
- readline=8.0
- requests=2.22.0
- retrying=1.3.3
- scikit-learn=0.22.1
- scipy=1.3.1
- setuptools=41.6.0
- six=1.12.0
@ -74,8 +79,14 @@ dependencies:
- zlib=1.2.11
- pip:
- configargparse==0.15.1
- decorator==4.4.2
- ipython-genutils==0.2.0
- jupyter-core==4.6.3
- nbformat==5.0.7
- pyrsistent==0.15.5
- ratelimiter==1.2.0.post0
- snakemake==5.7.1
prefix: /usr/local/Caskroom/miniconda/base/envs/moshi-env
- snakemake==5.20.1
- toposort==1.5
- traitlets==4.3.3
prefix: /usr/local/Caskroom/miniconda/base/envs/rapids202007