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

Commit

Permalink
Merge branch 'rc/0.8.0' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
pdpinch committed Aug 19, 2015
2 parents e33fcf9 + 23b1956 commit 3e15e0f
Show file tree
Hide file tree
Showing 469 changed files with 67,817 additions and 2,496 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -40,6 +40,7 @@ htmlcov/
nosetests.xml
coverage.xml
coverage/
jstest_results.html

# Translations
*.mo
Expand Down
8 changes: 6 additions & 2 deletions .travis.yml
Expand Up @@ -3,10 +3,14 @@ python:
- '2.7'
services:
- elasticsearch
- redis-server
before_script:
- sleep 10
env:
- DATABASE_URL=postgres://postgres@localhost:5432/postgres
global:
- DATABASE_URL=postgres://postgres@localhost:5432/postgres
- BROKER_URL=redis://localhost:6379/4
- HAYSTACK_URL=127.0.0.1:9200
install:
- "pip install 'tox>=2.0.2,<3.0.0'"
- pip install coveralls
Expand All @@ -20,9 +24,9 @@ deploy:
secure: CGv5mHV8SFnFkdwpRl2EGRU5kvnl7xfxZPgl5DvqJHZ6xBreDpGFQOyQDVVqRAt7s9Dq/JD8qMCvm15rVRdXN9rKMDFV9ilPiR2dTBPs5rzE+upA/W2N2+pkQrnXEP+80EF3Wy3ODUAUb4aUlCwG1NqZCWnn4NzuZNCtAYEqwuk=
app:
master: lore-ci
release-candidate: lore-rc
release: lore-release
run:
- "sleep 15"
- "python manage.py migrate --noinput"
- "python manage.py update_index"
- "python manage.py sync_permissions"
9 changes: 7 additions & 2 deletions Dockerfile
Expand Up @@ -45,7 +45,12 @@ ENV PATH /src/node_modules/.bin:/node/node_modules/.bin:$PATH
# Set pip cache folder, as it is breaking pip when it is on a shared volume
ENV XDG_CACHE_HOME /tmp/.cache

EXPOSE 8070
# Gather static
RUN ./manage.py collectstatic --noinput

USER mitodl
CMD uwsgi uwsgi.ini

# Set and expose port for uwsgi config
EXPOSE 8070
ENV PORT 8070
CMD if [ -n "$WORKER" ]; then celery -A lore worker; else uwsgi uwsgi.ini; fi
13 changes: 13 additions & 0 deletions README.rst
Expand Up @@ -11,6 +11,10 @@ LORE
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg
:target: https://github.com/mitodl/lore/blob/master/LICENSE

|Deploy|

.. |Deploy| image:: https://www.herokucdn.com/deploy/button.png
:target: https://heroku.com/deploy

Getting Started
===============
Expand All @@ -27,6 +31,15 @@ To run one-off commands, like shell, you can run
``docker-compose run web python manage.py shell`` or to create root
user, etc.

Currently in the development environment we compile JSX on every
request, which at the time of this writing is about 5 seconds. If you
want to disable this (because you are working just on python for
example), you can add the line ``LORE_COMPRESS_ENABLED: True`` to
`docker-compose.yml` under the web -> environment section of the file.
The first request will then take 5 seconds, but subsequent ones will
be subsecond.


Adding an application
=====================

Expand Down
97 changes: 96 additions & 1 deletion RELEASE.rst
@@ -1,6 +1,101 @@
Release Notes
-------------

Version 0.8.0
=============
- Changed how vocabulary terms are applied to Learning Resources to use two dropdowns instead of a growing list of fields.
- Added deployment for release candidates
- Added deploy button and app.json
- Fixed caching bug.
- Fixed panel shade issue
- Added base sorting field in case used sorting is working on same values
- Removed response from PATCH on learning resource to aid in performance
- Added configuration option and heroku command to pre-compress assets
- Added Google Analytics tracking support Closes
- Reduce workers per dyno to avoid memory issues
- Added statsd and a few timers - Import timer - Index signal handler timers - Search page load time
- Updated indexing caching from dict to Django's cache.
- .tile-meta no longer defined twice
- Split builds and removed python 3.3 testing
- reverted tile-meta and meta-item for previous appearance
- Added import for (sample) xanalytics API data.
- Added closing panels with ESC key
- Fixed export button to show up even without search results.
- Updated CSS and HTML according to mockup changes
- Added xanalytics icons to listing page
- Added xanalytics management command.


Version 0.7.0
=============

