Commit Graph

46 Commits

Author SHA1 Message Date
Calen Pennington
6b68f2c0fe Use coffee watch command to watch whole directories, so that it will pick up new coffee files as they are created 2013-06-04 12:52:56 -04:00
Nate Hardison
03a9765b79 Change task.invoke to Rake::Task.invoke
Using `task()` reopens the definition of the task, and all we really
need to do is get a reference to the task itself to invoke it.
2013-06-03 10:00:50 -07:00
Nate Hardison
1fd1f63075 Wrapper tasks for :assets-dependent Jasmine tasks
The :browse_jasmine_<system> and :phantomjs_jasmine_<system> tasks
depend on the :assets task, which needs to receive both :system and
:env arguments. Therefore, new tasks (:browse_jasmine and
:phantomjs_jasmine) are created that do take :system and :env args.
The old :browse_jasmine_<system> and :phantomjs_jasmine_<system>
tasks now wrap the new tasks, passing in <system> as an argument
and 'jasmine' (for :env, since it's hardcoded to 'jasmine' in
django_for_jasmine()).
2013-06-03 09:58:01 -07:00
Nate Hardison
35fb5fa47e Add wrapper task to start LMS/CMS server
The LMS/CMS server startup depends on the :assets task, which needs
to receive :system and :env arguments. Since the existing server
startup tasks didn't take a :system argument, a new command called
:runserver is created that does take :system, :env, and :options
arguments. The old server startup tasks are adjusted to wrap the one
:runserver task that does all of the heavy lifting.
2013-06-03 09:58:01 -07:00
Nate Hardison
1001b315a3 Preprocess assets as Django management command
Rather than directly invoke command-line Python (and Mako) from the
assets Rakefile, or call an external Python script, use a Django
management command to preprocess all asset template files.

An "asset template file" is defined as a static asset file with a
file extension indicating that it needs to be run through a template
engine prior to Sass/CoffeeScript compilation or packaging with other
assets. The preprocess_assets management command will look through
all of the files listed in the `STATICFILES_DIRS`, preprocessing each
as needed. Preprocessing strips off the special template file
extension, creating a new file in the process.

Currently, the only variable accessible in an asset template file is
the `THEME_NAME`, defined in the settings.
2013-06-03 09:58:01 -07:00
Chris Dodge
4c97d16edc add hack to assets.rake to unblock the release train 2013-05-28 23:40:16 -04:00
Ned Batchelder
ebc991cce6 Merge pull request #2094 from edx/ned/make-numpy-and-scipy-both-install
Put numpy into a pre.txt so that everything will actually install.
2013-05-23 12:03:07 -07:00
Calen Pennington
69beea854c Merge pull request #2045 from edx/feature/cale/jasmine-junit-reports
Record junit reports of jasmine tests
2013-05-23 11:06:34 -07:00
chrisndodge
a8084628e1 Merge pull request #1956 from edx/feature/cdodge/autoprovision-forums-master
Feature/cdodge/autoprovision forums master
2013-05-23 09:27:36 -07:00
Calen Pennington
257dae634b Merge pull request #2090 from edx/fix/cale/amazon-ses-errors
Fix/cale/amazon ses errors
2013-05-23 09:17:51 -07:00
Jay Zoldak
e6a1a9faaf Merge branch 'master' into feature/cdodge/autoprovision-forums-master 2013-05-23 10:19:39 -04:00
Nate Hardison
daa0ac2f01 Capture Mako exit code and fail fast if necessary
Capture the exit code of the Mako template engine invocation on
asset preprocessing and abort from the Rake task on failure. This
will prevent the LMS from continuing its attempt to start up,
preventing further configuration errors.
2013-05-22 19:42:22 -07:00
Calen Pennington
b2b6ca5f7b Record junit reports of jasmine tests 2013-05-22 22:01:44 -04:00
Chris Dodge
293d0a8645 special case the db setup for the cms acceptance tests. We need the comment client database tables to be created since we're creating the DB from scratch 2013-05-22 21:58:29 -04:00
Calen Pennington
dcefd9e991 Taught rake test_lms and test_cms to run specific tests by passing a single argument 2013-05-22 21:37:48 -04:00
Nate Hardison
185ab4c35c Make Mako preprocessing a Rake task
Per feedback from @cpennington. This way we'll only preprocess once,
even if the Sass compilation is invoked multiple times.
2013-05-22 12:22:28 -07:00
Nate Hardison
ea3506d2b9 Add general theming capabilities
This commit adds the requisite settings and startup features to
enable integration of themes into the edX platform. It does not
yet provide hooks in any of the templates, but it does cause the
main `lms/static/sass/application.scss` file to `@import` a theme's
base Sass. Template hooks will come down the road.

CHANGELOG
---------
Define a new `MITX_FEATURE`, `USE_CUSTOM_THEME`, that when enabled,
can be used in templates to determine whether or not custom theme
templates should be used instead of the defaults.

