From 190d0933c8ef730f4395bffbca335c412021b924 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 29 Apr 2022 17:30:33 -0700 Subject: [PATCH 1/8] heroku deploy --- .DS_Store | Bin 0 -> 6148 bytes .idea/.gitignore | 8 ++++++++ .idea/PortfolioProject.iml | 10 ++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 +++++ .idea/inspectionProfiles/Project_Default.xml | 13 +++++++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ __pycache__/main.cpython-310.pyc | Bin 0 -> 1811 bytes __pycache__/recipe.cpython-310.pyc | Bin 0 -> 5978 bytes 11 files changed, 60 insertions(+) create mode 100644 .DS_Store create mode 100644 .idea/.gitignore create mode 100644 .idea/PortfolioProject.iml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 __pycache__/main.cpython-310.pyc create mode 100644 __pycache__/recipe.cpython-310.pyc diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a4ec3f4469727b11d44c2132e1f8f3e9a7759e73 GIT binary patch literal 6148 zcmeHKOHRWu6dZ@DA9d3u8>F0|5;q7{yI{cv4p3-Xl}e?pXsN_5d+xv$I3FvR_iUBK zDLaG^dQW;D$Cd_I?lHr-#Sn zQ)Roeh~2?8MjUU5D`KD8X{30mDIPhCoHN=GkB#vjDOxBiqWLHDh~2~%J3i}_1gHT;|bAbHE&^I&k7Id$RwJzCZt0MRsKlm;?XH0oNGb3 + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..7a2bd3b --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..dc9ea49 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e6b36c4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/__pycache__/main.cpython-310.pyc b/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f860590748a119d00eefc687e7f2167f406cd030 GIT binary patch literal 1811 zcmZuyOK;mo5Z)!15=A|o*p3|(sL(?I0)<)2ZP5Zj&^Boc1c7Z-4ubMRP}-GDi?1%J zIu_)Uay9Z7oMV4WZ$0j{r~ZT*E!vrt>^NyD>~d!IF*DzMLuJjTL*V)Kx540bg^=G- zx&1IuzJgIGm^kqXr`(9CPvLFGMq>JA!hDukzLiw`N>cT!iS64I_p!K^IKHE0E3PLE zzmYWkX43Loln7I_7u4^F&gB}fyrI0x?NO2dJvOCRrSPI_V^Lk%;y`H|}>!OIpX(H0HyX*V`K$3m8qO9-Yu$U-Y3LZ)DrmPVd zj#XQVlnWV@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z!5=J>1fHaB|R0f2usYCnQW+Kukw;i}*5 z0nU|UryK|m$wDh)hP$CGxG>t^2_=zKgh@mgP`icM>}iysW!Bdo_`E-i5B-ErF$)LB zrvI|P4Ujg%`Atr)DK&WI23nloljP3FX7xu&y&cqTmhzWT$pB{qlGvVTKh#r4TVP7^NTGY0b zS*pzv4%#f$=4G~iBoZ~W*>}z%asenos9VeEv8twG5_$?<9-mc8pTyA9q`QAWzOI{g z$IDybUkZ?VRmO)y*~XE_t*v+n(Npks;NQFzrQstoW6{6hYohbW9uc3$?pq)F*9Y-P zcI=zoG?aM0>kd+dP`42>DsfSSCK~6ChRAKV<7z7tTqsKyJ57D4=`%^k?(2mQX<_*` z7EtiDoN=kbGxf-_BEo)mG$P7h U#UW3>cCWc>1d`}**4LK#U&6#JssI20 literal 0 HcmV?d00001 From 432c20c917e0e27a188b587ffac038faa816c78a Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 29 Apr 2022 20:05:22 -0700 Subject: [PATCH 2/8] heroku commit --- Procfile | 1 + main.py | 2 +- recipes/recipes.json | 39 +++++++++++++++++++++++++++++++++++++++ requirements.txt | 7 +++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Procfile create mode 100644 requirements.txt diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..b3868ba --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn app:main \ No newline at end of file diff --git a/main.py b/main.py index 004b1e5..982d071 100644 --- a/main.py +++ b/main.py @@ -58,4 +58,4 @@ def add_recipe(): if __name__ == "__main__": book = RecipeBook() - app.run(debug=False) + app.run(debug=True) diff --git a/recipes/recipes.json b/recipes/recipes.json index cfb3eb8..1385a43 100644 --- a/recipes/recipes.json +++ b/recipes/recipes.json @@ -22,5 +22,44 @@ "Yeast": 0, "Starter": 125 } + }, + "0": { + "quantity": "4", + "name": "Whole Wheat", + "ingredients": { + "AP Flour": 500, + "WW Flour": 500, + "Rye Flour": 0, + "Water": 800, + "Salt": 23, + "Yeast": 15, + "Starter": 0 + } + }, + "1": { + "quantity": "2", + "name": "Whole Wheat * 0.5", + "ingredients": { + "AP Flour": 250, + "WW Flour": 250, + "Rye Flour": 0, + "Water": 400, + "Salt": 12, + "Yeast": 8, + "Starter": 0 + } + }, + "2": { + "quantity": "1", + "name": "Sandwich", + "ingredients": { + "AP Flour": 400, + "WW Flour": 0, + "Rye Flour": 100, + "Water": 300, + "Salt": 15, + "Yeast": 0, + "Starter": 12 + } } } \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3017968 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +click==8.1.3 +Flask==2.1.2 +gunicorn==20.1.0 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.1 +Werkzeug==2.1.2 From f6cd10bc93d6d39fe722e196bd85f8a5ee8f56f2 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 29 Apr 2022 20:17:16 -0700 Subject: [PATCH 3/8] added runtime --- runtime.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 runtime.txt diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..333d904 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.10.0 \ No newline at end of file From f1120992c916acf181fb7789fb7ae8ec1bad6007 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 29 Apr 2022 20:24:11 -0700 Subject: [PATCH 4/8] edit Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index b3868ba..dc46f1b 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app:main \ No newline at end of file +web: gunicorn main:app \ No newline at end of file From 04eae29ff0bf88a75ded5c8c694d2b24e884b6e9 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 29 Apr 2022 20:26:24 -0700 Subject: [PATCH 5/8] emptied json file --- recipes/recipes.json | 66 +------------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/recipes/recipes.json b/recipes/recipes.json index 1385a43..9e26dfe 100644 --- a/recipes/recipes.json +++ b/recipes/recipes.json @@ -1,65 +1 @@ -{ - "3": { - "quantity": "2", - "name": "Sourdough", - "ingredients": { - "AP Flour": 800, - "WW Flour": 200, - "Water": 700, - "Salt": 20, - "Yeast": 0, - "Starter": 50 - } - }, - "7": { - "quantity": "5", - "name": "Sourdough * 2.5", - "ingredients": { - "AP Flour": 2000, - "WW Flour": 500, - "Water": 1750, - "Salt": 50, - "Yeast": 0, - "Starter": 125 - } - }, - "0": { - "quantity": "4", - "name": "Whole Wheat", - "ingredients": { - "AP Flour": 500, - "WW Flour": 500, - "Rye Flour": 0, - "Water": 800, - "Salt": 23, - "Yeast": 15, - "Starter": 0 - } - }, - "1": { - "quantity": "2", - "name": "Whole Wheat * 0.5", - "ingredients": { - "AP Flour": 250, - "WW Flour": 250, - "Rye Flour": 0, - "Water": 400, - "Salt": 12, - "Yeast": 8, - "Starter": 0 - } - }, - "2": { - "quantity": "1", - "name": "Sandwich", - "ingredients": { - "AP Flour": 400, - "WW Flour": 0, - "Rye Flour": 100, - "Water": 300, - "Salt": 15, - "Yeast": 0, - "Starter": 12 - } - } -} \ No newline at end of file +{} \ No newline at end of file From 800bfea2275db87f514d8c08a594bcc91947b20e Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 29 Apr 2022 20:30:58 -0700 Subject: [PATCH 6/8] minor changes --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 982d071..e020838 100644 --- a/main.py +++ b/main.py @@ -7,7 +7,7 @@ from flask import Flask, redirect, render_template, request from recipe import Recipe, RecipeBook app = Flask(__name__) - +book = RecipeBook() @app.route("/") def home(): @@ -57,5 +57,4 @@ def add_recipe(): if __name__ == "__main__": - book = RecipeBook() - app.run(debug=True) + app.run(debug=False) From 6840cc506d2abcf4d06c02a547874f8fd2a86581 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 2 May 2022 22:06:42 -0700 Subject: [PATCH 7/8] Improved delete, scaling added --- recipes/recipes.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/recipes/recipes.json b/recipes/recipes.json index 9e26dfe..a68bee6 100644 --- a/recipes/recipes.json +++ b/recipes/recipes.json @@ -1 +1,15 @@ -{} \ No newline at end of file +{ + "0": { + "quantity": "2", + "name": "Sourdough", + "ingredients": { + "AP Flour": 500, + "WW Flour": 500, + "Rye Flour": 0, + "Water": 0, + "Salt": 0, + "Yeast": 0, + "Starter": 0 + } + } +} \ No newline at end of file From 18aa65c053988c33f1ada736aa88db7455a1623c Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 12 May 2022 08:21:58 -0700 Subject: [PATCH 8/8] Improved delete, scaling added --- main.py | 2 +- recipe.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e020838..d54e8b5 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,7 @@ """ Portfolio Project for CS361 Spring 2022 Written by Lucas Jensen -Last updated 3/29/22 for Assignment 1 +Last updated 5/12 for Assignment 1 """ from flask import Flask, redirect, render_template, request from recipe import Recipe, RecipeBook diff --git a/recipe.py b/recipe.py index 531f4f8..cc800df 100644 --- a/recipe.py +++ b/recipe.py @@ -2,6 +2,7 @@ Written by Lucas Jensen Portfolio Project for CS361 The main logic behind a recipe +Last updated 5/12 """ import json