- Implemented ``Select2`` element to refactor ``select2`` widgets.
- Added checkboxes to allow user to uncheck items in export panel.
- Sped up indexing using caching.
- Made checkbox for ``Allow multiple terms`` in the taxonomy panel
consistent with the rest of the UI.
- Implemented export of static assets.
- Fixed user menu display on LORE welcome page.

Version 0.6.0
=============

- Modified learningresource panel to include multi select.
- Fixed export button not appearing in certain situations.
- Added test for StaticAsset.loader.
- Added export functionality for learning resources.
- Added select2-bootstrap-theme bower component.
- Added Select2 to the JS libraries.
- Created ICheckbox React component.
- Made XML preview box for a LearningResource should be read only.
- Pinned all versions.
- Avoided hitting the database for the search page.
- Added field to Vocabulary to define if it can contain multiple terms.
- Incremented xbundle version.
- Added test for ManageTaxonomies.loader.
- Changed vocabularies listing page to match the design.
- Fixed broken links in the footer.
- Removed console.error statement.
- Fixed bug where export checkboxes were not updated in sync with
export count.
- Fix test failures due to pylint dependency chain.
- Created StatusBox component to hold messages and errors.
- Added shopping cart for export.
- Changed response vocabulary name to match input and avoid key collision.
- Added docker support for running worker or Web process by environment.
- Extended tests for manage_taxonomies.jsx file.
- Added description path to listing page.
- Removed export view which isn&#39;t used anymore.
- Refactored code for reloading module into a function.
- Refactored permission check for listing view.
- Updated Haystack to 2.4.0 - Removed automatic index update from deployment.
- Fixed preview link not showing up in list view.
- Grouped REST tests by common endpoint.
- Changed vocabulary term indexing from string to integer.
- Implemented preview link for learning resource panel.
- Added sorting to search results.
- Implemented learning resource panel updating on every panel open.
- Used different haystack index for tests to prevent conflict with
web application.

Version 0.5.0
=============

- Fixed display of vocabulary terms containing spaces.
- Fixed comparison of FileFields to strings.
- Fixed typo in search hint
- Added bootstrap style to vocabulary learning type checkboxes Closes #337
- Changed search box description
- Fixed mutating of this.state which is forbidden
- Added static file parsing to HTML elements.
- Removed vocabulary forms since we are doing this via REST API and React instead
- Reported code coverage for javascript on the command line
- Added function to obtain collections
- Set QUnit timeout to fix test error reporting
- Added HTML reporting of javascript tests
- Added panel for static assets
- Added link to request create repository permission

Version 0.4.0
=============

Expand Down Expand Up @@ -114,7 +209,7 @@ Version 0.1.0
- Added rest app with support for RESTful API
- Added initial authorization support
- Added login requirement for taxonomy app
- Switched to using django storage for course uploads
- Switched to using Django storage for course uploads
- Switched to using Haystack/ElasticSearch for listing page
- Protected course imports
- Protected export view
Expand Down
114 changes: 92 additions & 22 deletions apiary.apib
@@ -1,5 +1,5 @@
FORMAT: 1A
HOST: http://lore.odl.mit.edu/
HOST: http://lore.odl.mit.edu/api/v1/

# LORE

Expand All @@ -21,7 +21,7 @@ URL Structure is `https://{domain}/api/v1/{resource}/{resource_id}/`

*Example: `http://lore.odl.mit.edu/api/v1/repositories/physics-1/` will return a JSON representation of the repository with name "physics-1".*

*Example: `http://lore.odl.mit.edu/api/v1/repositories/physics-1/learningresources/1007/` will return a JSON representation
*Example: `http://lore.odl.mit.edu/api/v1/repositories/physics-1/learning_resources/1007/` will return a JSON representation
of the learning resource with ID=1007.*


Expand Down Expand Up @@ -134,15 +134,16 @@ Create a repository by providing its JSON representation.
"create_date": "2015-06-22"
}

## Group Learningresources
## Group LearningResources

## Learningresource Collection [/repositories/{repo_slug}/learning_resources/{?type_name}]
## LearningResource Collection [/repositories/{repo_slug}/learning_resources/{?type_name}]

+ Parameters
+ repo_slug: `physics-1` (string, required) - slug for the repository
+ type_name: `chapter` (string, optional) - type of learning resource
+ ids: `1,9` (string, optional) - comma separated list of LearningResource ids. Will filter out LearningResources not in this list.

### List Learningresources [GET]
### List LearningResources [GET]

+ Response 200 (application/json)

