Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 51 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e24c58d
Setting up GitHub Classroom Feedback
github-classroom[bot] Dec 3, 2023
c6a945d
structure and direction of the project
Isomorphismss Dec 3, 2023
a6735e4
Merge pull request #2 from software-students-fall2023/JW_feature
Isomorphismss Dec 3, 2023
a12218f
MLClient
wowwowooo Dec 9, 2023
e4d40a7
Merge pull request #5 from software-students-fall2023/xs
Isomorphismss Dec 9, 2023
fbca7a7
basic structure
wowwowooo Dec 11, 2023
2535415
Merge pull request #6 from software-students-fall2023/xs
Isomorphismss Dec 11, 2023
ecf9e3d
Finished all functions, some are having small bugs
Isomorphismss Dec 12, 2023
71d3b5e
Merge pull request #7 from software-students-fall2023/JW_feature
wowwowooo Dec 12, 2023
7472188
add archive view and templates
VincentBai-dotcom Dec 13, 2023
232d55f
Merge pull request #8 from software-students-fall2023/haocheng-branch
Isomorphismss Dec 13, 2023
93f72b9
seperate folder for original and eddited images
VincentBai-dotcom Dec 14, 2023
d94a85b
fix typo
VincentBai-dotcom Dec 14, 2023
1dc2fde
views for two set of iamges
VincentBai-dotcom Dec 14, 2023
aada3c0
remove image creation in api/upload_image
VincentBai-dotcom Dec 14, 2023
37e3a95
fix image upload
VincentBai-dotcom Dec 14, 2023
0742ea2
delete image folder
VincentBai-dotcom Dec 14, 2023
5838cda
add image files to gitignore
VincentBai-dotcom Dec 14, 2023
9feebfa
Merge pull request #9 from software-students-fall2023/haocheng-branch
Isomorphismss Dec 14, 2023
52a1c92
Fixed filename bug, query bug, and video bug
Isomorphismss Dec 15, 2023
199ddf2
Merge pull request #10 from software-students-fall2023/JW_feature
wowwowooo Dec 15, 2023
694ce18
Reworked JS logic, updated CSS, structure change
Isomorphismss Dec 15, 2023
542bed9
mongodb secret credentials
Isomorphismss Dec 15, 2023
ea19496
Merge pull request #11 from software-students-fall2023/JW_feature
wowwowooo Dec 15, 2023
17d97eb
test functions
Isomorphismss Dec 15, 2023
7d6331f
Github Action Workflowsss
Isomorphismss Dec 15, 2023
ae301f8
Merge pull request #12 from software-students-fall2023/JW_feature
wowwowooo Dec 15, 2023
b7f51c4
Deployment Preparation
Isomorphismss Dec 15, 2023
15d13c9
Merge pull request #13 from software-students-fall2023/JW_feature
Isomorphismss Dec 15, 2023
a0a9162
server env setting
Isomorphismss Dec 15, 2023
1ed9253
Merge pull request #14 from software-students-fall2023/JW_feature
Isomorphismss Dec 15, 2023
dbc0128
Deplotment
Isomorphismss Dec 15, 2023
03bca75
Merge pull request #15 from software-students-fall2023/JW_feature
Isomorphismss Dec 15, 2023
04619f7
Make sure the images are built first
Isomorphismss Dec 15, 2023
6c75950
Merge pull request #16 from software-students-fall2023/JW_feature
Isomorphismss Dec 15, 2023
de6a0f7
requirements prune, readme
Isomorphismss Dec 16, 2023
639299d
Merge pull request #17 from software-students-fall2023/JW_feature
Isomorphismss Dec 16, 2023
6bfdc23
readme
Isomorphismss Dec 16, 2023
eb810b6
Merge pull request #18 from software-students-fall2023/JW_feature
Isomorphismss Dec 16, 2023
9f95dc5
installation & pytest instructions
Isomorphismss Dec 16, 2023
504a628
Merge pull request #19 from software-students-fall2023/JW_feature
Isomorphismss Dec 16, 2023
8923599
format and readme
Isomorphismss Dec 16, 2023
0b0a10f
Merge pull request #20 from software-students-fall2023/JW_feature
Isomorphismss Dec 16, 2023
58b14a0
readme
Isomorphismss Dec 16, 2023
c063242
Merge pull request #21 from software-students-fall2023/JW_feature
Isomorphismss Dec 16, 2023
68fabd6
pytest
Isomorphismss Dec 16, 2023
619e143
Merge pull request #22 from software-students-fall2023/JW_feature
Isomorphismss Dec 16, 2023
daf05e0
fix
Isomorphismss Dec 17, 2023
f1bfb9b
Merge pull request #23 from software-students-fall2023/JW_feature
wowwowooo Dec 17, 2023
91d6c48
small changes readMe
Isomorphismss Dec 19, 2023
ce18a16
Merge pull request #24 from software-students-fall2023/JW_feature
Isomorphismss Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and Deploy (CD)

