This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for course/module REST API.
- Loading branch information
1 parent
69a3a3d
commit a999c12
Showing
34 changed files
with
892 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[run] | ||
data_file=/tmp/coverage | ||
|
||
[report] | ||
omit=*tox* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.pyc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
language: python | ||
script: | ||
- docker-compose run -e TOX_WORK_DIR=/tmp web tox | ||
- docker-compose run web pylint courses ccxcon | ||
- docker-compose up dredd | ||
- docker-compose run dredd dredd | ||
services: | ||
- docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ubuntu:trusty | ||
MAINTAINER ODL DevOps <mitx-devops@mit.edu> | ||
|
||
# Add package files | ||
WORKDIR /tmp | ||
|
||
# Install base packages | ||
COPY apt.txt /tmp/apt.txt | ||
RUN apt-get update &&\ | ||
apt-get install -y $(grep -vE "^\s*#" apt.txt | tr "\n" " ") &&\ | ||
ln -s /usr/bin/nodejs /usr/bin/node &&\ | ||
pip install pip --upgrade &&\ | ||
npm install -g dredd | ||
|
||
# Add non-root user. | ||
RUN adduser --disabled-password --gecos "" mitodl | ||
|
||
# Install project packages | ||
|
||
# Python 2 | ||
COPY requirements.pip /tmp/requirements.pip | ||
COPY dredd_requirements.pip /tmp/dredd_requirements.pip | ||
|
||
RUN pip install -r requirements.pip &&\ | ||
pip install -r dredd_requirements.pip | ||
|
||
# Python 3 | ||
RUN pip3 install -r requirements.pip | ||
|
||
# Add project | ||
COPY . /src | ||
WORKDIR /src | ||
RUN chown -R mitodl:mitodl /src | ||
|
||
RUN apt-get clean && apt-get purge | ||
USER mitodl | ||
|
||
# Set pip cache folder, as it is breaking pip when it is on a shared volume | ||
ENV XDG_CACHE_HOME /tmp/.cache | ||
|
||
# Set and expose port for uwsgi config | ||
EXPOSE 8077 | ||
ENV PORT 8077 | ||
CMD uwsgi uwsgi.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'apiaryio' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
apiaryio (0.3.2) | ||
json (~> 1.8) | ||
rack (~> 1.6.4) | ||
rake (~> 10.4) | ||
rest-client (~> 1.8) | ||
thor (~> 0.19.1) | ||
domain_name (0.5.25) | ||
unf (>= 0.0.5, < 1.0.0) | ||
http-cookie (1.0.2) | ||
domain_name (~> 0.5) | ||
json (1.8.3) | ||
mime-types (2.6.2) | ||
netrc (0.11.0) | ||
rack (1.6.4) | ||
rake (10.4.2) | ||
rest-client (1.8.0) | ||
http-cookie (>= 1.0.2, < 2.0) | ||
mime-types (>= 1.16, < 3.0) | ||
netrc (~> 0.7) | ||
thor (0.19.1) | ||
unf (0.1.4) | ||
unf_ext | ||
unf_ext (0.0.7.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
apiaryio | ||
|
||
BUNDLED WITH | ||
1.10.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
# CCXCon | ||
[![Build Status](https://travis-ci.org/mitodl/ccxcon.svg)](https://travis-ci.org/mitodl/ccxcon) | ||
|
||
CCXCon is a simple API serves as an interface between edX running instances and different MIT apps. | ||
|
||
Implements the APIs as described here http://docs.ccxcon.apiary.io/ | ||
|
||
## Setup | ||
|
||
You can run the entire project through docker. | ||
|
||
``` | ||
pip install docker-compose | ||
docker-compose up | ||
``` | ||
|
||
From there, you can visit the minimal web-ui at http://localhost:8077/ | ||
|
||
## Tests | ||
|
||
You can run the dredd API tests via the command `docker-compose up dredd`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.