Expand All @@ -168,19 +169,20 @@ Create a repository by providing its JSON representation.
"xa_nr_attempts": 0,
"xa_avg_grade": 0.0,
"xa_histogram_grade": 0.0,
"terms": []
"terms": [],
"preview_url": "https://www.example.com/courses..."
},
...
]
}

## Learningresource [/repositories/{repo_slug}/learning_resources/{learningresource_id}/]
## LearningResource [/repositories/{repo_slug}/learning_resources/{learningresource_id}/]

+ Parameters
+ repo_slug: `physics-1` (string, required) - slug for the repository
+ learningresource_id: `8` (number, required) - ID of the Learningresource
+ learningresource_id: `8` (number, required) - ID of the LearningResource

### View a Learningresource [GET]
### View a LearningResource [GET]

+ Response 200 (application/json)

Expand All @@ -199,10 +201,11 @@ Create a repository by providing its JSON representation.
"xa_nr_attempts": 0,
"xa_avg_grade": 0.0,
"xa_histogram_grade": 0.0,
"terms": []
"terms": [],
"preview_url": "https://www.example.com/courses..."
}

### Partially Update a Learningresource [PATCH]
### Partially Update a LearningResource [PATCH]

+ Request (application/json)

Expand All @@ -227,10 +230,11 @@ Create a repository by providing its JSON representation.
"xa_nr_attempts": 0,
"xa_avg_grade": 0.0,
"xa_histogram_grade": 0.0,
"terms": []
"terms": [],
"preview_url": "https://www.example.com/courses..."
}

### Update a Learningresource [PUT]
### Update a LearningResource [PUT]

+ Request (application/json)

Expand All @@ -256,18 +260,84 @@ Create a repository by providing its JSON representation.
"xa_nr_attempts": 0,
"xa_avg_grade": 0.0,
"xa_histogram_grade": 0.0,
"terms": []
"terms": [],
"preview_url": "https://www.example.com/courses..."
}

## Group LearningResourceExports

List of LearningResources to be exported. This is stored per user and is deleted on logout.

## LearningResourceExport Collection [/repositories/{repo_slug}/learning_resource_exports/{username}/]

+ Parameters
+ repo_slug: `physics-1` (string, required) - slug for the repository
+ username: `sarah` (string, required) - owner of exports (must be logged in user)

### List LearningResourceExports [GET]

+ Response 200 (application/json)

+ Body

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 13
}
]
}

### Delete LearningResourceExports [DELETE]

Clears the export list for this repository.

+ Response 204 (application/json)

### Add a LearningResource ID to Export list [POST]

+ Request (application/json)

{
"id": 15
}

+ Response 201 (application/json)

{
"id": 15
}

## Group Staticassets
## LearningResourceExport [/repositories/{repo_slug}/learning_resource_exports/{username}/]

+ Parameters
+ repo_slug: `physics-1` (string, required) - slug for the repository
+ username: `sarah` (string, required) - owner of exports (must be logged in user)

### View a LearningResourceExport [GET]

+ Response 200 (application/json)

{
"id": 13
}

### Delete an ID from the LearningResource export list [DELETE]

+ Response 204 (application/json)

## Group StaticAssets

## Staticassets Collection [/repositories/{repo_slug}/learning_resources/{learningresource_id}/static_assets/]
## StaticAssets Collection [/repositories/{repo_slug}/learning_resources/{learningresource_id}/static_assets/]

+ Parameters
+ repo_slug: `physics-1` (string, required) - slug for the repository
+ learningresource_id: `1` (number, required) - ID of the Learningresource
+ learningresource_id: `1` (number, required) - ID of the LearningResource

### List All Staticassets [GET]
### List All StaticAssets [GET]

+ Response 200 (application/json)

Expand All @@ -283,14 +353,14 @@ Create a repository by providing its JSON representation.
]
}

## Staticasset [/repositories/{repo_slug}/learning_resources/{learningresource_id}/static_assets/{static_asset_id}/]
## StaticAsset [/repositories/{repo_slug}/learning_resources/{learningresource_id}/static_assets/{static_asset_id}/]

+ Parameters
+ repo_slug: `physics-1` (string, required) - slug for the repository
+ learningresource_id: `1` (number, required) - ID of the Learningresource
+ static_asset_id: `1` (number, required) - ID of the Staticasset
+ learningresource_id: `1` (number, required) - ID of the LearningResource
+ static_asset_id: `1` (number, required) - ID of the StaticAsset

### View a Staticasset [GET]
### View a StaticAsset [GET]

+ Response 200 (application/json)

Expand Down

0 comments on commit 3e15e0f

Please sign in to comment.