Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
be062b4f
Commit
be062b4f
authored
Aug 04, 2016
by
Bill DeRusha
Committed by
GitHub
Aug 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #209 from edx/bderusha/docker-static-target
Swap out memcached backend
parents
fce3b10f
3ae64d5c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
21 deletions
+23
-21
.travis.yml
+1
-1
Makefile
+5
-2
course_discovery/apps/publisher/tests/test_views.py
+0
-4
course_discovery/settings/base.py
+0
-10
course_discovery/settings/production.py
+9
-0
course_discovery/settings/test.py
+4
-0
docker-compose.yml
+1
-2
requirements/base.txt
+1
-0
requirements/local.txt
+1
-1
requirements/production.txt
+1
-1
No files found.
.travis.yml
View file @
be062b4f
...
@@ -24,7 +24,7 @@ before_install:
...
@@ -24,7 +24,7 @@ before_install:
install
:
install
:
-
pip install -U pip wheel codecov
-
pip install -U pip wheel codecov
-
pip install -r requirements/test.txt
-
pip install -r requirements/test.txt
-
make requirement.js
-
make requirement
s
.js
before_script
:
before_script
:
# Give Elasticsearch time to start
# Give Elasticsearch time to start
...
...
Makefile
View file @
be062b4f
...
@@ -21,7 +21,7 @@ help:
...
@@ -21,7 +21,7 @@ help:
@
echo
" quality run PEP8 and Pylint"
@
echo
" quality run PEP8 and Pylint"
@
echo
" production-requirements install requirements for production"
@
echo
" production-requirements install requirements for production"
@
echo
" requirements install requirements for local development"
@
echo
" requirements install requirements for local development"
@
echo
" requirement
.js
install JS requirements for local development and production"
@
echo
" requirement
s.js
install JS requirements for local development and production"
@
echo
" test run tests and generate coverage report"
@
echo
" test run tests and generate coverage report"
@
echo
" validate run tests and quality checks"
@
echo
" validate run tests and quality checks"
@
echo
" static gather all static assets for production"
@
echo
" static gather all static assets for production"
...
@@ -31,6 +31,9 @@ help:
...
@@ -31,6 +31,9 @@ help:
@
echo
""
@
echo
""
static
:
static
:
$(NODE_BIN)
/r.js
-o
build.js
python manage.py collectstatic
--noinput
python manage.py compress
-v0
--force
clean_static
:
clean_static
:
rm
-rf
course_discovery/assets/ course_discovery/static/build/
rm
-rf
course_discovery/assets/ course_discovery/static/build/
...
@@ -39,7 +42,7 @@ clean:
...
@@ -39,7 +42,7 @@ clean:
find
.
-name
'*.pyc'
-delete
find
.
-name
'*.pyc'
-delete
coverage erase
coverage erase
requirement.js
:
requirement
s
.js
:
npm install
npm install
$(NODE_BIN)
/bower install
$(NODE_BIN)
/bower install
...
...
course_discovery/apps/publisher/tests/test_views.py
View file @
be062b4f
import
unittest
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
django.forms
import
model_to_dict
from
django.forms
import
model_to_dict
...
@@ -8,7 +7,6 @@ from course_discovery.apps.publisher.models import Course, CourseRun, Seat
...
@@ -8,7 +7,6 @@ from course_discovery.apps.publisher.models import Course, CourseRun, Seat
from
course_discovery.apps.publisher.tests
import
factories
from
course_discovery.apps.publisher.tests
import
factories
@unittest.skip
(
'Compression is broken.'
)
class
CreateUpdateCourseViewTests
(
TestCase
):
class
CreateUpdateCourseViewTests
(
TestCase
):
""" Tests for the publisher `CreateCourseView` and `UpdateCourseView`. """
""" Tests for the publisher `CreateCourseView` and `UpdateCourseView`. """
...
@@ -57,7 +55,6 @@ class CreateUpdateCourseViewTests(TestCase):
...
@@ -57,7 +55,6 @@ class CreateUpdateCourseViewTests(TestCase):
self
.
assertEqual
(
course
.
title
,
updated_course_title
)
self
.
assertEqual
(
course
.
title
,
updated_course_title
)
@unittest.skip
(
'Compression is broken.'
)
class
CreateUpdateCourseRunViewTests
(
TestCase
):
class
CreateUpdateCourseRunViewTests
(
TestCase
):
""" Tests for the publisher `CreateCourseRunView` and `UpdateCourseRunView`. """
""" Tests for the publisher `CreateCourseRunView` and `UpdateCourseRunView`. """
...
@@ -112,7 +109,6 @@ class CreateUpdateCourseRunViewTests(TestCase):
...
@@ -112,7 +109,6 @@ class CreateUpdateCourseRunViewTests(TestCase):
self
.
assertEqual
(
course_run
.
lms_course_id
,
updated_lms_course_id
)
self
.
assertEqual
(
course_run
.
lms_course_id
,
updated_lms_course_id
)
@unittest.skip
(
'Compression is broken.'
)
class
SeatsCreateUpdateViewTests
(
TestCase
):
class
SeatsCreateUpdateViewTests
(
TestCase
):
""" Tests for the publisher `CreateSeatView` and `UpdateSeatView`. """
""" Tests for the publisher `CreateSeatView` and `UpdateSeatView`. """
...
...
course_discovery/settings/base.py
View file @
be062b4f
...
@@ -143,14 +143,9 @@ COMPRESS_PRECOMPILERS = (
...
@@ -143,14 +143,9 @@ COMPRESS_PRECOMPILERS = (
(
'text/x-scss'
,
'django_libsass.SassCompiler'
),
(
'text/x-scss'
,
'django_libsass.SassCompiler'
),
)
)
# Enable offline compression of CSS/JS
COMPRESS_ENABLED
=
True
COMPRESS_OFFLINE
=
True
# Minify CSS
# Minify CSS
COMPRESS_CSS_FILTERS
=
[
COMPRESS_CSS_FILTERS
=
[
'compressor.filters.css_default.CssAbsoluteFilter'
,
'compressor.filters.css_default.CssAbsoluteFilter'
,
'compressor.filters.cssmin.CSSMinFilter'
,
]
]
# TEMPLATE CONFIGURATION
# TEMPLATE CONFIGURATION
...
@@ -354,9 +349,4 @@ HAYSTACK_CONNECTIONS = {
...
@@ -354,9 +349,4 @@ HAYSTACK_CONNECTIONS = {
HAYSTACK_SIGNAL_PROCESSOR
=
'haystack.signals.RealtimeSignalProcessor'
HAYSTACK_SIGNAL_PROCESSOR
=
'haystack.signals.RealtimeSignalProcessor'
COMPRESS_PRECOMPILERS
=
(
(
'text/x-scss'
,
'django_libsass.SassCompiler'
),
)
DEFAULT_PARTNER_ID
=
None
DEFAULT_PARTNER_ID
=
None
course_discovery/settings/production.py
View file @
be062b4f
...
@@ -57,3 +57,12 @@ for override, value in DB_OVERRIDES.items():
...
@@ -57,3 +57,12 @@ for override, value in DB_OVERRIDES.items():
# NOTE (CCB): Treat all MySQL warnings as exceptions. This is especially
# NOTE (CCB): Treat all MySQL warnings as exceptions. This is especially
# desired for truncation warnings, which hide potential data integrity issues.
# desired for truncation warnings, which hide potential data integrity issues.
warnings
.
filterwarnings
(
'error'
,
category
=
MySQLdb
.
Warning
)
warnings
.
filterwarnings
(
'error'
,
category
=
MySQLdb
.
Warning
)
# Minify CSS
COMPRESS_CSS_FILTERS
+=
[
'compressor.filters.cssmin.CSSMinFilter'
,
]
# Enable offline compression of CSS/JS
COMPRESS_ENABLED
=
True
COMPRESS_OFFLINE
=
True
course_discovery/settings/test.py
View file @
be062b4f
...
@@ -44,3 +44,7 @@ EDX_DRF_EXTENSIONS = {
...
@@ -44,3 +44,7 @@ EDX_DRF_EXTENSIONS = {
}
}
DEFAULT_PARTNER_ID
=
1
DEFAULT_PARTNER_ID
=
1
# Enable offline compression of CSS/JS
COMPRESS_ENABLED
=
True
COMPRESS_OFFLINE
=
True
docker-compose.yml
View file @
be062b4f
...
@@ -31,8 +31,7 @@ services:
...
@@ -31,8 +31,7 @@ services:
image
:
edxops/course-discovery:latest
image
:
edxops/course-discovery:latest
# Uncomment the next two lines to build from a local configuration repo
# Uncomment the next two lines to build from a local configuration repo
#build: ../configuration
# build: ../configuration/docker/build/discovery/
#dockerfile: docker/build/discovery/Dockerfile
container_name
:
course-discovery
container_name
:
course-discovery
volumes
:
volumes
:
...
...
requirements/base.txt
View file @
be062b4f
cryptography==1.4
cryptography==1.4
django==1.8.14
django==1.8.14
django-extensions==1.6.7
django-extensions==1.6.7
django-compressor==2.0
django-filter==0.13.0
django-filter==0.13.0
django-guardian==1.4.4
django-guardian==1.4.4
django-haystack==2.4.1
django-haystack==2.4.1
...
...
requirements/local.txt
View file @
be062b4f
...
@@ -9,4 +9,4 @@ transifex-client==0.11
...
@@ -9,4 +9,4 @@ transifex-client==0.11
git+https://github.com/edx/i18n-tools.git@v0.1.4#egg=i18n_tools==0.1.4
git+https://github.com/edx/i18n-tools.git@v0.1.4#egg=i18n_tools==0.1.4
# docker devstack
# docker devstack
docker-compose
>=1.5.1,<1.6
.0
docker-compose
>=1.7.1,<2.0
.0
requirements/production.txt
View file @
be062b4f
...
@@ -7,5 +7,5 @@ gunicorn==19.6.0
...
@@ -7,5 +7,5 @@ gunicorn==19.6.0
mysqlclient==1.3.7
mysqlclient==1.3.7
newrelic==2.66.0.49
newrelic==2.66.0.49
nodeenv==0.13.6
nodeenv==0.13.6
py
libmc==1.5.1
py
thon-memcached==1.58
PyYAML==3.11
PyYAML==3.11
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