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

Hackathon project #37

Open
wants to merge 176 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
de21df2
First refactor done. Interface boundaries seem to work.
mgyucht Dec 4, 2015
5606102
Lots of changes and fixes
mgyucht Dec 14, 2015
f6b8ae6
Turn off flexecution bot on the weekends
mgyucht Dec 20, 2015
3c9c878
Overhaul
mgyucht Dec 25, 2015
0475950
Add egg files to repo
mgyucht Dec 25, 2015
cdf6fee
Refactor, add basic webserver for outgoing webhooks
mgyucht Dec 27, 2015
800ef6d
Move info to config object
mgyucht Dec 27, 2015
829ffaa
Fix webserver
mgyucht Dec 27, 2015
184b3b3
Now the server responds with stats!
mgyucht Dec 27, 2015
67d1164
Add install script for ubuntu packages
mgyucht Dec 27, 2015
1dad96f
Fix dependency script mode
mgyucht Dec 27, 2015
54054c0
Update Readme
mgyucht Dec 27, 2015
940eb41
Fix install script
mgyucht Dec 27, 2015
8d9d5e8
Fix install script
mgyucht Dec 27, 2015
84b16ca
Update requirements file/setup.py
mgyucht Dec 27, 2015
9f40b4c
Fix setup.py
mgyucht Dec 27, 2015
9ffeac3
Update egg-info
mgyucht Dec 27, 2015
05449f6
Add another sample file
mgyucht Dec 27, 2015
c87b7ee
Update sample
mgyucht Dec 27, 2015
2628a45
[ISSUE-4] Only assign an exercise if potential users exist
jengler Dec 30, 2015
888c342
Reorganize into slackbot_workout folder
mgyucht Dec 31, 2015
9cb71ec
Add travis support
mgyucht Dec 31, 2015
4dd3ad8
Update travis ci config
mgyucht Dec 31, 2015
a2cbbeb
Add travis ci badge to readme
mgyucht Dec 31, 2015
a523947
Fix layout in readme
mgyucht Dec 31, 2015
5c96c31
Merge pull request #5 from jengler/ISSUE-4-only-assign-if-potential-user
mgyucht Dec 31, 2015
ae3dca2
Merge branch 'hackathon' into ISSUE-6
mgyucht Dec 31, 2015
75a41ee
Merge pull request #8 from mgyucht/ISSUE-6
mgyucht Dec 31, 2015
f7f77e9
Add actual tests
mgyucht Dec 31, 2015
c6397b1
Update travis config
mgyucht Dec 31, 2015
192d452
Merge pull request #9 from mgyucht/add-actual-tests
mgyucht Dec 31, 2015
154d53a
Add functionality to check user's current exercises
mgyucht Jan 1, 2016
1b519f9
Fix issue-11, also a couple other small changes
mgyucht Jan 1, 2016
b4bb75c
Merge pull request #13 from mgyucht/ISSUE-11
mgyucht Jan 1, 2016
9e6e627
Merge branch 'hackathon' into ISSUE-3
mgyucht Jan 1, 2016
b0ab7c5
Merge pull request #10 from mgyucht/ISSUE-3
mgyucht Jan 1, 2016
5c08f1a
Add logging and make everything new-style classes
mgyucht Jan 2, 2016
c723be5
fix test
mgyucht Jan 2, 2016
64aa9c2
Merge pull request #14 from mgyucht/logging-and-objects
mgyucht Jan 2, 2016
b4ceada
Add Yaml config support
mgyucht Jan 2, 2016
15654d9
Add config.yaml to gitignore
mgyucht Jan 2, 2016
247fa2a
Add yaml configuration for logging
mgyucht Jan 2, 2016
01fb02a
Merge pull request #15 from mgyucht/yaml-config
mgyucht Jan 2, 2016
c1dbc48
Fix yaml conf
mgyucht Jan 2, 2016
177e7d3
Merge pull request #16 from mgyucht/fix-yaml-conf
mgyucht Jan 2, 2016
007f19f
Add slackbot help
mgyucht Jan 2, 2016
9c7fc94
Fix help
mgyucht Jan 2, 2016
e2e08a1
Fix help again
mgyucht Jan 2, 2016
6fca649
Fix indent
mgyucht Jan 2, 2016
5a55a1e
Add info text for exercises
mgyucht Jan 2, 2016
0deaa8a
Fix exercise info
mgyucht Jan 2, 2016
69746f4
Add case if someone calls info without exercise
mgyucht Jan 2, 2016
0140b3c
Refactor webserver
mgyucht Jan 2, 2016
1557f6f
Fix help more
mgyucht Jan 2, 2016
1e0432e
Update help
mgyucht Jan 2, 2016
ce3b6bc
Add webserver test
mgyucht Jan 2, 2016
3868354
Fix pushup info
mgyucht Jan 2, 2016
6070c49
Merge pull request #19 from mgyucht/flexbot-help
mgyucht Jan 2, 2016
ce9b430
Move samples to samples dir
mgyucht Jan 2, 2016
3055727
Merge pull request #21 from mgyucht/samples-directory
mgyucht Jan 2, 2016
ebf95e3
Bump version to 0.3
mgyucht Jan 2, 2016
877695e
Merge pull request #22 from mgyucht/bump-version-0.3
mgyucht Jan 2, 2016
5d7ee9e
Add manifest to exclude samples and test dirs
mgyucht Jan 2, 2016
a62d49b
Merge pull request #23 from mgyucht/add-manifest
mgyucht Jan 2, 2016
8a1a80a
Fix sample_2_yaml
mgyucht Jan 2, 2016
c68ef3b
Merge pull request #25 from mgyucht/fix-samples
mgyucht Jan 2, 2016
8c17d40
Add webserver port to configuration
mgyucht Jan 2, 2016
9f3e862
Merge pull request #26 from mgyucht/webserver-port
mgyucht Jan 2, 2016
8ce4b4a
select up to min(eligible_users, num_people_per_callout)
mgyucht Jan 2, 2016
f6d36f3
Fix bot callout number
mgyucht Jan 2, 2016
1816152
Fix num_people_in_current_callout
mgyucht Jan 2, 2016
702bfd3
Fix test
mgyucht Jan 2, 2016
95ff10e
Merge pull request #28 from mgyucht/ISSUE-27
mgyucht Jan 2, 2016
1b61a6e
Refactor sleeping into server loop, add test
mgyucht Jan 3, 2016
1a57199
Merge pull request #32 from mgyucht/ISSUE-29
mgyucht Jan 3, 2016
a25b132
Add help message for acknowledgment version
mgyucht Jan 3, 2016
a5cc049
Fix test
mgyucht Jan 3, 2016
08dd2b4
fix spelling in template
mgyucht Jan 3, 2016
83afe1e
Add acknowledge_user template
mgyucht Jan 3, 2016
c7110e2
Better configuration options everywhere!
mgyucht Jan 3, 2016
221ac49
Merge pull request #34 from mgyucht/ISSUE-31
mgyucht Jan 3, 2016
85e2f66
Merge branch 'hackathon' into ISSUE-30
mgyucht Jan 3, 2016
f873e45
Fix flex
mgyucht Jan 3, 2016
981ba07
Fix handle_message
mgyucht Jan 3, 2016
86524e7
Fix configuration
mgyucht Jan 3, 2016
a25868a
Support acknowledgment by config option
mgyucht Jan 3, 2016
38d6363
Fix tests
mgyucht Jan 3, 2016
e13148f
Merge pull request #33 from mgyucht/ISSUE-30
mgyucht Jan 3, 2016
881adfb
Fix acknowledge_winner
mgyucht Jan 3, 2016
9171bc4
Fix test
mgyucht Jan 3, 2016
464f717
Merge pull request #38 from mgyucht/fix-acknowledge-winner
mgyucht Jan 3, 2016
de5bf03
Fix server
mgyucht Jan 3, 2016
42b69aa
Update travis not to build all branches
mgyucht Jan 3, 2016
9ff5c77
Merge pull request #39 from mgyucht/fix-server
mgyucht Jan 3, 2016
57b1c6e
Add file logging
mgyucht Jan 3, 2016
459ae1c
Merge pull request #41 from mgyucht/file-logging
mgyucht Jan 3, 2016
8529da5
Log messages from slack
mgyucht Jan 5, 2016
47bfe0e
Fix format strings in log statements
mgyucht Jan 5, 2016
adbe750
More log statements
mgyucht Jan 5, 2016
19b117a
Lots of little fixes
mgyucht Jan 5, 2016
447f68c
Only log messages directed at flexbot
mgyucht Jan 5, 2016
d6025fa
Fix @-mentions and tests
mgyucht Jan 5, 2016
356298b
Merge pull request #52 from mgyucht/log-posts-from-slack
mgyucht Jan 5, 2016
efe289b
Set up migration
mgyucht Jan 7, 2016
8b8923f
add migration script
mgyucht Jan 7, 2016
5b472c6
Merge pull request #60 from mgyucht/user-id-everywhere
mgyucht Jan 7, 2016
2a4ba89
flexbot stats now prints your stats
mgyucht Jan 9, 2016
eab3fd9
Update help
mgyucht Jan 9, 2016
07396b7
Merge pull request #66 from mgyucht/ISSUE-65
mgyucht Jan 9, 2016
1fe5e6e
Refactor exercise configuration
mgyucht Jan 9, 2016
f69d382
Update default file
mgyucht Jan 9, 2016
3421373
Merge pull request #67 from mgyucht/ISSUE-56
mgyucht Jan 9, 2016
a0a0c0e
Better responses for done
mgyucht Jan 9, 2016
8e76bcc
Merge pull request #68 from mgyucht/ISSUE-45
mgyucht Jan 9, 2016
4629b25
Remove TokenProvider in favor of ConfigurationProvider
mgyucht Jan 9, 2016
140888c
Replace StdOutLogger with InMemoryLogger and use python loggers in Ba…
mgyucht Jan 9, 2016
4f30a79
Add logger factory
mgyucht Jan 9, 2016
9cc0571
Merge pull request #71 from mgyucht/ISSUE-59
mgyucht Jan 9, 2016
04377d5
Remove exercise id
mgyucht Jan 9, 2016
77bc7ba
Update exercise files
mgyucht Jan 9, 2016
b97270c
Merge pull request #74 from mgyucht/ISSUE-51
mgyucht Jan 9, 2016
df6ad81
Update samples/defaults
mgyucht Jan 9, 2016
219fbbc
Update readme
mgyucht Jan 9, 2016
5f16d75
Merge pull request #75 from mgyucht/cmd-line-config
mgyucht Jan 9, 2016
b638848
Move current_winners to bot, don't choose from them
mgyucht Jan 12, 2016
1c3daab
Merge pull request #79 from mgyucht/ISSUE-78
mgyucht Jan 12, 2016
8212457
Move current winners into user_manager
mgyucht Jan 12, 2016
cc393f3
Merge pull request #80 from mgyucht/manager-winners-refactor
mgyucht Jan 12, 2016
a3ce12d
Add todo command
mgyucht Jan 12, 2016
868bfa7
Merge pull request #81 from mgyucht/ISSUE-77
mgyucht Jan 12, 2016
b737114
Lots of fixes
mgyucht Jan 12, 2016
b8bfb94
Fix test
mgyucht Jan 12, 2016
b4063e6
Merge branch 'hackathon' into lots-o-fixes
mgyucht Jan 12, 2016
b832051
Fix test
mgyucht Jan 12, 2016
130a3e2
Merge pull request #82 from mgyucht/lots-o-fixes
mgyucht Jan 12, 2016
875b0a6
Fix for henry
mgyucht Jan 12, 2016
0a771b2
Merge pull request #83 from mgyucht/fix-for-henry
mgyucht Jan 12, 2016
f3bfe3e
Better randomization for user selection
mgyucht Jan 12, 2016
ad4e1d9
Merge pull request #84 from mgyucht/ISSUE-54
mgyucht Jan 12, 2016
0ff62fe
Rename things
mgyucht Jan 13, 2016
0796868
Merge pull request #87 from mgyucht/ISSUE-35
mgyucht Jan 13, 2016
701ae3a
Add totals column
mgyucht Jan 13, 2016
dd6a790
Merge pull request #89 from mgyucht/ISSUE-88
mgyucht Jan 13, 2016
b106e80
Rename the flexbot script so it can import things properly
mgyucht Jan 16, 2016
452e98f
Merge pull request #91 from mgyucht/rename-flexbot-script
mgyucht Jan 16, 2016
581884e
Add dockerfile
mgyucht Jan 16, 2016
af0ecfd
Merge pull request #93 from mgyucht/ISSUE-42
mgyucht Jan 16, 2016
9927cbc
Cleanup Dockerfile
mgyucht Jan 16, 2016
ab35aa3
Fix dockerfile
mgyucht Jan 16, 2016
20571e7
More cleanup
mgyucht Jan 16, 2016
e6850b8
Update readme
mgyucht Jan 16, 2016
5ca1c95
Merge pull request #94 from mgyucht/ISSUE-42-1
mgyucht Jan 16, 2016
4712266
Move user exercise data out of core
mgyucht Jan 16, 2016
d3ed069
Fix exercises
mgyucht Jan 16, 2016
6813ab3
Neaten up stats page
mgyucht Jan 16, 2016
7794665
Merge pull request #96 from mgyucht/ISSUE-95
mgyucht Jan 16, 2016
7fed4f7
Maybe fix the dockerfile?
mgyucht Jan 16, 2016
57bee78
Merge pull request #97 from mgyucht/fix-dockerfile
mgyucht Jan 16, 2016
6575975
Update the readme a bit [ci-skip]
mgyucht Jan 16, 2016
ae6e75a
[ci skip]
mgyucht Jan 16, 2016
a62a1a2
Merge pull request #99 from mgyucht/fix-readme
mgyucht Jan 16, 2016
9ce2457
First pass moving winners out of core
mgyucht Jan 18, 2016
64f148e
Merge pull request #102 from mgyucht/ISSUE-95-2
mgyucht Jan 18, 2016
fff7369
Lots of things
mgyucht Jan 19, 2016
33feb02
Take two
mgyucht Jan 19, 2016
5056515
Take three
mgyucht Jan 19, 2016
93a764a
More debugging
mgyucht Jan 19, 2016
bc41d08
More debugging
mgyucht Jan 19, 2016
1652751
debug five?
mgyucht Jan 19, 2016
2295932
Fixed hopefully
mgyucht Jan 19, 2016
e16628a
Remove print statements
mgyucht Jan 19, 2016
fd12018
Fix run-flexbot script log file path
mgyucht Jan 19, 2016
99c6414
Fix test
mgyucht Jan 19, 2016
73c0546
More debugging
mgyucht Jan 19, 2016
268c8cf
Fix acknowledge
mgyucht Jan 19, 2016
df84ce7
Merge pull request #103 from mgyucht/fix-broken-flexbot
mgyucht Jan 19, 2016
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
config.json
config.yaml
*.pyc