Also define a new setting, `THEME_NAME`, which will be used to
locate theme-specific files. Establish the convention that themes
will be stored outside of the `REPO_ROOT`, inside the `ENV_ROOT`,
in a directory named `themes/`. `themes/<THEME_NAME>` will store
the files for a particular theme.

Provide a function, `enable_theme`, that modifies the template and
static asset load paths appropriately to include the theme's files.

Move the main LMS Sass file to a Mako template that conditionally
`@import`s the theme's base Sass file when a theme is enabled.

Add logic to the assets Rakefile to properly preprocess any Sass/
Mako templates before compiling them.
2013-05-22 12:22:27 -07:00
Ned Batchelder
9bf6281339 Merge pull request #2079 from edx/ned/fingerprint-site-packages
Fingerprint the filenames in site-packages to decide when to install req...
2013-05-21 11:37:57 -07:00
Calen Pennington
241ef68f4f Start linting envs files, add task to only pylint errors, and move pylintrc file to the correct location 2013-05-21 09:34:12 -04:00
Ned Batchelder
c947133e54 A better way to compute the hash, that gets the right hash after an install actually installs something. 2013-05-20 14:39:25 -04:00
Ned Batchelder
ec09ac7f29 Put numpy into a pre.txt so that everything will actually install. 2013-05-20 12:57:07 -04:00
Ned Batchelder
23384ca2eb Use backticks so that the command won't echo to the user. 2013-05-20 12:09:28 -04:00
Ned Batchelder
fa87a64984 Missing trailing paren 2013-05-20 12:06:36 -04:00
Ned Batchelder
5b5fbc6b14 Fingerprint the filenames in site-packages to decide when to install requirements. 2013-05-20 11:46:56 -04:00
Ned Batchelder
9834f27eb9 Fingerprint the filenames in site-packages to decide when to install requirements. 2013-05-17 18:15:40 -04:00
Ned Batchelder
5f7e856cf3 Merge pull request #2073 from edx/ned/message-if-no-install-needed
Print a message if the requirements files haven't changed.
2013-05-17 13:08:51 -07:00
Ned Batchelder
5555d41d80 OK, all the phases should have messages. 2013-05-17 16:04:24 -04:00
Calen Pennington
340d39f322 Merge pull request #2069 from edx/fix/cale/coffee-watch-on-osx
Batched coffee --watch compilation in smaller batches
2013-05-17 13:02:08 -07:00
Carlos Andrés Rocha
0042988ea7 Merge pull request #2063 from edx/feature/rocha/lets-use-celery
Add Celery configuration to LMS and CMS
2013-05-17 12:36:23 -07:00
Ned Batchelder
61f135944d Print a message if the requirements files haven't changed. 2013-05-17 14:56:44 -04:00
Calen Pennington
280f09739f Batched coffee --watch compilation in smaller batches
This is to work around an OSx issue that causes EMFILE errors in the
default configuration.
Ref: https://github.com/joyent/node/issues/2479
2013-05-17 14:22:01 -04:00
Kevin Chugh
ef3204da69 Merge pull request #2059 from edx/feature/zoldak/forum-testing
Feature/zoldak/forum testing
2013-05-17 10:10:55 -07:00
Carlos Andrés Rocha
c05efbc31e Added base Celery settings 2013-05-17 11:33:14 -04:00
Ned Batchelder
935905665c Have to look in subdirectories for requirements files. 2013-05-17 11:31:28 -04:00
Jay Zoldak
a1a33eb5e5 Fix path to phantom jasmine now that we install via node 2013-05-17 10:53:14 -04:00
John Jarvis
2fd0b1b972 Merge pull request #2054 from edx/jarv/move-edx-requirements
Jarv/move edx requirements
2013-05-16 12:13:44 -07:00
John Jarvis
a30e31213b rakefile updates 2013-05-16 12:16:21 -04:00
John Jarvis
50160592f7 new location for requirement files 2013-05-16 12:13:40 -04:00
Will Daly
342b3bb0e9 Merge branch 'master' into feature/will/ci-lettuce-tests
Resolved conflict with changes to Rakefile in master

Conflicts:
	rakefile
2013-05-16 11:21:59 -04:00
Jay Zoldak
ed3df10638 Set up rake task for jasmine tests for discussion forums code. 2013-05-16 10:56:57 -04:00
Calen Pennington
0df9f714b8 Install python prereqs before trying to run django or install requirements/local.txt 2013-05-15 15:49:51 -04:00
Calen Pennington
b5c134e21e Make the externally facing asset watch commands wait for user intervention, and add internal tasks that only run as long as the rake process 2013-05-15 15:25:42 -04:00
Calen Pennington
91dce34f77 Be more graceful when terminating background processes 2013-05-15 15:25:42 -04:00
Calen Pennington
089ac002c6 Install prereqs before running pep8 or pylint 2013-05-15 15:25:41 -04:00
Calen Pennington
ed9b91e9d0 Add mechanism for running migrations of developer workspaces 2013-05-15 15:25:41 -04:00
Calen Pennington
9d42bce54f Split rake file into smaller, more manageable pieces 2013-05-15 15:25:35 -04:00