Chat server with online toxic message detection.
- Run ai-service:
twistd --nodaemon --python chat/server/ai_service.py
BTW: nodaemon option runs service in the terminal process, you can run in background if you remove that option and add--pidfile=ai --log=ai
.ai.pid
then contains PID of the service (kill it when you're done). - Run chat-service:
twistd --nodaemon --python chat/server/chat_service.py
Same as above applies to running in the background. - Run client:
python chat/client.py 8080
-
cd to top level project directory.
-
Create new conda environment from
environment.yml
file:
conda env create -n chat_env -f=environment.yml
-
Activate new environment:
conda activate chat_env
-
Install ai and chat packages in editable mode:
pip install -e .
Locally:
-
Create new branch from chat_dev branch (naming convention: feature/feature_name):
git checkout chat_dev
git checkout -b feature/feature_name
-
Make some changes:
git add file1 file2...
git commit -m "Best commit ever..."
-
Push to your forked repo (
-u
option to set remote tracking branch):
git push -u origin feature/feature_name
On GitHub - once you have the feature ready for merge:
-
Create a PR from origin:feature/feature_name to upstream:chat_dev.
-
Once PR is merged, pull changes to your local git repo and push them onto your fork:
git pull upstream chat_dev
git push origin chat_dev
-
Clean up your working branches (from another branch):
git branch -d feature/feature_name
git push --delete origin feature/feature_name
- Before you create a new branch from chat_dev - do
git pull upstream chat_dev
. - If you add new dependency, e.g.
scikit-learn
- add it torequirements.txt
andenvironment.yml
files.