Skip to content

Commit 0bc725c

Browse files
authored
Merge pull request #66 from antoniojbt/codex/fix-codecov-suggestions-regarding-pip-cache
Fix codefactor pip cache warnings
2 parents c52e119 + ac8f3a9 commit 0bc725c

15 files changed

Lines changed: 61 additions & 61 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install -r requirements.txt
24-
pip install flake8 pytest
25-
pip install -e .
23+
pip install --no-cache-dir -r requirements.txt
24+
pip install --no-cache-dir flake8 pytest
25+
pip install --no-cache-dir -e .
2626
- name: Lint
2727
run: flake8 .
2828
- name: Test

requirements_pq_example.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ conda install -y python=3.5
3838
# issues with cairo with python 3.7
3939

4040
# Install project_quickstart and pq_example requirements:
41-
bash -c 'pip install project_quickstart ; \
41+
bash -c 'pip install --no-cache-dir project_quickstart ; \
4242
conda install -y r-docopt r-data.table r-ggplot2 r-stringr ; \
4343
conda install -y docopt pandas matplotlib scipy svgutils cairosvg ; \
4444
conda install -y r-svglite r-stargazer'

templates/examples/Dockerfile_pq_example_alpine

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ RUN conda update -y conda
111111
# source deactivate'
112112

113113
RUN conda install -y git ; \
114-
pip install --upgrade pip cython numpy ; \
115-
pip install pysam ; \
116-
pip install pandas ; \
117-
pip install ruffus ; \
114+
pip install --no-cache-dir --upgrade pip cython numpy ; \
115+
pip install --no-cache-dir pysam ; \
116+
pip install --no-cache-dir pandas ; \
117+
pip install --no-cache-dir ruffus ; \
118118
conda install sphinx ; \
119-
pip install sphinxcontrib-bibtex ; \
119+
pip install --no-cache-dir sphinxcontrib-bibtex ; \
120120
conda install -y -c r r=3.3 ; \
121121
conda install -y rpy2 ; \
122122
conda install -y readline ; \
@@ -127,15 +127,15 @@ RUN conda install -y git ; \
127127
conda install -y r-gdtools ; \
128128
R --vanilla -e 'source("https://bioconductor.org/biocLite.R") ; install.packages("svglite", repos = "http://cran.us.r-project.org") ; library("svglite")' ; \
129129
wget --no-check-certificate https://raw.githubusercontent.com/CGATOxford/cgat/master/requires.txt ; \
130-
cat requires.txt | grep -v "#" | xargs -n 1 pip install ; \
130+
cat requires.txt | grep -v "#" | xargs -n 1 pip install --no-cache-dir ; \
131131
conda install -y alignlib-lite ; \
132132
conda install -y bedtools ; \
133133
conda install -y pybedtools ; \
134134
conda install -y -c bioconda ucsc-wigtobigwig ; \
135135
conda install -y icu ; \
136-
pip install git+git://github.com/AntonioJBT/CGATPipeline_core.git ; \
137-
pip install git+git://github.com/AntonioJBT/project_quickstart.git ; \
138-
pip install cgat
136+
pip install --no-cache-dir git+git://github.com/AntonioJBT/CGATPipeline_core.git ; \
137+
pip install --no-cache-dir git+git://github.com/AntonioJBT/project_quickstart.git ; \
138+
pip install --no-cache-dir cgat
139139

140140
############################
141141
# Default action to start in

templates/examples/Dockerfile_pq_example_ubuntu

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ RUN conda update -y conda
9090

9191
# Install all packages needed:
9292
RUN conda install -y git ; \
93-
pip install --upgrade pip cython numpy ; \
94-
pip install pysam ; \
95-
pip install pandas ; \
96-
pip install ruffus ; \
93+
pip install --no-cache-dir --upgrade pip cython numpy ; \
94+
pip install --no-cache-dir pysam ; \
95+
pip install --no-cache-dir pandas ; \
96+
pip install --no-cache-dir ruffus ; \
9797
conda install -y sphinx ; \
98-
pip install sphinxcontrib-bibtex ; \
98+
pip install --no-cache-dir sphinxcontrib-bibtex ; \
9999
conda install -y -c r r=3.3 ; \
100100
conda install -y rpy2 ; \
101101
conda install -y readline ; \
@@ -106,16 +106,16 @@ RUN conda install -y git ; \
106106
conda install -y r-gdtools ; \
107107
R --vanilla -e 'source("https://bioconductor.org/biocLite.R") ; install.packages("svglite", repos = "http://cran.us.r-project.org") ; library("svglite")' ; \
108108
wget --no-check-certificate https://raw.githubusercontent.com/CGATOxford/cgat/master/requires.txt ; \
109-
cat requires.txt | grep -v "#" | xargs -n 1 pip install ; \
109+
cat requires.txt | grep -v "#" | xargs -n 1 pip install --no-cache-dir ; \
110110
conda install -y alignlib-lite ; \
111111
conda install -y bedtools ; \
112112
conda install -y pybedtools ; \
113113
conda install -y -c bioconda ucsc-wigtobigwig ; \
114114
conda install -y icu -c conda-forge
115115
conda install -y icu ; \
116-
pip install sphinxcontrib-bibtex ; \
117-
pip install git+git://github.com/AntonioJBT/CGATPipeline_core.git ; \
118-
pip install git+git://github.com/AntonioJBT/project_quickstart.git
116+
pip install --no-cache-dir sphinxcontrib-bibtex ; \
117+
pip install --no-cache-dir git+git://github.com/AntonioJBT/CGATPipeline_core.git ; \
118+
pip install --no-cache-dir git+git://github.com/AntonioJBT/project_quickstart.git
119119

