Skip to content

Commit ccd65a0

Browse files
Fix: Replace source activate with conda activate
1 parent 003fbf0 commit ccd65a0

File tree

9 files changed

+45
-45
lines changed

9 files changed

+45
-45
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@ name: build
33
on: [push]
44

55
jobs:
6-
build-linux:
7-
runs-on: ubuntu-latest
8-
strategy:
9-
max-parallel: 5
6+
build-linux:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 5
1010

11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python 3.8
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: 3.8
17-
- name: Add conda to system path
18-
run: |
19-
# $CONDA is an environment variable pointing to the root of the miniconda directory
20-
echo $CONDA/bin >> $GITHUB_PATH
21-
- name: Install dependencies
22-
run: |
23-
conda env create -n micone -f env.yml
24-
source activate micone
25-
pip install .
26-
micone init --env micone-sparcc
27-
- name: Lint with flake8
28-
run: |
29-
source activate micone
30-
pip install flake8
31-
# stop the build if there are Python syntax errors or undefined names
32-
flake8 micone --count --select=E9,F63,F7,F82 --show-source --statistics
33-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34-
flake8 micone --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35-
- name: Test with pytest
36-
run: |
37-
source activate micone
38-
pytest --cov=micone --cov-config=setup.cfg --cov-report=xml
39-
- name: "Upload coverage to Codecov"
40-
uses: codecov/codecov-action@v1
41-
with:
42-
fail_ci_if_error: true
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.8
17+
- name: Add conda to system path
18+
run: |
19+
# $CONDA is an environment variable pointing to the root of the miniconda directory
20+
echo $CONDA/bin >> $GITHUB_PATH
21+
- name: Install dependencies
22+
run: |
23+
conda env create -n micone -f env.yml
24+
conda activate micone
25+
pip install .
26+
micone init --env micone-sparcc
27+
- name: Lint with flake8
28+
run: |
29+
conda activate micone
30+
pip install flake8
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 micone --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 micone --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
- name: Test with pytest
36+
run: |
37+
conda activate micone
38+
pytest --cov=micone --cov-config=setup.cfg --cov-report=xml
39+
- name: "Upload coverage to Codecov"
40+
uses: codecov/codecov-action@v1
41+
with:
42+
fail_ci_if_error: true

micone/pipelines/envs/micone-cozine/post_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
source activate micone-cozine
5+
conda activate micone-cozine
66

77
R -e 'BiocManager::install("amcdavid/HurdleNormal")'
88
R -e 'library(devtools); install_github("MinJinHa/COZINE")'

micone/pipelines/envs/micone-flashweave/post_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ mkdir "$FOLDER"
1313
wget -O "$FOLDER/julia.tar.gz" --quiet "$URL"
1414
tar xzf "$FOLDER/julia.tar.gz" -C "$FOLDER"
1515

16-
source activate micone-flashweave
16+
conda activate micone-flashweave
1717

1818
cp -r "$FOLDER/$VERSION" "$CONDA_PREFIX/"
1919
ln -s "$CONDA_PREFIX/$VERSION/bin/julia" "$CONDA_PREFIX/bin/julia"
2020

21-
source activate micone-flashweave
21+
conda activate micone-flashweave
2222
julia -e 'import Pkg; Pkg.add("FlashWeave"); Pkg.add("CSV"); Pkg.add("DataFrames"); using FlashWeave;'

micone/pipelines/envs/micone-harmonies/post_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
source activate micone-harmonies
5+
conda activate micone-harmonies
66

77
R -e 'install.packages(c("mvnfast", "networkD3"), repo="https://mirror.las.iastate.edu/CRAN/")'
88
R -e 'library(devtools); install_github("shuangj00/HARMONIES", subdir = "pkg" )'

micone/pipelines/envs/micone-mldm/post_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
source activate micone-mldm
5+
conda activate micone-mldm
66

77
R -e 'install.packages(c("lbfgs", "RcppEigen"), repos="http://archive.linux.duke.edu/cran/")'
88
R -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/QUIC/QUIC_1.1.1.tar.gz", repos=NULL, type="source")'

micone/pipelines/envs/micone-propr/post_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
set -e
44

5-
source activate micone-propr
5+
conda activate micone-propr
66

77
R -e 'library(devtools); install_github("tpq/propr")'

micone/pipelines/envs/micone-qiime2/post_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
source activate micone-qiime2
5+
conda activate micone-qiime2
66

77
pip install biopython
88
conda install -y -c bioconda seqtk

micone/pipelines/envs/micone-spring/post_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
source activate micone-spring
5+
conda activate micone-spring
66

77
R -e 'devtools::install_github("irinagain/mixedCCA")'
88
R -e 'devtools::install_github("GraceYoon/SPRING")'

micone/setup/environments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def load(self, env: str) -> None:
106106
raise ValueError(f"{env} not a supported environment")
107107
ind = self.env_names.index(env)
108108
env_name = self.env_names[ind]
109-
cmd_str = f"source activate {env_name}"
109+
cmd_str = f"conda activate {env_name}"
110110
LOG.logger.info(f"Loading {env} environment")
111111
load_cmd = Command(cmd_str, profile="local", timeout=10000)
112112
load_cmd.run()

0 commit comments

Comments
 (0)