These steps only need to be completed once.
These instructions are for WSL. To find the mac equivalent, visit https://eecs485.org/
- git clone [email protected]:aban1/NewCharlaBots.git # clones repo into a new folder called NewCharlaBots
- navigate to /NewCharlaBots
- sudo apt-get install python3 python3-pip python3-venv python3-wheel python3-setuptools
- sudo apt-get install sqlite3 # installs sqlite3
- sqlite3 var/NewCharlaBots.sqlite3 < sql/schema.sql # enters schema into the database
- python3 -m venv env #creates a python virtual environment
- source env/bin/activate #activates python virtual env
- pip install -r requirements.txt #installs all dependencies
- pip install -e . #installs all necessary python packages
The following commands are run within the NewCharlaBots folder:
- source env/bin/activate # activates python virtual env
- npx webpack # compiles JavaScript files for browser use (ignore error about schema-utils)
- ./bin/run # runs a bash script to start a dev Flask server (first remove the npx webpack line if present. You will only need to do this once)
- Open localhost http://localhost:8000/ in a browser # displays the app in a browser
to run all tests: '''npm test to run a specific test: '''npm test [testFileName] to run code coverage: '''npm test -- --coverage
CharlaBots closely follows 485 project structure (https://eecs485.org/).
chat.js: chat with 1 bot
chat1.js: js shared by chat with 1 bot and chat with 2 bots
chat2.js: chat with 2 bots
createLang.js: create bot language
editor.js: edit bot language
messages.js: handles messages arrays for chat pages
chat.html: chat with 1 bot
chat2.html: chat with 2 bots
create.html: create a bot
createLang.html: create a new language
editor.html: edit a bot
index.html: home page
basic.css: basic styling for all pages
chats.css: stlying for chat components
codeEditor.css: styling for code editing components
form.css: styling for form components
index.py: functions for routing
This project uses SQLite.
schema.sql: database organization