forked from sgc-kn/cds-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (27 loc) · 821 Bytes
/
Makefile
File metadata and controls
31 lines (27 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
notebook: setup
venv/bin/jupyter-notebook
setup: venv
venv: requirements.txt
# setup bare venv
python -m venv venv
venv/bin/pip install --upgrade pip
# pinned dependencies
venv/bin/pip install -r requirements.txt
touch venv
setup: ~/.cdsapirc
~/.cdsapirc:
@echo Please set your CDS API key in the ~/.cdsapirc text file.
@echo It should look like this:
@echo 'url: https://cds.climate.copernicus.eu/api/v2'
@echo 'key: <UID>:<API key>'
@false
upgrade-dependencies: venv
venv/bin/pip install --upgrade pip pip-tools
# derive requirements.txt from pyproject.toml
# (we pin and track all versions in requirements.txt)
venv/bin/pip-compile --upgrade --strip-extras --quiet
# install the updated versions in the virtual environment
venv/bin/pip install -r requirements.txt
touch venv
clean:
rm -rf venv