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"]["LOCATIONS_TO_USE"] == "RESAMPLE_FUSED":
if config["BARNETT_LOCATION"]["DB_TABLE"] in config["PHONE_VALID_SENSED_BINS"]["TABLES"]: 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/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: 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)") 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"])) 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"]["LOCATIONS_TO_USE"] == "RESAMPLE_FUSED":
if config["DORYAB_LOCATION"]["DB_TABLE"] in config["PHONE_VALID_SENSED_BINS"]["TABLES"]: 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/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: 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)") 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"])) 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/documentation
develop/features develop/features
develop/environments
develop/contributors develop/contributors
develop/testing develop/testing
develop/test_cases develop/test_cases

View File

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