Poetry is a tool for dependency management. We create the environment with Anaconda and manage dependencies with Poetry.
- Install Poetry in your computer
- Install Anaconda
- Create a new environment with the file provided:
conda env create -f environment.yaml
- Activate the environment
conda activate cemrg_wearable
- Install the dependencies using Poetry
poetry install --only main
.
Poetry will read from the poetry.lock file and install the exact dependencies used to develop this project.
If you want to experiment with dependencies versions, delete the lock file and modify the pyproject.toml before
poetry install --only main
Anaconda is useful, but it can be slow at managing dependencies. It is recommended to use poetry.
Setup conda environment
You only need to do this once
Download anaconda, then on a terminal type:
conda create -n cemrg_wearable python=3.11 -y & conda activate cemrg_wearable
Copy the following to install the python dependencies of this project
conda install -c conda-forge pandas matplotlib bs4 requests numpy seaborn -n cemrg_wearable -y
You might need to set your PYTHONPATH
to work on this repository. Move into this folder and type
export PYTHONPATH=$PYTHONPATH:$(pwd)
You need to get your API key!
NOTE! It is not good practice to leave the API key on github!
Get your API key from here, then save it in a file called apikey.txt
,
which will only be available in your computer! That name is ignored by git.
Then you can call the function weather_utils.get_weather()
. See this notebook
for an example.
Also, check this website for the weather codes and conditions.