"Sharing 'Positive' Stories using sentiment analysis"
- Clone the Repository
$ git clone https://github.com/louisheery/positive-statesman.git
- cd into the repository
cd /<containing-folder>/positive-statesman/
- Install python requirements
pip3 install -r requirements.txt
- Install JavaScript packages
yarn install
- Apply database migrations to local SQLite database
python3 manage.py migrate --fake-initial
python3 manage.py makemigrations
python3 manage.py migrate
- Seed categories
python3 manage.py seed_categories
- Start a local server
python3 manage.py runserver
- The server is now running at http://127.0.0.1:8000/. Opening it in a browser will show you the web application
- Fetch 100 articles from Alyien API (this might take a few minutes)
python3 manage.py generate_articles
-
All django database models are stored in articles/models.py
-
Create your superuser account
python3 manage.py createsuperuser
-
Start a local server (See "How to run the Positive Statesman")
-
Go to http://127.0.0.1:8000/admin and login with your previously created superuser account
- Run frontend in developer mode
yarn dev
- Run jest
yarn jest --coverage
- Inspect coverage report in console or HTML version in coverage/lcov-report/index.html
python3 manage.py test articles/
- Install the graphviz package
brew install graphviz
- Print ER-Diagram
python3 manage.py graph_models articles -o file_dump/diagrams/er_diagram_`date "+%Y%m%d-%H%M%S"`.svg
- You can now find the svg file in file_dump/diagrams/
The React frontend can be found in frontend/src/