From d1f8adc797c3c6edd63b34d2da734783d9720138 Mon Sep 17 00:00:00 2001 From: FivePixels Date: Mon, 9 May 2022 16:43:19 -0500 Subject: Update records query to return all(), update footer on recent workouts to include number of recent workouts, programmatically add graphs to home page --- app/routes/basic.py | 1 + app/templates/home.html | 96 ++++++++++++++++++++++--------------------------- 2 files changed, 43 insertions(+), 54 deletions(-) diff --git a/app/routes/basic.py b/app/routes/basic.py index b211da7..bd5beb3 100644 --- a/app/routes/basic.py +++ b/app/routes/basic.py @@ -17,6 +17,7 @@ def home(): db.session.query(WorkoutRecord) .filter_by(user_id=current_user.id) .order_by(WorkoutRecord.finished.desc()) + .all() ) # Set records length diff --git a/app/templates/home.html b/app/templates/home.html index af365ad..e06e79b 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -9,8 +9,7 @@

Hello {{ current_user.username }}

-

- Welcome to your home. +

Welcome to your home.

@@ -20,12 +19,10 @@

{{ current_user.workouts.count() }}

-

Workouts

-
-
+

Workouts

-

{{ records.count() }}

+

{{ records|length }}

Workouts Completed

@@ -36,12 +33,12 @@ + -->
@@ -49,7 +46,7 @@

- My Workouts + My Workouts

@@ -57,34 +54,34 @@ {% for workout in current_user.workouts %} - - - - + + + + + + {% endfor %}
{{ workout.name }}{{ workout.exercises.count() }} exercises -

- Record - Edit - Delete +

{{ workout.name }}{{ workout.exercises.count() }} exercises +

+ Record + Edit + Delete +

+
@@ -99,7 +96,7 @@

- Recent Workouts + Recent Workouts

