This repository was archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Installation for local development
Anders Markvardsen edited this page May 11, 2018
·
30 revisions
This a guide on how to install the Autoreduction service for local development.
You should be able to setup a local development environment using any of Linux, Windows and Mac.
-
Python 2.7 (the service has not been tried with Python 3 yet)
- On Windows this is from: https://www.python.org/downloads/windows/
- To install Python using the Anaconda distribution: https://www.anaconda.com/download/
-
MySQL-server version 5.6
- Current we must use version 5.6 due to user creation code in test and production code
- On Windows this is: MySqlServer version 5.6
- During install and Type and Networking, optionally untick 'Open Windows Firewall port for network access'
-
mysql-python compatible, which for windows is mysql-python-1.2.5
- pip install mysql-python (before accepting suggested pip install - check the version is correct)
- Or Download and install MySQL-Python
-
Download this git repository
-
Run pip install requirements.txt
- From the directory in which you want to store the autoreduction code do the following
# Clone repository
git clone https://github.com/ISISScientificComputing/autoreduce.git autoreduction
#add the project to the python site packages.
pip install -e autoreduction
cd autoreduction
# Note: if you are using vanilla python you may want to use a virtual environment before running the following
# If you do use a virtual environment use the name venv as it is in the .gitignore
pip install requirements.txt
# This script will move the test_settings.py file to be the setting.py files.
# Note: on windows this can be run in git bash
./Scripts/Build/migrate_test_settings.sh
- Edit the settings.py in the webapp (autoreduction/WebApp/autoreduce_webapp/autoreduce_webapp/settings.py) to point to the services on the development nodes.
- Navigate to
autoreduction/WebApp/autoreduce_webapp/and runpython manage.py runserver - Visit
http://127.0.0.1:8000/in a web browser to see the webapp locally. - If you make changes to the webapp, you will have to re-run
python manage.py runserverfor them to take affect