forked from pyviz/pyviz.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dodo.py
46 lines (34 loc) · 1.26 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
39
40
41
42
43
44
45
46
import os
if "PYCTDEV_ECOSYSTEM" not in os.environ:
os.environ["PYCTDEV_ECOSYSTEM"] = "conda"
from pyctdev import * # noqa: api
here = os.path.abspath(os.path.dirname(__file__))
def task_ecosystem_setup():
"""Set up conda with updated version, and yes set to always"""
return {'actions': [
"conda config --set always_yes True",
"conda update conda",
]}
def task_env_create():
"""Create environment from environment.yml and environment-dev.yml"""
return {'actions': [
"pip uninstall -y doit pyctdev",
"conda env update -f environment.yml -n pyviz",
]}
def task_build_cache():
"""Build cache"""
return {'actions': [
"python tools/conda_downloads.py",
"BADGE=stars python tools/build_cache.py",
"BADGE=contributors python tools/build_cache.py",
"BADGE=license python tools/build_cache.py",
"BADGE=pypi_downloads python tools/build_cache.py",
]}
def task_build_website():
"""Build website using nbsite"""
return {'actions': [
"python tools/build.py",
"mv tools/index.rst doc/tools.rst",
"nbsite generate-rst --org pyviz --project-name pyviz --examples notebooks", # noqa
"nbsite build --what=html --output=builtdocs",
]}