Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
fea64a66
Commit
fea64a66
authored
Oct 24, 2016
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only install python coverage prereqs for coverage paver tasks TE-1673
parent
237c20cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
pavelib/prereqs.py
+18
-1
pavelib/tests.py
+2
-2
requirements/edx/base.txt
+3
-2
requirements/edx/coverage.txt
+7
-0
No files found.
pavelib/prereqs.py
View file @
fea64a66
...
...
@@ -17,6 +17,7 @@ from .utils.timer import timed
PREREQS_STATE_DIR
=
os
.
getenv
(
'PREREQ_CACHE_DIR'
,
Env
.
REPO_ROOT
/
'.prereqs_cache'
)
NPM_REGISTRY
=
"http://registry.npmjs.org/"
NO_PREREQ_MESSAGE
=
"NO_PREREQ_INSTALL is set, not installing prereqs"
COVERAGE_REQ_FILE
=
'requirements/edx/coverage.txt'
# If you make any changes to this list you also need to make
# a corresponding change to circle.yml, which is how the python
...
...
@@ -142,7 +143,13 @@ def python_prereqs_installation():
Installs Python prerequisites
"""
for
req_file
in
PYTHON_REQ_FILES
:
sh
(
"pip install -q --disable-pip-version-check --exists-action w -r {req_file}"
.
format
(
req_file
=
req_file
))
pip_install_req_file
(
req_file
)
def
pip_install_req_file
(
req_file
):
"""Pip install the requirements file."""
pip_cmd
=
'pip install -q --disable-pip-version-check --exists-action w'
sh
(
"{pip_cmd} -r {req_file}"
.
format
(
pip_cmd
=
pip_cmd
,
req_file
=
req_file
))
@task
...
...
@@ -239,6 +246,16 @@ def package_in_frozen(package_name, frozen_output):
@task
@timed
def
install_coverage_prereqs
():
""" Install python prereqs for measuring coverage. """
if
no_prereq_install
():
print
NO_PREREQ_MESSAGE
return
pip_install_req_file
(
COVERAGE_REQ_FILE
)
@task
@timed
def
install_python_prereqs
():
"""
Installs Python prerequisites.
...
...
pavelib/tests.py
View file @
fea64a66
...
...
@@ -245,7 +245,7 @@ def test(options, passthrough_options):
@task
@needs
(
'pavelib.prereqs.install_prereqs'
)
@needs
(
'pavelib.prereqs.install_
coverage_
prereqs'
)
@cmdopts
([
(
"compare-branch="
,
"b"
,
"Branch to compare against, defaults to origin/master"
),
(
"compare_branch="
,
None
,
"deprecated in favor of compare-branch"
),
...
...
@@ -283,7 +283,7 @@ def coverage():
@task
@needs
(
'pavelib.prereqs.install_prereqs'
)
@needs
(
'pavelib.prereqs.install_
coverage_
prereqs'
)
@cmdopts
([
(
"compare-branch="
,
"b"
,
"Branch to compare against, defaults to origin/master"
),
(
"compare_branch="
,
None
,
"deprecated in favor of compare-branch"
),
...
...
requirements/edx/base.txt
View file @
fea64a66
...
...
@@ -146,9 +146,7 @@ sqlparse>=0.2.0,<0.3.0
before_after==0.1.3
bok-choy==0.5.3
chrono==1.0.2
coverage==4.2
ddt==0.8.0
diff-cover==0.9.8
django-crum==0.5
django_nose==1.4.1
factory_boy==2.5.1
...
...
@@ -193,3 +191,6 @@ edx-django-release-util==0.1.2
# Used to communicate with Neo4j, which is used internally for
# modulestore inspection
py2neo==3.1.2
# for calculating coverage
-r coverage.txt
requirements/edx/coverage.txt
0 → 100644
View file @
fea64a66
#
# Dependencies that are used solely for calculating test coverage.
# These are split out so that if you are only calculating coverage
# then you don't need to install all the rest of the prereqs.
#
coverage==4.2
diff-cover==0.9.8
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment