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
3ae64d5c
Commit
3ae64d5c
authored
Aug 04, 2016
by
Waheed Ahmed
Committed by
Bill DeRusha
Aug 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swap out memcached backend
Add static target & update docker-compose and prod settings
parent
fce3b10f
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 @
3ae64d5c
...
...
@@ -24,7 +24,7 @@ before_install:
install
:
-
pip install -U pip wheel codecov
-
pip install -r requirements/test.txt
-
make requirement.js
-
make requirement
s
.js
before_script
:
# Give Elasticsearch time to start
...
...
Makefile
View file @
3ae64d5c
...
...
@@ -21,7 +21,7 @@ help:
@
echo
" quality run PEP8 and Pylint"
@
echo
" production-requirements install requirements for production"
@
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
" validate run tests and quality checks"
@
echo
" static gather all static assets for production"
...
...
@@ -31,6 +31,9 @@ help:
@
echo
""
static
:
$(NODE_BIN)
/r.js
-o
build.js
python manage.py collectstatic
--noinput
python manage.py compress
-v0
--force
clean_static
:
rm
-rf
course_discovery/assets/ course_discovery/static/build/
...
...
@@ -39,7 +42,7 @@ clean:
find
.
-name
'*.pyc'
-delete
coverage erase
requirement.js
:
requirement
s
.js
:
npm install
$(NODE_BIN)
/bower install
...
...
course_discovery/apps/publisher/tests/test_views.py
View file @
3ae64d5c
import
unittest
from
django.core.urlresolvers
import
reverse
from
django.forms
import
model_to_dict
...
...
@@ -8,7 +7,6 @@ from course_discovery.apps.publisher.models import Course, CourseRun, Seat
from
course_discovery.apps.publisher.tests
import
factories
@unittest.skip
(
'Compression is broken.'
)
class
CreateUpdateCourseViewTests
(
TestCase
):
""" Tests for the publisher `CreateCourseView` and `UpdateCourseView`. """
...
...
@@ -57,7 +55,6 @@ class CreateUpdateCourseViewTests(TestCase):
self
.
assertEqual
(
course
.
title
,
updated_course_title
)
@unittest.skip
(
'Compression is broken.'
)
class
CreateUpdateCourseRunViewTests
(
TestCase
):
""" Tests for the publisher `CreateCourseRunView` and `UpdateCourseRunView`. """
...
...
@@ -112,7 +109,6 @@ class CreateUpdateCourseRunViewTests(TestCase):
self
.
assertEqual
(
course_run
.
lms_course_id
,
updated_lms_course_id
)
@unittest.skip
(
'Compression is broken.'
)
class
SeatsCreateUpdateViewTests
(
TestCase
):
""" Tests for the publisher `CreateSeatView` and `UpdateSeatView`. """
...
...
course_discovery/settings/base.py
View file @
3ae64d5c
...
...
@@ -143,14 +143,9 @@ COMPRESS_PRECOMPILERS = (
(
'text/x-scss'
,
'django_libsass.SassCompiler'
),
)
# Enable offline compression of CSS/JS
COMPRESS_ENABLED
=
True
COMPRESS_OFFLINE
=
True
# Minify CSS
COMPRESS_CSS_FILTERS
=
[
'compressor.filters.css_default.CssAbsoluteFilter'
,
'compressor.filters.cssmin.CSSMinFilter'
,
]
# TEMPLATE CONFIGURATION
...
...
@@ -354,9 +349,4 @@ HAYSTACK_CONNECTIONS = {
HAYSTACK_SIGNAL_PROCESSOR
=
'haystack.signals.RealtimeSignalProcessor'
COMPRESS_PRECOMPILERS
=
(
(
'text/x-scss'
,
'django_libsass.SassCompiler'
),
)
DEFAULT_PARTNER_ID
=
None
course_discovery/settings/production.py
View file @
3ae64d5c
...
...
@@ -57,3 +57,12 @@ for override, value in DB_OVERRIDES.items():
# NOTE (CCB): Treat all MySQL warnings as exceptions. This is especially
# desired for truncation warnings, which hide potential data integrity issues.
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 @
3ae64d5c
...
...
@@ -44,3 +44,7 @@ EDX_DRF_EXTENSIONS = {
}
DEFAULT_PARTNER_ID
=
1
# Enable offline compression of CSS/JS
COMPRESS_ENABLED
=
True
COMPRESS_OFFLINE
=
True
docker-compose.yml
View file @
3ae64d5c
...
...
@@ -31,8 +31,7 @@ services:
image
:
edxops/course-discovery:latest
# Uncomment the next two lines to build from a local configuration repo
#build: ../configuration
#dockerfile: docker/build/discovery/Dockerfile
# build: ../configuration/docker/build/discovery/
container_name
:
course-discovery
volumes
:
...
...
requirements/base.txt
View file @
3ae64d5c
cryptography==1.4
django==1.8.14
django-extensions==1.6.7
django-compressor==2.0
django-filter==0.13.0
django-guardian==1.4.4
django-haystack==2.4.1
...
...
requirements/local.txt
View file @
3ae64d5c
...
...
@@ -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
# docker devstack
docker-compose
>=1.5.1,<1.6
.0
docker-compose
>=1.7.1,<2.0
.0
requirements/production.txt
View file @
3ae64d5c
...
...
@@ -7,5 +7,5 @@ gunicorn==19.6.0
mysqlclient==1.3.7
newrelic==2.66.0.49
nodeenv==0.13.6
py
libmc==1.5.1
py
thon-memcached==1.58
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