log*.csv
log*.csv_DEBUG
user_cache.save
*.log

build/
dist/

.DS_STORE
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: python
python:
- "2.7"
branches:
only:
- hackathon
addons:
postgresql: "9.4"
install: "pip install -r requirements.txt"
before_script:
- psql -c 'CREATE DATABASE travis_ci_test;' -U postgres
script: nosetests -sv
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:15.04

RUN apt-get update && apt-get install -y \
python-pip \
postgresql-common \
libpq-dev \
python-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /flexbot /flexbot/configuration /flexbot/flexbot /flexbot/samples /flexbot/logs

EXPOSE 80
EXPOSE 8080

COPY requirements.txt /flexbot/
RUN pip install -r /flexbot/requirements.txt

COPY flexbot /flexbot/flexbot
COPY exercises /flexbot/exercises
COPY samples /flexbot/samples

WORKDIR /flexbot
CMD ["python", "-m", "samples.run_flexbot", "--config", "configuration/config.yaml", "--logging-config", "configuration/logging.yaml"]

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
prune samples
prune test
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# slackbot-workout
[![Build Status](https://travis-ci.org/mgyucht/slackbot-workout.svg?branch=hackathon)](https://travis-ci.org/mgyucht/slackbot-workout)

A fun hack that gets Slackbot to force your teammates to work out!

<img src = "https://ctrlla-blog.s3.amazonaws.com/2015/Jun/Screen_Shot_2015_06_10_at_5_57_55_PM-1433984292189.png" width = 500>


# Instructions

1. Clone the repo and navigate into the directory in your terminal.

`$ git clone [email protected]:brandonshin/slackbot-workout.git`
`$ git clone [email protected]:mgyucht/slackbot-workout.git`

2. Go to your slack home page [https://{yourgroup}.slack.com/home](http://my.slack.com/home) & click on **Integrations** on the left sidebar.

Expand All @@ -22,33 +23,38 @@ A fun hack that gets Slackbot to force your teammates to work out!

<img src="https://ctrlla-blog.s3.amazonaws.com/2015/Jun/Screen_Shot_2015_06_05_at_7_00_24_PM-1433557433415.png" width = 500>

5. In the **Slackbot** (Remote control page). Register an integration & you should see this. __Make sure you grab just the token out of the url__, e.g. `AizJbQ24l38ai4DlQD9yFELb`
5. Set up channel and customize configurations

Copy `default.yaml` or `default.json` and configure to your heart's desire. There are a handful of sample configurations located in the `samples/` directory.

<img src="https://ctrlla-blog.s3.amazonaws.com/2015/Jun/Screen_Shot_2015_06_03_at_8_44_00_AM-1433557565175.png" width = 500>
6. While in the project directory, run

6. Save your SLACK_USER_TOKEN_STRING and SLACK_URL_TOKEN_STRING as environmental variables in your terminal.
```
$ sudo ./install-dependencies.sh
$ sudo pip install -r requirements.txt
$ python -m samples.flexbot
```

`$ export SLACK_USER_TOKEN_STRING=YOURUSERTOKEN`

`$ export SLACK_URL_TOKEN_STRING=YOURURLTOKEN`

If you need help with this, try adapting the first 5 steps of the guide to [edit your .bash_profile](http://natelandau.com/my-mac-osx-bash_profile/)

7. Set up channel and customize configurations
Run the script to start the workouts and hit ctrl+\ to stop the script. Hope you have fun with it!

Open `default.json` and set `teamDomain` (ex: ctrlla) `channelName` (ex: general) and `channelId` (ex: B22D35YMS). Save the file as `config.json` in the same directory. Set any other configurations as you like.
# Docker usage

If you don't know the channel Id, fetch it using
Alternatively to running the source directly, my [Docker hub page for flexbot](https://hub.docker.com/r/yucht/flexbot/) is linked to the current version on the `hackathon` branch. This should simplify the setup substantially. In order to run this docker container, you need to bind mount the configuration and logging configuration into the `/flexbot/configuration` directory in the container. Additionally, you'll need to set up the port mapping for whatever port you have specified the web server to run on.

`$ python fetchChannelId.py channelname`
1. Run `docker pull yucht/flexbot:latest` to get the most recent version from the registry.
2. Run

8. If you haven't set up pip for python, go in your terminal and run.
`$ sudo easy_install pip`
```
docker run -v <config_file>:/flexbot/configuration/config.yaml \
-v <logging_config_file>:/flexbot/configuration/logging.yaml \
-d -p 80:80 -t yucht/flexbot:latest
```

9. While in the project directory, run
where <config_file> is your flexbot configuration and <logging_config_file> is your logging
configuration to start running flexbot.

`$ sudo pip install -r requirements.txt`
To ease development, this docker container also exposes port 8080, so if you want to run a development version for testing and a production version simultaneously, you can simply bring up your webserver on port 8080 and run a production container and a development one simultaneously.

`$ python slackbotExercise.py`
# Usage

Run the script to start the workouts and hit ctrl+c to stop the script. Hope you have fun with it!
Currently, you can specify two configuration files, one which controls the behavior of slackbot, and the other which controls the behavior of the loggers in slackbot. The `samples.flexbot` module currently defaults to using `config.yaml` and `logging.yaml` in the current working directory, but you can specify alternate configuration files by using `--config` and `--logging-config` respectively. Slackbot can read both YAML and JSON files for the configuration files and exercise files.
85 changes: 0 additions & 85 deletions User.py

This file was deleted.

62 changes: 0 additions & 62 deletions default.json

This file was deleted.

15 changes: 15 additions & 0 deletions exercises/calf_raises.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: calf raises
min_reps: 20
max_reps: 30
units: rep
info: |
*How to do calf raises:*
- Stand on the edge of a step, or, if you have a step-aerobics platform, place two sets of risers underneath the platform.
- Stand tall with your abdominals pulled in, the balls of your feet firmly planted on the step, and your heels hanging over the edge.
- Rest your hands against a wall or a sturdy object for balance.
- Raise your heels a few inches above the edge of the step so that you're on your tiptoes.
- Hold the position for a moment, and then lower your heels below the platform, feeling a stretch in your calf muscles.

*Tips for doing the calf raise*
- Lift as high as you can onto your toes and lower your heels down as much as your ankle flexibility allows.
- Push evenly through the entire width of your foot. Don't push off from your big toe or the outside edge of your feet.
14 changes: 14 additions & 0 deletions exercises/chair_dips.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: chair dips
min_reps: 15
max_reps: 30
units: rep
info: |
*How to do chair dips:*
For this workout, all you need is a elevated surface that's approximately knee high, such as a bench press, a stable chair (hence the alternative name chair dips), or a park bench. Prior to starting this exercise, it's advised to stretch for push-ups. Lets get started!

- The easiest way to perform bench dips is to begin in the most obvious position. While seated on the edge your chair, place both hands by your side right next to your thighs and clasp the edge of the seat. Using your arms, push your butt up off the chair whilst maintaining a firm grip. With your arms fully extended and your butt off the chair, extend your legs directly in front of you so that your knees are no longer bent. This will be your starting position.
- Lower yourself by bending your elbows until your triceps and forearms are perpendicular to each other (90 degrees). Make sure your feet aren't sliding and let your hips "hang".
- Using your triceps, lift yourself back to the starting position. (See Step 1).
- Repeat the above sequence for the desired amount of repetitions.

Once you've become familiar with the normal bench dips and you're up for a challenge, you can progress to bench dips with elevated legs. This variation puts a lot more stress on the triceps and as a result, works your muscles harder.
16 changes: 16 additions & 0 deletions exercises/planks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: planks
min_reps: 40
max_reps: 60
units: second
info: |
*How to do planks*
- Get in the pushup position, only put your forearms on the ground instead of your hands. Your elbows should line up directly underneath your shoulders. Toes on the ground.
- Squeeze your glutes and tighten your abdominals.
- Keep a neutral neck and spine.
- Create a straight, strong line from head to toes - a plank, if you will.
- Hold that position until the time is up!

*Things to Remember:*
- Don't let your hips sag down to the ground. Sagging hips makes the exercise initially easier, but it's not a plank and it defeats the purpose of the exercise.
- Look down at the ground. This is a good prompt for maintaining a neutral neck position.
- When your form begins to suffer, pull the plug. You're only benefiting from the plank by actually doing the plank.
28 changes: 28 additions & 0 deletions exercises/pushups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: pushups
min_reps: 15
max_reps: 20
units: rep
info: |
*How to set up for a proper push up*

When it comes to push ups, your form is crucial. Each push up needs to be done perfectly so that your total reps measured from workout to workout are on equal footing. If you did thirty perfect push ups two days ago, and then today you did sixty push ups by only going down halfway, sticking your ass up in the air, etc., it's absolutely impossible to tell if you got any stronger.

Here's how to get set up to do a push up:

- When down on the ground, set your hands at a distance that is slightly wider than shoulder-width apart. Your hands should not be rotated: this reduces the ability to generate torque and increases the chance of improper elbow/wrist alignment, which in turn might lead to injury.
- Your feet should be set up in a way that feels right and comfortable to you. For some, that might be shoulder width apart. For others, it might be that the feet are touching. Generally speaking, the wider apart your feet, the more stable you'll be for your push ups.
- Think of your body as one giant straight line - from the top of your head down through your heels. Your butt shouldn't be sticking way up in the air or sagging.
- If you have a problem getting the proper form with your body, try this (yes I'm serious): clench your butt, and then tighten your abs. Your core will be engaged, and your body should be in that straight line. If you've been doing push ups incorrectly, this might be a big change for you.
- Your head should be looking slightly ahead of you, not straight down (yeah I know I'm looking straight down in my top picture, I hadn't started yet!). I read somewhere that said "if you're doing them right, your chin should be the first part of your head to touch the floor, not your nose." Looking up helps you keep your body in line, but feel free to look down if that helps you concentrate more.
- At the top of your push up, your arms should be straight and supporting your weight. You're now ready to do a push up.

*How to complete a push up*

Alright, now that you're actually all set up and eager to begin, let's get you through one repetition. Remember that good form is crucial, so keep your focus through each movement and start to set good habits.

Here's how to complete one repetition of a push up:

- With your arms straight, butt clenched, and abs braced, steadily lower yourself until your elbows are at a 90 degree angle or smaller. Depending on your level of experience, age, and flexibility, 90 degrees might be the lowest you're able to go. Personally, I like to go down until my chest (not my face), hits the floor. That way, I know I'm going the same distance each and every time.
- Try not to let your elbows go flying way out with each repetition. Keep them relatively close to your body, and keep note of when they start to fly out when you get tired.
- Once your chest touches the floor (or your arms go down to a 90 degree angle), pause slightly and then explode back up until you're back in the same position.
- Congratulations, you just did a proper push up. Do as many as you can until you start to feel your form slip (even slightly); you are done for that set. Ten good push ups and 5 crappy ones are tough to quantify against eleven good push ups. If you can only do ten of something, write down your results and aim for 11 next time. Perfect form allows you to keep track of your improvements week over week.
10 changes: 10 additions & 0 deletions exercises/wall_sit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: wall sit
min_reps: 40
max_reps: 50
units: second
info: |
*How to do wall sits:*
- Stand with your back against a wall, placing your feet about two feet out in front of you. Feet should be hip-distance apart.
- Bending your knees, slide your back down the wall until your knees are at 90 degree angles. Your knee joints should be over your ankle joints, so you may need to inch your feet further from the wall to create proper alignment. Your thighs should remain parallel.
- Hold for the specified duration.
- To make this move more challenging, alternate between lifting your left heel for a few seconds and then your right. This helps to target your calves.
29 changes: 0 additions & 29 deletions fetchChannelId.py

This file was deleted.

Loading