120120

121121
# This fails with continuumio/miniconda3 in this file and manually:

templates/project_template/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ before_install:
3232
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
3333

3434
install:
35-
- pip install -r requirements.txt # --use-mirrors errors in Py3.5
35+
- pip install --no-cache-dir -r requirements.txt # --use-mirrors errors in Py3.5
3636
- python setup.py install
37-
- pip install flake8
37+
- pip install --no-cache-dir flake8
3838
# - pip install coverage # coveralls.io continuously monitors test case coverage
3939
# - pip install coveralls
4040
################

templates/project_template/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ RUN conda install python=3.6 \
8181
&& conda install -y r
8282

8383
# Install python packages:
84-
RUN pip install --upgrade pip numpy setuptools \
85-
&& pip install cython \
86-
&& pip install pandas \
84+
RUN pip install --no-cache-dir --upgrade pip numpy setuptools \
85+
&& pip install --no-cache-dir cython \
86+
&& pip install --no-cache-dir pandas \
8787
&& pip list
8888

8989
# Install project specific packages:
@@ -117,7 +117,7 @@ RUN conda install -y r-docopt=0.4.5 r-data.table=1.10.4 r-ggplot2=2.2.1 ; \
117117
# Install package of interest
118118
##############################
119119

120-
RUN pip install git+git://github.com/EpiCompBio/stats_utils.git
120+
RUN pip install --no-cache-dir git+git://github.com/EpiCompBio/stats_utils.git
121121

122122
############################
123123
# Default action to start in

templates/project_template/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
For Python 3.5
1212
Before packaging or installing run:
1313
14-
pip install -U pip twine check-manifest setuptools
14+
pip install --no-cache-dir -U pip twine check-manifest setuptools
1515
1616
TO DO: to add tests see https://python-packaging.readthedocs.io/en/latest/testing.html
1717

tests/ref_files/pq_example/code/.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ before_install:
3232
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
3333

3434
install:
35-
- pip install -r requirements.txt # --use-mirrors errors in Py3.5
35+
- pip install --no-cache-dir -r requirements.txt # --use-mirrors errors in Py3.5
3636
- python setup.py install
37-
- pip install flake8
37+
- pip install --no-cache-dir flake8
3838
# - pip install coverage # coveralls.io continuously monitors test case coverage
3939
# - pip install coveralls
4040
################

tests/ref_files/pq_example/code/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ RUN conda install python=3.6 \
8181
&& conda install -y r
8282

8383
# Install python packages:
84-
RUN pip install --upgrade pip numpy setuptools \
85-
&& pip install cython \
86-
&& pip install pandas \
84+
RUN pip install --no-cache-dir --upgrade pip numpy setuptools \
85+
&& pip install --no-cache-dir cython \
86+
&& pip install --no-cache-dir pandas \
8787
&& pip list
8888

8989
# Install project specific packages:
@@ -117,7 +117,7 @@ RUN conda install -y r-docopt=0.4.5 r-data.table=1.10.4 r-ggplot2=2.2.1 ; \
117117
# Install package of interest
118118
##############################
119119

120-
RUN pip install git+git://github.com/EpiCompBio/stats_utils.git
120+
RUN pip install --no-cache-dir git+git://github.com/EpiCompBio/stats_utils.git
121121

122122
############################
123123
# Default action to start in

tests/ref_files/pq_example/code/pq_example/Dockerfile_pq_example_alpine

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ RUN conda update -y conda
111111
# source deactivate'
112112

113113
RUN conda install -y git ; \
114-
pip install --upgrade pip cython numpy ; \
115-
pip install pysam ; \
116-
pip install pandas ; \
117-
pip install ruffus ; \
114+
pip install --no-cache-dir --upgrade pip cython numpy ; \
115+
pip install --no-cache-dir pysam ; \
116+
pip install --no-cache-dir pandas ; \
117+
pip install --no-cache-dir ruffus ; \
118118
conda install sphinx ; \
119-
pip install sphinxcontrib-bibtex ; \
119+
pip install --no-cache-dir sphinxcontrib-bibtex ; \
120120
conda install -y -c r r=3.3 ; \
121121
conda install -y rpy2 ; \
122122
conda install -y readline ; \
@@ -127,15 +127,15 @@ RUN conda install -y git ; \
127127
conda install -y r-gdtools ; \
128128
R --vanilla -e 'source("https://bioconductor.org/biocLite.R") ; install.packages("svglite", repos = "http://cran.us.r-project.org") ; library("svglite")' ; \
129129
wget --no-check-certificate https://raw.githubusercontent.com/CGATOxford/cgat/master/requires.txt ; \
130-
cat requires.txt | grep -v "#" | xargs -n 1 pip install ; \
130+
cat requires.txt | grep -v "#" | xargs -n 1 pip install --no-cache-dir ; \
131131
conda install -y alignlib-lite ; \
132132
conda install -y bedtools ; \
133133
conda install -y pybedtools ; \
134134
conda install -y -c bioconda ucsc-wigtobigwig ; \
135135
conda install -y icu ; \
136-
pip install git+git://github.com/AntonioJBT/CGATPipeline_core.git ; \
137-
pip install git+git://github.com/AntonioJBT/project_quickstart.git ; \
138-
pip install cgat
136+
pip install --no-cache-dir git+git://github.com/AntonioJBT/CGATPipeline_core.git ; \
137+
pip install --no-cache-dir git+git://github.com/AntonioJBT/project_quickstart.git ; \
138+
pip install --no-cache-dir cgat
139139

140140
############################
141141
# Default action to start in

0 commit comments

Comments
 (0)