Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ Toddi Norum <toddi@edx.org>
Xavier Antoviaque <xavier@antoviaque.org>
Ali Reza Sharafat <ali.sharafat@gmail.com>
Avinash Sajjanshetty <avinashsajjan@gmail.com>
David Glance <david.glance@gmail.com>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
from contentstore.utils import delete_course_and_groups


#
# To run from command line: rake cms:delete_course LOC=edX/111/Foo1
#
class Command(BaseCommand):
help = '''Delete a MongoDB backed course'''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#
# Run it this way:
# ./manage.py cms --settings dev edit_course_tabs --course Stanford/CS99/2013_spring
# Or via rake:
# rake django-admin[edit_course_tabs,cms,dev,"--course Stanford/CS99/2013_spring --delete 4"]
#
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
Expand Down
1 change: 0 additions & 1 deletion cms/djangoapps/contentstore/management/commands/xlint.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Verify the structure of courseware as to it's suitability for import
To run test: rake cms:xlint DATA_DIR=../data [COURSE_DIR=content-edx-101 (optional parameter)]
"""
from django.core.management.base import BaseCommand, CommandError
from xmodule.modulestore.xml_importer import perform_xlint
Expand Down
2 changes: 1 addition & 1 deletion cms/envs/bok_choy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

######################### Testing overrides ####################################

# Needed for the `reset_db` management command
# Needed for the reset database management command
INSTALLED_APPS += ('django_extensions',)

# Redirect to the test_root folder within the repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Preprocess templatized asset files, enabling asset authors to use
Python/Django inside of Sass and CoffeeScript. This preprocessing
will happen before the invocation of the asset compiler (currently
handled by the asset Rakefile).
handled by the assets paver file).

For this to work, assets need to be named with the appropriate
template extension (e.g., .mako for Mako templates). Currently Mako
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class Command(BaseCommand):
"""Add our handler to the space where django-admin looks up commands."""

# TODO: revisit now that rake has been deprecated
# It appears that with the way Rake invokes these commands, we can't
# have more than one arg passed through...annoying.
args = ("course_id", )
Expand Down
1 change: 1 addition & 0 deletions docs/en_us/developers/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Internationalization

i18n.rst
i18n_translators_guide.rst
pavelib.rst

Indices and tables
==================
Expand Down
172 changes: 172 additions & 0 deletions docs/en_us/developers/source/pavelib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
*******************************************
Paver
*******************************************


Paver provides a standardised way of managing development and operational tasks in edX.

To run individual commands, use the following syntax:

paver <command_name> --option=<option value>


Paver Commands
*******************************************

Paver commands are grouped as follows:

- Prereqs_ Install all of the prerequisite environments for Python, Node and Ruby
- Docs_ Docs is used to build and then optionally display the EdX docs relating to development, authoring and data management
- Assets_ Assets will compile Sass (CSS), Coffeescript (Javascript) and XModule assets. Optionally it can call Django’s collectstatic method
- `Run Servers`_ Run servers


.. _Prereqs:

Prereqs
=============

Install all of the prerequisite for Python, Node and Ruby

**install_prereqs** : installs Ruby, Node and Python requirements

::

paver install_prereqs

..


.. _Docs:

Docs
=============

Docs is used to build and then optionally display the EdX docs relating to development, authoring and data management

**build_docs**: Invoke sphinx 'make build' to generate docs.

*--type=* <dev, author, data> Type of docs to compile

*--verbose* Display verbose output

::

paver build_docs --type=dev --verbose

..


.. _Assets:

Assets
=============

Assets will compile Sass (CSS), CoffeeScript (Javascript) and XModule assets. Optionally it can call Django's collectstatic command.


**update_assets**: Compiles Coffeescript, Sass, Xmodule and runs collectstatic

*system* lms or studio

*--settings=* Django settings e.g. aws, dev

*--debug* Disable Sass compression

*--skip-collect* Skip collection of static assets

::

paver update_assets lms

..

.. _Run Servers:

Run Servers
=============

**lms**: runs LMS server

*--settings=* Django settings e.g. aws, dev

*--fast* Skip updating assets

::

paver lms --settings=dev

..


**studio**: runs Studio

*--settings=* Django settings e.g. aws, dev

*--fast* Skip updating assets

::

paver studio --settings=dev

..

**devstack**: runs LMS or Studio (for use within a Vagrant devstack VM)

*system* LMS or Studio

*--fast* Skip updating assets

::

paver devstack lms

..


**run_all_servers**: runs lms, cms and celery workers

*--settings=* Django settings e.g. aws, dev

*--worker_settings=* Django settings for celery workers


::

paver run_all_servers --settings=dev --worker_settings=celery

..


**run_celery**: runs celery for specified system

*--settings=* Environment settings e.g. aws, dev

::

paver celery --settings=dev

..

**update_db**: runs syncdb and then migrate

*--settings=* Django settings e.g. aws, dev

::

paver update_db --settings=dev

..


**check_settings**: checks settings files

*system*: System to check (lms or studio)
*settings*: Django settings to check.

::

paver check_settings lms aws

..

18 changes: 9 additions & 9 deletions docs/en_us/internal/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

To install all of the libraries needed for our rake commands, run `bundle install`.
This will read the `Gemfile` and install all of the gems specified there.
Note: Rake has been deprecated to the Python Paver. This is only needed until rake is fully deprecated

### Python

Expand Down Expand Up @@ -46,7 +47,7 @@ After MongoDB daemon is successfully running, check out the course data
directories that you want to work with into the `GITHUB_REPO_ROOT` (by default,
`../data`). Then run the following command:

rake resetdb
paver update_db

## Installing

Expand All @@ -60,10 +61,10 @@ the repo:

Both the LMS and Studio can be started using the following shortcut tasks

rake lms # Start the LMS
rake cms # Start studio
rake lms[cms.dev] # Start LMS to run alongside Studio
rake lms[cms.dev_preview] # Start LMS to run alongside Studio in preview mode
paver lms # Start the LMS
paver studio # Start studio
paver lms --settings=cms.dev # Start LMS to run alongside Studio
paver lms --settings=cms.dev_preview # Start LMS to run alongside Studio in preview mode

Under the hood, this executes `./manage.py {lms|cms} --settings $ENV runserver`,
which starts a local development server.
Expand All @@ -72,13 +73,12 @@ Both of these commands take arguments to start the servers in different environm
or with additional options:

# Start the LMS using the test configuration, on port 5000
rake lms[test,5000] # Executes ./manage.py lms --settings test runserver 5000
paver lms --settings=test --port=5000 # Executes ./manage.py lms --settings test runserver 5000

*N.B.* You may have to escape the `[` characters, depending on your shell: `rake "lms[test,5000]"`
To get a full list of available paver tasks, run:

To get a full list of available rake tasks, use:
paver --help

rake -T

### Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion docs/en_us/internal/discussion.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ To fully test the discussion forum, you might want to act as a moderator or an a

First make sure that the database is up-to-date:

rake resetdb
paver update_db

If you have created users in the edx-platform django apps when the comment service was not running, you will need to one-way sync the users into the comment service back end database:

Expand Down
2 changes: 1 addition & 1 deletion lms/envs/bok_choy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

######################### Testing overrides ####################################

# Needed for the `reset_db` management command
# Needed for the reset database management command
INSTALLED_APPS += ('django_extensions',)

# Redirect to the test_root folder within the repo
Expand Down
7 changes: 3 additions & 4 deletions lms/static/coffee/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ Conveniently, you can install Node via `apt-get`, then use npm:
Compiling
---------

The dev server will automatically compile coffeescript files that have changed.
Simply start the server using:

$ rake runserver
CoffeeScript is compiled when you update assets using the command:

$ paver update_assets

Testing
-------
Expand Down
1 change: 1 addition & 0 deletions pavelib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__all__ = ["assets", "servers", "docs", "prereqs"]
Loading