forked from JGuetschow/Global_CO2_from_cement_production
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dodo.py
38 lines (34 loc) · 1.17 KB
/
dodo.py
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
32
33
34
35
36
37
38
# define tasks for Andrew Cement data repository
from doit import get_var
# create virtual environment
def task_setup_venv():
"""Create virtual environment"""
return {
'file_dep': ['requirements_dev.txt', 'setup.cfg', 'pyproject.toml'],
'actions': ['python3 -m venv venv',
'./venv/bin/pip install --upgrade pip wheel',
'./venv/bin/pip install --upgrade --upgrade-strategy '
'eager -e .[dev]',
'touch venv',],
'targets': ['venv'],
'verbosity': 2,
}
read_config = {
"version": get_var('version', None),
}
def task_read_version():
""" Read specific version of the data"""
return {
'actions': [f"./venv/bin/python src/read_version_datalad.py "
f"--version={read_config['version']}"],
'verbosity': 2,
'setup': ['setup_venv'],
}
def task_download_version():
""" Download specific version of the data"""
return {
'actions': [f"./venv/bin/python src/download_version_datalad.py "
f"--version={read_config['version']}"],
'verbosity': 2,
'setup': ['setup_venv'],
}