SnoVault Database Framework |
---|
WARNING: PRE-ALPHA RELEASE DO NOT EXPECT TO WORK OUT OF BOX |
Step 1: Verify that homebrew is working properly: |
|
Step 2: Install or update dependencies: |
|
|
|
|
If you need to update dependencies: |
|
|
|
Step 3: Run buildout: |
|
|
|
|
|
|
|
|
If you wish to completely rebuild the application, or have updated dependencies: |
|
|
Step 4: Start the application locally |
In one terminal startup the database servers and nginx proxy with: |
|
This will first clear any existing data in /tmp/snovault. |
Then postgres and elasticsearch servers will be initiated within /tmp/snovault. |
An nginx proxy running on port 8000 will be started. |
The servers are started, and finally the test set will be loaded. |
In a second terminal, run the app with: |
|
Indexing will then proceed in a background thread similar to the production setup. |
Browse to the interface at http://localhost:8000/. |
Running tests |
To run specific tests locally:
$ bin/test -k test_name
To run with a debugger:
$ bin/test --pdb
Specific tests to run locally for schema changes:
$ bin/test -k test_load_workbook
$ bin/test -k test_edw_sync
Run the Pyramid tests with:
$ bin/test -m "not bdd"
Run the Browser tests with:
$ bin/test -m bdd -v --splinter-webdriver chrome
Run the Javascript tests with:
$ npm test
Or if you need to supply command line arguments:
$ ./node_modules/.bin/jest
We use the SASS and Compass CSS preprocessors. The buildout installs the SASS and Compass utilities and compiles the CSS. When changing the SCSS source files you must recompile the CSS using one of the following methods:
Compass can watch for any changes made to .scss files and instantly compile them to .css. To start this, from the root of the project (where config.rb is) do:
$ bin/compass watch
You can specify whether the compiled CSS is minified or not in config.rb. (Currently, it is set to minify.)
$ bin/compass compile
Again, you can specify whether the compiled CSS is minified or not in config.rb.
Also see the Compass Command Line Documentation and the Configuration Reference.
And of course:
$ bin/compass help
To setup SublimeLinter with Sublime Text 3, first install the linters:
$ easy_install-2.7 flake8
$ npm install -g jshint
$ npm install -g jsxhint
After first setting up Package Control (follow install and usage instructions on site), use it to install the following packages in Sublime Text 3:
- sublimelinter
- sublimelinter-flake8
- sublimelinter-jsxhint
- jsx
- sublimelinter-jshint