Skip to content

pymeister/groupFourChatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot: Simple Medical Recommendation Bot

Ruff

License: MIT

Basic Commands

Running the Application

Install Postgresql

brew install postgresql@15 # for Mac
apt install postgresql # for Linux
sudo pacman -S postgresql # for Arch Linux

PostgreSQL Download # for Others

Create Database Chatbot

Open postgresql command line tool

psql -U postgres

Create database

postgres=# CREATE DATABASE chatbot;

Connect database

postgres=# \c chatbot

Exit postgresql command line tool

postgres=# \q

Opening and Closing the Python Environment

To open the Python Environment:

source env/bin/activate  # for Linux/Mac
source .\venv\Script\activate  # for Windows

To close the Python Environment:

deactivate

Installing all Python Requirements

Once the Python environment is open run:

pip install -r requirements/local.txt

This install Django and all the required files need to run the program.

Running Basic Commands

Running the Server

Run the server with:

$ python manage.py runserver

Open your browser at http://localhost:8000 to access the chatbot.

Running Static Files

Run static files with:

$ python manage.py collectstatic

Creating Migrations

Create migrations with:

$ python manage.py makemigrations

Apply migrations with:

$ python manage.py migrate

Setting Up Your Users

Creating a Normal User Account

To create a normal user account, simply go to the Sign Up page and fill out the form. Once you submit it, you will see a "Verify Your E-mail Address" page. Open your console to see a simulated email verification message. Copy the link into your browser, and now your user's email should be verified and ready to use.

Creating a Superuser Account

To create a superuser account, run this command:

$ python manage.py createsuperuser

Type Checks

To check your code for type errors, run mypy:

$ mypy chatbot

Test Coverage

To run your tests, first run the test command and then generate an HTML coverage report:

# Run tests with pytest
$ pytest

# Check test coverage
$ coverage run -m pytest
# Generate HTML coverage report
$ coverage html
# Open HTML coverage report
$ open htmlcov/index.html

Logging into the Admin Backend

To log into the admin backend, go to http://localhost:8000/admin in your browser and enter the username and password you set up when creating a superuser account.

About

Group 4 - Chatbot Project for UMGC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •