Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #898 from mitodl/release-candidate
Browse files Browse the repository at this point in the history
Release 0.16.0 - will merge in spite of the bug that @amir-qayyum-khan reported.  That bug occurs in a use case unlikely to occur in production.
  • Loading branch information
pwilkins committed Mar 23, 2016
2 parents 51670ee + 30fe128 commit d6ad1a0
Show file tree
Hide file tree
Showing 22 changed files with 356 additions and 310 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
STATUS_TOKEN=
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ asset compression, along with `django-compressor-requirejs
creating requirejs packages. What this means to you is that you need
to do static asset additions in your templates with something like:

.. code-block:: html
.. code-block:: django
{% load compress %}
Expand Down Expand Up @@ -147,4 +147,4 @@ RESTful API Documentation
=========================

LORE has a RESTful API that is documented on Apiary
`http://docs.lore.apiary.io <http://docs.lore.apiary.io>`_ .
`http://docs.lore.apiary.io <http://docs.lore.apiary.io>`_ .
9 changes: 9 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Release Notes
-------------

Version 0.16.0
==============

- Sorted vocabularies in api as well as taxonomy panel
- Replaced the status app with django-server-status
- Added warning message when user try to close learning resource panel without saving
- Updated Django requirement to latest security release
- ISSUE #876 Fixed doc build failure

Version 0.15.1
==============

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@ db:
image: postgres
ports:
- "5432"

redis:
image: redis
ports:
- "6379"

elastic:
image: elasticsearch
command: elasticsearch -Des.network.host=0.0.0.0
ports:
- "9200"

stats:
image: kamon/grafana_graphite
ports:
- "8125/udp:8125/udp"
- "8071:80"

web:
build: .
mem_limit: 384m
Expand Down Expand Up @@ -45,13 +49,15 @@ web:
CELERY_RESULT_BACKEND: redis://redis:6379/4
BROKER_URL: redis://redis:6379/4
HAYSTACK_URL: elastic:9200
env_file: .env
ports:
- "8070:8070"
links:
- db
- redis
- elastic
- stats

celery:
image: lore_web
mem_limit: 384m
Expand Down
7 changes: 5 additions & 2 deletions lore/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from django.core.exceptions import ImproperlyConfigured
import yaml

VERSION = '0.15.1'
VERSION = "0.16.0"

CONFIG_PATHS = [
os.environ.get('LORE_CONFIG', ''),
Expand Down Expand Up @@ -98,6 +98,7 @@ def get_var(name, default):
'search',
'roles',
'xanalytics',
'server_status',
)

MIDDLEWARE_CLASSES = (
Expand Down Expand Up @@ -374,6 +375,7 @@ def get_var(name, default):
}

# Celery
USE_CELERY = True
BROKER_URL = get_var("BROKER_URL", get_var("REDISCLOUD_URL", None))
CELERY_RESULT_BACKEND = get_var(
"CELERY_RESULT_BACKEND", get_var("REDISCLOUD_URL", None)
Expand All @@ -396,7 +398,8 @@ def get_var(name, default):

XANALYTICS_URL = get_var('XANALYTICS_URL', "")

# Token required to access the status page.
# server-status
HEALTH_CHECK = ['CELERY', 'REDIS', 'POSTGRES', 'ELASTIC_SEARCH']
STATUS_TOKEN = get_var(
"STATUS_TOKEN",
"7E17C32A63B2810F0053DE454FC8395CA3262CCB8392D2307887C5E67F132550"
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Core project/common requirements
celery==3.1.19
Django==1.8.7
Django==1.8.11
django-appconf==1.0.1
django-bootstrap3==6.2.2

Expand Down Expand Up @@ -42,3 +42,4 @@ beautifulsoup4==4.4.1

# Application monitoring requirements
newrelic==2.58.1.44
django-server-status==0.3
8 changes: 4 additions & 4 deletions rest/tests/test_vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def test_vocabulary_pagination(self):
weight=1000,
)).data for i in range(40)]

expected.sort(key=lambda x: x["id"])
expected.sort(key=lambda x: x["name"])

resp = self.client.get(
'{repo_base}{repo_slug}/vocabularies/'.format(
Expand All @@ -494,8 +494,8 @@ def test_vocabulary_pagination(self):
self.assertEqual(40, vocabularies['count'])

# Sort both lists in preparation for comparisons.
expected.sort(key=lambda x: x["id"])
from_api = sorted(vocabularies['results'], key=lambda x: x["id"])
expected.sort(key=lambda x: x["name"])
from_api = sorted(vocabularies['results'], key=lambda x: x["name"])

expected_count = 20
self.assertEqual(expected_count, len(from_api))
Expand All @@ -511,7 +511,7 @@ def test_vocabulary_pagination(self):
))
self.assertEqual(HTTP_200_OK, resp.status_code)
vocabularies = as_json(resp)
from_api = sorted(vocabularies['results'], key=lambda x: x["id"])
from_api = sorted(vocabularies['results'], key=lambda x: x["name"])
self.assertEqual(expected_count, len(from_api))
self.assertEqual(40, vocabularies['count'])
self.assertEqual(
Expand Down
3 changes: 2 additions & 1 deletion rest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied as DjangoPermissionDenied
from django.db import transaction
from django.db.models.functions import Lower
from rest_framework import status
from rest_framework.exceptions import ValidationError
from rest_framework.generics import (
Expand Down Expand Up @@ -194,7 +195,7 @@ def get_queryset(self):
if learning_resource_type is not None:
queryset = queryset.filter(
learning_resource_types__name=learning_resource_type)
return queryset.order_by('id')
return queryset.order_by(Lower('name'))

def get_success_headers(self, data):
"""Add Location header for model create."""
Expand Down
Empty file removed status/__init__.py
Empty file.
Empty file removed status/tests/__init__.py
Empty file.
117 changes: 0 additions & 117 deletions status/tests/test_status.py

This file was deleted.

Loading

0 comments on commit d6ad1a0

Please sign in to comment.