Skip to content

Commit

Permalink
Merge backend new and backend and delete backend new directory (#156)
Browse files Browse the repository at this point in the history
* added pylint workflow w/artifacts

run: pylint --fail-under=1 $(find . -name "*.py" | xargs)
note: set the failure threshold as indicated above

actions/starter-workflows#636 (comment)

* Added CodeQL & Pylint badges, edits

* Added CodeQL badge
* Added Pylint badge
* Minor edits: updated git clone steps

* Lowered pylint failure theshold

* Update and rename build.yml to coveralls.yml

* Added test files to pylint.yml

* Updated py files to improve pylint score

* Fixed error in coveralls.yml

* Removed individual tests in pylint.yml

* Added pylint labels

* Added test workflow

* Update and rename nodejsTest.yml to nodejs.yml

* Update nodejs.yml

* Update nodejs.yml

* Added workflow build badge to README

* Added yet another workflow

 All for the sake of a test badge.

* Added test badge

* Revert "group25 workflows"

* Added post to Service.js and connected login form (incomplete)

* Added appropriate error messages and display for errors

* Added Sign up form

* Added error handling and redirecting for login and sign up

* fix to react compile warning

* Dashboard and tag edits are now limited by user

* New tags can now be saved in the database

* Adding Product Controller and Test Cases

* Adding more user auth and product auth test cases

* Changing gitignore

* Fixing test cases for user-auth class

* Removing test cases which are not used

* Commented out unused tests, added pylint comments

* Restored and commented out unused tests
* Added pylint skip comments

* Removing merging backend and backend-new into a single directory

* Increasing Pylint Score

* Increasing Pylint score

* Restored deleted backend files

* Removing backend-new and merging it with backend dir

Co-authored-by: Leila Moran <lmmoran@ncsu.edu>
Co-authored-by: Emily Tracey <etracey@ncsu.edu>
Co-authored-by: peeyush10234 <ptaneja@ncsu.edu>
  • Loading branch information
4 people committed Nov 4, 2021
1 parent 0765989 commit 49d3653
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 359 deletions.
12 changes: 0 additions & 12 deletions backend-new/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions backend-new/linter.py

This file was deleted.

31 changes: 0 additions & 31 deletions backend-new/requirements.txt

This file was deleted.

17 changes: 10 additions & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM python:3.8
COPY ./requirements.txt /usr/src/app/requirements.txt
WORKDIR /usr/src/app
RUN pip install --upgrade pip
FROM python:3.8.1

ENV APP_HOME /app
WORKDIR $APP_HOME

COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /usr/src/app
EXPOSE 5000

ENTRYPOINT ["python"]
CMD ["index.py"]
CMD ["app.py"]

2 changes: 2 additions & 0 deletions backend-new/app.py → backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

from flask import Flask
from os import environ
from flask_cors import CORS

app = Flask(__name__)
from auth_controller import *
from products import *
from product_controller import *
from db_init import db
app.secret_key = "testing"
CORS(app)

if __name__ == "__main__":
app.run(debug=True, port=environ.get("PORT", 5000) , host='0.0.0.0')
Expand Down
35 changes: 0 additions & 35 deletions backend/app/__init__.py

This file was deleted.

6 changes: 0 additions & 6 deletions backend/app/controllers/__init__.py

This file was deleted.

96 changes: 0 additions & 96 deletions backend/app/controllers/auth_controller.py

This file was deleted.

115 changes: 0 additions & 115 deletions backend/app/controllers/products.py

This file was deleted.

21 changes: 0 additions & 21 deletions backend/app/dist/404.html

This file was deleted.

15 changes: 0 additions & 15 deletions backend/app/dist/index.html

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion backend-new/db_init.py → backend/db_init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pymongo

client = pymongo.MongoClient("mongodb+srv://bot:bot123@cluster0.xph5e.mongodb.net/myFirstDatabase?retryWrites=true&w=majority")
client = pymongo.MongoClient("mongodb+srv://bot:bot123@cluster0.xph5e.mongodb.net/feature-hunt?retryWrites=true&w=majority")
db = client.get_database('feature-hunt')
records = db.users
product_records = db.products

0 comments on commit 49d3653

Please sign in to comment.