on:
push:
branches:
- main

env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

jobs:
build:
name: Build and Push to DockerHub
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Log in to DockerHub
run: echo $DOCKER_TOKEN | docker login -u $DOCKER_USERNAME --password-stdin

- name: Build and Push ML Client Docker Image
run: |
docker build -t $DOCKER_USERNAME/ml_client:latest ./machine-learning-client
docker push $DOCKER_USERNAME/ml_client:latest

- name: Build and Push Web App Docker Image
run: |
docker build -t $DOCKER_USERNAME/web_app:latest ./web-app
docker push $DOCKER_USERNAME/web_app:latest

- name: Logout from DockerHub
run: docker logout

deploy:
name: Deploy to Server
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install sshpass
run: sudo apt-get install -y sshpass

- name: Deploy to Server
env:
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
run: |
# Create .ssh directory and bypass host key checking
mkdir -p ~/.ssh
ssh-keyscan -H 134.209.170.83 >> ~/.ssh/known_hosts

# SSH and Deploy using sshpass
sshpass -p $SSH_PASSWORD ssh -o StrictHostKeyChecking=no [email protected] "
cd 5-final-project-jungle-gap &&
docker-compose down &&
git pull origin main &&
docker pull $DOCKER_USERNAME/web_app:latest &&
docker pull $DOCKER_USERNAME/ml_client:latest &&
docker-compose up -d &&
docker image prune -a -f &&
rm -rf ./machine-learning-client/images_files/* &&
rm -rf ./machine-learning-client/edited_images_files/*
"
28 changes: 28 additions & 0 deletions .github/workflows/ml_client_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Machine-Learning-Client (CI)

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv sync --dev --python $(which python)
pipenv shell --fancy --python $(which python)

- name: Test with pytest (machine-learning-client)
run: |
cd machine-learning-client
pipenv run coverage run -m pytest
pipenv run coverage report --fail-under=80
28 changes: 28 additions & 0 deletions .github/workflows/web_app_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Web-App (CI)

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv sync --dev --python $(which python)
pipenv shell --fancy --python $(which python)

- name: Test with pytest (web-app)
run: |
cd web-app
pipenv run coverage run -m pytest
pipenv run coverage report --fail-under=80
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,7 @@ dmypy.json

# Cython debug symbols
cython_debug/

# Image Files
machine-learning-client/edited_images_files
machine-learning-client/images_files
27 changes: 27 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"
pytest = "*"
pytest-flask = "*"
pylint = "*"
black = "*"
mongomock = "*"
flask-cors = "*"
pymongo = "*"
passlib = "*"
opencv-python = "*"
pylance = "*"
requests = "*"
face-recognition = "*"
setuptools = "*"
coverage = "*"
python-dotenv = "*"

[dev-packages]

[requires]
python_version = "3.12"
811 changes: 811 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

Loading