A Django based application that provides a REST API, as well as manual and automated tools for search service data.
python3 -m venv projectfolder
and move to the directory cd projectfolder/
git clone git@github.com:UCF/Search-Service-Django.git src
and move to the directory cd src/
source ../bin/activate
pip install -r requirements.txt
cp gulp-config.tmpl.json gulp-config.json
, then modify as necessarynpm install
gulp default
cp settings_local.tmpl.py settings_local.py
, then modify to add API keys and the like.
STATIC_ROOT
or STATICFILES_DIRS
.python manage.py deploy
. This command is the equivelent of running the following individual commands:
a. python manage.py migrate
b. python manage.py collectstatic -l
STATIC_ROOT
and add a static root path to STATICFILES_DIRS
in settings_local.py.python manage.py createsuperuser
python manage.py loaddata fixture-name
. Fixtures, if available, are included per-app in a fixtures
directory.
colleges
fixture is loaded before loading the collegeoverrides
fixture.python manage.py runserver
NOTE: to build/test Archimedes, you must set LOCAL = True
in your settings_local.py.
npm install
within the archimedes
directory.ng build --watch
to view app during development.ng build -c production
to compile angular js for production environment.There are some additional libraries necessary to run some of the management command scripts not meant to be run on a server. For example, the manage.py generate-career-weights
command uses the spacy
package and its associated library of words, which can take up around .5GB of space, so we want to avoid installing that on servers.
The install these additional packages, run the following: pip install -r dev-requirements.txt
.
The pip dependency lxml
requires some additional libraries to be installed on the server the application is running on. You can run the following commands to install:
Ubuntu
sudo apt-get install -y libxml2-dev libxslt1-dev
RHEL
sudo yum install libxml2 libxml2-devel libxml2-python libxslt libxslt-devel
The requirements.txt
and dev-requirements.txt
files in this project are generated using the pip-tools
package. All package information is tracked within the pyproject.toml
file and then dependencies are resolved using the following commands:
Production requirements.txt
pip-compile -o requirements.txt pyproject.toml
Dev requirements.txt
pip-compile --extra=dev --output-file=dev-requirements.txt pyproject.toml
If you do not already have pip-tools installed, you can install them with the following command: pip install pip-tools
.