-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconda.py
29 lines (22 loc) · 1.01 KB
/
conda.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
"""Conda tasks."""
import logging
from invoke import task
logger = logging.getLogger(__name__)
@task
def create(c):
"""Recreate the conda environment."""
logger.info("Recreating conda environment accessibility-check-backend-env...")
c.run("conda-merge environment.run.yml environment.dev.yml > environment.yml", pty=True)
c.run("mamba env create --force", pty=True)
c.run("rm environment.yml", pty=True)
logger.info("Installing editable accessibility_check_backend into conda environment...")
c.run("pip install --editable .", pty=True)
@task
def update(c):
"""Update the conda environment."""
logger.info("Updating conda environment accessibility-check-backend-env...")
c.run("conda-merge environment.run.yml environment.dev.yml > environment.yml", pty=True)
c.run("mamba env update --prune", pty=True)
c.run("rm environment.yml", pty=True)
logger.info("Installing editable accessibility_check_backend into conda environment...")
c.run("pip install --editable .", pty=True)