-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installation: update installation instructions
Signed-off-by: Graeme Watt <graeme.watt@durham.ac.uk>
- Loading branch information
1 parent
0731a25
commit 643c8b0
Showing
3 changed files
with
34 additions
and
30 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
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,56 +1,54 @@ | ||
Installation | ||
============ | ||
|
||
First install HEPData all requirements: | ||
First install all requirements: | ||
|
||
.. code-block:: console | ||
$ mkvirtualenv hepdata3 | ||
(hepdata3)$ pip install -r requirements.txt --pre --src ~/src/ --exists-action i | ||
(hepdata3)$ pip install -e .[postgresql] | ||
$ mkvirtualenv hepdata | ||
$ mkdir ~/src/ | ||
$ cd ~/src/ | ||
$ git clone https://github.com/HEPData/hepdata | ||
$ cd hepdata | ||
(hepdata)$ pip install -e . --pre --upgrade | ||
Next, install and build assets: | ||
|
||
.. code-block:: console | ||
(hepdata3)$ npm update && npm install --silent -g node-sass clean-css uglify-js requirejs | ||
(hepdata3)$ hepdata npm | ||
(hepdata3)$ cdvirtualenv var/hepdata-instance/static | ||
(hepdata3)$ npm install | ||
(hepdata3)$ hepdata collect -v | ||
(hepdata3)$ hepdata assets build | ||
(hepdata)$ npm update && npm install --silent -g node-sass clean-css uglify-js requirejs | ||
(hepdata)$ ./scripts/clean_assets.sh | ||
Next, create the database and database tables if you haven't already done so: | ||
Run Celery: | ||
|
||
.. code-block:: console | ||
(hepdata3)$ hepdata db init | ||
(hepdata3)$ hepdata db create | ||
# -B runs celery beat | ||
(hepdata)$ celery worker -E -B -A hepdata.celery | ||
Run Celery | ||
Next, create the database and database tables if you haven't already done so. | ||
Also create a user (pass your email address as an argument to the script) and populate the database with some records: | ||
|
||
.. code-block:: console | ||
# -B runs celery beat | ||
(hepdata3)$ celery worker -E -B -A hepdata.celery | ||
(hepdata)$ ./scripts/initialise_db.sh your@email.com | ||
Now, start HEPData: | ||
|
||
.. code-block:: console | ||
(hepdata3)$ hepdata --debug run | ||
(hepdata)$ hepdata run --debugger --reload | ||
(hepdata)$ firefox http://localhost:5000/ | ||
Run using honcho | ||
============ | ||
================ | ||
|
||
Honcho will run elasticsearch, redis, celery, and the web application for you automatically. | ||
Just workon your virtual environment, go to the root directory of hepdata source where you can see a file called | ||
Procfile. Then install flower if you haven't done so already, and then start honcho. | ||
|
||
.. code-block:: console | ||
(hepdata3)$ pip install flower | ||
(hepdata3)$ honcho start | ||
(hepdata)$ pip install flower | ||
(hepdata)$ honcho start |
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