@@ -118,35 +115,26 @@
- View All +
+ {% for completed_workout in top3 %}
- -
-
-
-
- -
-
-
-
- +
+ {% endfor %}
{% endblock %} -- cgit v1.2.3 From 9ba45476efa21791c2c69a083d90785a436435f7 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Mon, 9 May 2022 17:57:02 -0500 Subject: Fix float lbs bug --- BUGS | 2 ++ app/forms/workout.py | 5 +++-- app/routes/workout.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BUGS b/BUGS index b597f4a..b08f012 100644 --- a/BUGS +++ b/BUGS @@ -1,3 +1,5 @@ /workout/record: Timers don't automatically done a row Timer data isn't written to database + New sets don't have values cleared + Tab does not work for new sets diff --git a/app/forms/workout.py b/app/forms/workout.py index f3a1082..a06c771 100644 --- a/app/forms/workout.py +++ b/app/forms/workout.py @@ -4,6 +4,7 @@ from wtforms import ( FormField, HiddenField, IntegerField, + FloatField, SelectField, StringField, ) @@ -14,7 +15,7 @@ class ExerciseCreateForm(Form): id = HiddenField("id", [Optional()]) name = StringField("name", [DataRequired()]) sets = IntegerField("sets", [DataRequired()]) - units = IntegerField("units", [DataRequired()]) + units = FloatField("units", [DataRequired()]) type = SelectField( "type", [DataRequired()], choices=[("reps", "Reps"), ("time", "Time")] ) @@ -27,7 +28,7 @@ class WorkoutCreateForm(FlaskForm): # /workout/record class SetForm(Form): - lbs = IntegerField("lbs", [Optional()]) + lbs = FloatField("lbs", [Optional()]) units = IntegerField("units", [Optional()]) diff --git a/app/routes/workout.py b/app/routes/workout.py index e27cee8..767603e 100644 --- a/app/routes/workout.py +++ b/app/routes/workout.py @@ -131,6 +131,7 @@ def workout_record(workout_id=None): return redirect(url_for("home")) else: + print(form.errors) # Populate form with data for exercise in workout.exercises: form.exercises.append_entry( -- cgit v1.2.3 From 99f2a95682b2acc03c595211a33cb1715abac429 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Mon, 9 May 2022 17:59:40 -0500 Subject: Fix blank graph bug --- app/routes/basic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/routes/basic.py b/app/routes/basic.py index bd5beb3..584d837 100644 --- a/app/routes/basic.py +++ b/app/routes/basic.py @@ -37,6 +37,7 @@ def home(): .filter(SetRecord.exercise_id == Exercise.id) .group_by(Exercise.id) .order_by(db.func.count(SetRecord.id).desc()) + .having(db.func.count(SetRecord.id) > 1) .limit(3) .all() ) -- cgit v1.2.3 From 083d5d904927e08bf365d74af504b14c6ad4a147 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Mon, 9 May 2022 18:05:23 -0500 Subject: More bugs --- app/routes/api.py | 2 +- app/templates/home.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/api.py b/app/routes/api.py index 77c8650..097400d 100644 --- a/app/routes/api.py +++ b/app/routes/api.py @@ -1,5 +1,5 @@ from app import app, db -from flask import redirect, request, jsonify +from flask import redirect, request, jsonify, url_for from flask_login import current_user, login_required from tables import Exercise, SetRecord, Workout, WorkoutRecord diff --git a/app/templates/home.html b/app/templates/home.html index e06e79b..bf22f67 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -134,7 +134,7 @@ {% endblock %} -- cgit v1.2.3 From 61988ebb737a743b51754e3cf2e1160b26bbb0b6 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Mon, 9 May 2022 18:56:57 -0500 Subject: Add README --- README | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..78a7495 --- /dev/null +++ b/README @@ -0,0 +1,10 @@ +How to run: + +1. Install dependencies + $ pip install -r requirements.txt + +2. Change to app directory + $ cd app + +3. Start Flask + $ flask run -- cgit v1.2.3 From 98c1eb525e0768aa69ac598565dd0d8d2975e65a Mon Sep 17 00:00:00 2001 From: FivePixels Date: Wed, 11 May 2022 14:11:55 -0500 Subject: Update poster --- docs/poster.tex | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/poster.tex b/docs/poster.tex index 604d196..555f3a5 100644 --- a/docs/poster.tex +++ b/docs/poster.tex @@ -72,10 +72,9 @@ Missouri State University, MO, USA}} Our proposal is to develop a web application to track weightlifting sessions, progress, and statistics. This web-app will allow users to create personal accounts to track their information. We will allow the user to upload their data from days at the gym and be able to watch their progress as they continue to go to the gym. It will also show useful calculations, such as percentages of your 1RM (One repetition max). Statistics like progress prediction of the user and analysis will be included. Users will also be able to create their own workout plans, or routines. The routines will suggest values in order for the user to make meaningful progression at the gym. Users can also record their weight. } -\headerbox{Experiments}{name=info,column=2,row=0,span=1, below=introduction}{ +\headerbox{Home Page}{name=info,column=2,row=0,span=1, below=introduction}{ \begin{center} \includegraphics[width=66mm]{img/1.png} -The growth of cloud computing is growing increasingly due to its accessing convenience, unlimited amount of resources, the 24/7 IT support, and the affordable cost. \end{center} } @@ -88,39 +87,22 @@ The growth of cloud computing is growing increasingly due to its accessing conve } \headerbox{Proposed Solution}{name=mcs,column=0,below=model,span=2}{ -\begin{itemize} -\item Step 1: Select Dashboard from the left side of the screen. Once you have selected Dashboard, look for the area labeled Marketplace and select Marketplace (Fig.1). -\item Step 2: Type in Lab Services in the search bar and press enter. Then select Lab Services (preview). After you have done that, you will select button that says Create located on the right side of the page. Once you have selected Create, you will be taken to a screen where you will need to fill out information pertaining to the new lab service being created. Once you have filled out the information, select create. -\item Step 3: Return back to the Dashboard (as described in Step 1) and select the name of the lab you created in Step 2 (Fig.1). -\item Step 4: Once you have selected the lab, you will be taken to the following screen. Once on that screen, you will then need to select the link titled Create a lab at http://lab.azure.com (Fig.2). -\item Step 5: Once you have selected the link, you will be taken to a new page that will allow you to create a lab environment to begin the creation of the new lab, you will first select + New Lab. Once you have selected that, you will need to rename your lab and set the number of students you want to allow access to the lab. Once completed filling out the information, select save. -\item Step 6: Once you have selected Save, you will be taken to another page that will require you to select the size of your machine(s), the region, and the operating system. Once you have filled out the information you will select Next. -\item Step 7: Once Next has been select, you will need to enter a Username and Password for individuals to have access to your labs. Once the information has been filled out, you will need to select Create. (Do not make this username and password your own personal information because you will need to provide this information to all the individuals that will be accessing your lab. -\item Step 8: Once you have selected Create, you will now need to wait about 20 minutes for the lab to be created. -\item Step 9: Once the lab has been created, you will need to fill out some required information and select publish. Publishing will take about an hour to complete. -\item Step 10: Once the lab has been published, you will then be taken to a dashboard that allows you to control the main virtual machine. With this main virtual machine, you will be able to upload whatever information would like and it will be available on all other virtual devices for the environment you created (Fig.3). -\end{itemize} +Strengthy solves the problem of data at the gym. As a smart and easy way to record data, you can take bigger, better steps to achieving your fitness goals. As time progresses, users will be able to get a clear visualization of the data they've been entering showing their statistics at the gym. With these insights, users can target weak points, and go after goals in areas they want to see improvement in. Many of those involved in regular fitness also typically stick to a routine at the gym, or what some might call a split. These splits we call workouts in our app to allow a user to create an easy to understand format of their routine while at the gym. We also wanted to accomodate for users who do timer-based workouts. For instance, some common exercises that use a timer are the 'plank' and the 'sprint'. Strengthy allows you to set a time for your activity and start a timer based for that activity. Since you may one do more than one sprint or plank, you can add sets accordingly while working out. The same goes with rep-based workouts too, to provide the ease of getting more work in on days you feel more ready to go at the gym. Users can now view their data without the cost of their privacy, their personal information, or their money. Since our solution is open source, users can self-host the platform on their own machine with just a few commands in the command prompt. } \headerbox{Results}{name=screen,column=2,span=1,below=info}{ % To reduce this block to 1 column width, remove 'span=2' -%The development team used the ASP.Net Web Forms development stack to create this project. On top of the standard web technologies, the Web Forms development stack uses a Microsoft SQL Server database for data retrieval/storage, ASP Web Form Controls for front-end development and C\# for back-end development. \begin{center} \includegraphics[width=60mm]{img/2.png} \end{center} -%Additionally, the Bootstrap front-end library was also used for various components of the web pages to create responsive elements. Some of the associated tools that were used for development included Visual Studio Community 2016 as the main integrated development environment (IDE), Microsoft SQL Server Management Studio for database management and Azure Web Services for project deployment. } \headerbox{Conclusions and Future Work}{name=sea,span=3,column=0,below=mcs}{ %\includegraphics[width=151mm]{GUI1_revised.jpg} -We have come to the conclusion that LaaS is a effective and useful service that can be easily set up by any individual. After looking at the projected growth of LaaS, we have concluded that LaaS will save schools and companies a lot of money and increase the amount of individuals who use the service because of its’ convenience. We have also concluded that LaaS environments will become a popular option for universities within the next few years. We will continue our expand our knowledge on LaaS and well as learn more about the cloud and the useful services that can be provided by the cloud. +From the beginning, we were looking for a good solution to know what our data looked like at the gym. For awhile it was neglected, but as time went on, seeing graphs and figures showed to be in direct correlation to our success at the gym. While we were able to include basic functionality, it would be interesting to see what we can do with the data once we have it and expand upon it further. } -%\headerbox{Conclusions and Future Work}{name=conclusion,column=2,below=screen,span=1}{ -%We have come to the conclusion that LaaS is a effective and useful service that can be %easily set up by any individual. After looking at the projected growth of LaaS, we have %concluded that LaaS will save schools and companies a lot of money and increase the amount %of individuals who use the service because of its’ convenience. -%} - \end{poster} \end{document} -- cgit v1.2.3