Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

Blue Buckets #5

Open
wants to merge 137 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
50e899c
Project Structure
intendednull Feb 21, 2019
2359b8a
Ignoring VSCode
intendednull Feb 21, 2019
8e01273
Added script commands for running and testing project
intendednull Feb 22, 2019
364c742
Added pytest module
intendednull Feb 22, 2019
b450998
Changed test running behavior to accept pytest commands
intendednull Feb 22, 2019
8151d1e
Added Coord class for working with coordinates
intendednull Feb 22, 2019
d09b131
Tests for Coord class
intendednull Feb 22, 2019
abed876
Coord docstrings
intendednull Feb 22, 2019
d2056c5
Minor typo fix in docstrings
intendednull Feb 22, 2019
2b15cb2
Removed docstrings linter becuase it's annoying
intendednull Feb 22, 2019
3f2c80f
Changed docstrings code snippet format.
intendednull Feb 22, 2019
1f408cc
Docstrings consistency
intendednull Feb 22, 2019
229dd45
Clarification in docs
intendednull Feb 22, 2019
876b141
Fixed midpoint to actually represent midpoint.
intendednull Feb 23, 2019
86cb18b
Adjusted true div behavior to remain consistent.
intendednull Feb 23, 2019
978264c
Moved Coord to seperate module.
intendednull Feb 23, 2019
3c0a52b
Moved Coord to separate module.
intendednull Feb 23, 2019
d7e8ab4
Merge remote-tracking branch 'origin/animation/view' into animation/view
intendednull Feb 23, 2019
26b8b3b
Merge pull request #1 from Zer0897/animation/view
Feb 24, 2019
d32309b
Added Main Tinder Functionality
zachsamuels Feb 26, 2019
c21aad9
Removed API key and Added Cat Name
zachsamuels Feb 26, 2019
3e89bca
Adding Bio to cats
zachsamuels Feb 26, 2019
1d4855d
Jumpscare images are now fullscreen to be scarier
zachsamuels Feb 27, 2019
03b714c
Added documentation/comments and made everything pep8 compliant
zachsamuels Feb 27, 2019
2554224
Fixing Error on Jumpscares
zachsamuels Feb 27, 2019
e670a6a
Initial Animation classes
intendednull Feb 27, 2019
9880e47
Fixed flake8 configuration file
intendednull Feb 27, 2019
1944731
Merge remote-tracking branch 'origin/dev' into dev
intendednull Feb 27, 2019
e92630b
Merge branch 'dev' into animation/view
intendednull Feb 27, 2019
609d6a5
Vectors Implements
intendednull Feb 27, 2019
1ae61b3
Midpoint fix
intendednull Feb 27, 2019
b19adc5
Merge branch 'dev' of github.com:Zer0897/code-jam-4 into main-tinder-…
zachsamuels Feb 27, 2019
9996f64
Added Class documentation
zachsamuels Feb 27, 2019
6383f0a
Fixing Lint
zachsamuels Feb 27, 2019
89f3867
Fixing indentation
zachsamuels Feb 27, 2019
5a4289b
Missed a few indentations
zachsamuels Feb 27, 2019
f174497
Indentation fixes
zachsamuels Feb 27, 2019
06d498d
Merge pull request #2 from Zer0897/main-tinder-test
mbwall Feb 27, 2019
6eb0074
First cut at pulling out settings into a file
Feb 27, 2019
f4f7648
Flake8 config file fix
intendednull Feb 27, 2019
9789319
Merge remote-tracking branch 'origin/dev' into dev
intendednull Feb 27, 2019
01ac285
Fixed line lengths
Feb 27, 2019
0091ae1
Merge pull request #3 from Zer0897/configs
mbwall Feb 27, 2019
1f23905
Update mainwindow.py
zachsamuels Feb 27, 2019
bce279a
Dynamic pathing support
intendednull Feb 27, 2019
e977acd
Elaborated docstrings
intendednull Feb 27, 2019
29efd42
Tests passing
intendednull Feb 27, 2019
4b03afa
Fixed hard coded classes
intendednull Feb 27, 2019
c982df0
Fixed possible conversion but with Coord and Direction.
intendednull Feb 27, 2019
5a45376
Added tests
intendednull Feb 27, 2019
a3973d0
Merge conflicts
intendednull Feb 28, 2019
1f75af4
Updated docstring
intendednull Feb 28, 2019
71d07b0
Offloaded caching to separate module
zachsamuels Feb 28, 2019
20ef91f
Merge pull request #5 from Zer0897/main-tinder-test
zachsamuels Feb 28, 2019
b291be7
Fixing config file
zachsamuels Feb 28, 2019
426fe28
Fixing style
zachsamuels Feb 28, 2019
8842847
Merge pull request #6 from Zer0897/main-tinder-test
zachsamuels Feb 28, 2019
085ccb8
Project pathing organized
intendednull Feb 28, 2019
4aeafd5
Merge conflicts resolved
intendednull Feb 28, 2019
b8e1cf5
Merge pull request #4 from Zer0897/animation/view
Feb 28, 2019
4f28c8d
Conflicts resolved
intendednull Feb 28, 2019
5c20ce1
Updated for cache module
intendednull Feb 28, 2019
31fd9ce
Merge pull request #9 from Zer0897/project-path
Mar 1, 2019
eb3aabf
Fps based animation functional
intendednull Mar 1, 2019
6c05229
Animation test implemented
intendednull Mar 1, 2019
0408d2b
Animater no longer inherits Canvas. Convenience changes.
intendednull Mar 1, 2019
11d0f4f
Project structure overhaul
intendednull Mar 1, 2019
f35950d
rename main
intendednull Mar 1, 2019
c4f4281
Motion bug fix
intendednull Mar 1, 2019
8621ab8
Basics done
intendednull Mar 1, 2019
89461c1
Refactored Window Class
intendednull Mar 1, 2019
fe36d2c
Cleaning up messy code.
intendednull Mar 1, 2019
a5299cb
Fixed my phrase
intendednull Mar 1, 2019
9b42961
Robust direction casting
intendednull Mar 1, 2019
7557cff
Image positioning
intendednull Mar 1, 2019
9fc7a23
Swipe animation working
intendednull Mar 1, 2019
890d10b
Removed debug print
intendednull Mar 1, 2019
1a5badf
refactored Window for more customizability
intendednull Mar 1, 2019
a9df697
Bio animation
intendednull Mar 1, 2019
33fb0f5
refactored window into `view.py`
intendednull Mar 2, 2019
14b7fcf
Changed Window to use View class
intendednull Mar 2, 2019
3344136
ViewTypes implemented
intendednull Mar 2, 2019
5f5c2d9
Image resize for cleaner animation
intendednull Mar 2, 2019
8c7e5c5
Pipelines
intendednull Mar 2, 2019
1b7c92a
Merge pull request #10 from Zer0897/animation
Mar 2, 2019
84c75b5
Converting cache to threads
intendednull Mar 2, 2019
3f0edc0
Merge branch 'dev' into cache
intendednull Mar 2, 2019
efb2556
Caching thread functional
intendednull Mar 2, 2019
66e7131
Removed unecessary logic
intendednull Mar 2, 2019
9dd9e18
Merge pull request #11 from Zer0897/cache
Mar 2, 2019
f01d44e
Merge branch 'dev' into animation
intendednull Mar 2, 2019
e733760
Image dimensions based on window size
intendednull Mar 2, 2019
68654d1
Main using WIndow for Front
intendednull Mar 2, 2019
5d26844
Canvas coordinate tweak
intendednull Mar 2, 2019
cdf034e
Widget spacing fixed (sort of)
intendednull Mar 2, 2019
b1fed1a
Fixed default changes sticking around
intendednull Mar 2, 2019
e29b520
profile templating
intendednull Mar 2, 2019
9717f71
Thread cleanup
intendednull Mar 2, 2019
634b192
Merge branch 'cache' into animation
intendednull Mar 2, 2019
4bc684d
fixed app crash
intendednull Mar 2, 2019
cd84b2b
Cleaner spam handling
intendednull Mar 2, 2019
44353b9
Performance adjusments for cache and animations
intendednull Mar 2, 2019
e1c4548
cache caches for better caching
intendednull Mar 2, 2019
abfe82b
Cache keeps a cache of its cache to cache for later caching
intendednull Mar 2, 2019
d4e62a5
Removed pump priming
intendednull Mar 3, 2019
30e7ef9
Fixed animations not completing all the way
intendednull Mar 3, 2019
f3bf598
Bio complete
intendednull Mar 3, 2019
84d46b6
Loading Screen
zachsamuels Mar 3, 2019
2aa021b
Merge branch 'main-tinder-test' into animation
intendednull Mar 3, 2019
d0c7e44
Switched name and age in bio
intendednull Mar 3, 2019
68ab1ed
Loading screen
intendednull Mar 3, 2019
cfc034c
Fixed positioning
intendednull Mar 3, 2019
2811eff
Removed cache debugging changes
intendednull Mar 3, 2019
8a94fdd
Changed how motion behaves
intendednull Mar 3, 2019
de6c577
Spam protection for swiping
intendednull Mar 3, 2019
208228a
lint
intendednull Mar 3, 2019
38a87be
Animation adjustments
intendednull Mar 3, 2019
dc1084d
Animation spam handling
intendednull Mar 3, 2019
df17c23
Fixed age
intendednull Mar 3, 2019
3af66e1
Old docstrings
intendednull Mar 3, 2019
e6ff599
Spash page resources
intendednull Mar 3, 2019
6850a74
Changed View to auto-get drawtype
intendednull Mar 3, 2019
fcf8d75
DrawType changes implemented
intendednull Mar 3, 2019
6d8fc22
Splash formatting
intendednull Mar 3, 2019
9747c1e
Performance enhancments on animations
intendednull Mar 3, 2019
7f573ca
Linting fix
intendednull Mar 3, 2019
e65f721
Linting
intendednull Mar 3, 2019
14ee5dd
More linting
intendednull Mar 3, 2019
711e2ed
splash
intendednull Mar 3, 2019
12dc1a5
animation
intendednull Mar 3, 2019
c564b69
Main
intendednull Mar 3, 2019
2af64cf
main
intendednull Mar 3, 2019
83a2176
Working
intendednull Mar 3, 2019
120a11d
minor
intendednull Mar 3, 2019
eb8189f
Basics working
intendednull Mar 4, 2019
fe4d646
info
intendednull Mar 4, 2019
b88e57b
type
intendednull Mar 4, 2019
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
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[flake8]
max-line-length=100
application_import_names=projectt
application_import_names=src
ignore=P102,B311,W503,E226,S311,W504,F821
exclude=__pycache__, venv, .venv, tests
import-order-style=pycharm
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ venv.bak/

# mypy
.mypy_cache/

# Editor files
.vscode
11 changes: 10 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ verify_ssl = true

[dev-packages]
flake8 = "*"
pytest = "*"

[packages]
more-itertools = "*"
pillow = "*"
pygame = "*"
aiohttp = "*"
configparser = "*"
requests = "*"

[requires]
python_version = "3.7"

[scripts]
lint = "python -m flake8"
lint = "python -m flake8"
start = "python -m src"
test = "python -m pytest"
278 changes: 270 additions & 8 deletions Pipfile.lock

Large diffs are not rendered by default.

23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

The theme for this code jam will be **This app hates you!**. You will be creating an application using a GUI library of your choice in Python. The application must serve a real purpose, but must also fit the theme.

You can use any GUI library that you wish to use, but you have to make _a desktop app_. For example, you may use frameworks like PySide, PyQt, tkinter, or wxPython. You can even use stuff like Kivy or PyGame, although we do not recommend that you do. You may not, however, use webframeworks like Django or Flask, and you may not use anything that turns HTML and CSS into a desktop app that runs as a browser.
You can use any GUI library that you wish to use, but you have to make _a desktop app_. For example, you may use frameworks like PySide, PyQt, tkinter, or wxPython. You can even use stuff like Kivy or PyGame, although we do not recommend that you do. You may not, however, use webframeworks like Django or Flask, and you may not use anything that turns HTML and CSS into a desktop app that runs as a browser.

Here are a couple of examples of what we mean by an application that "serves a real purpose but also fits the theme":
* A calculator app that calculates the right answers, but represents the answer in a way that's completely impractical.
* An image resizer where you have to specify which part of the image to resize, specify how much force to apply to the resize operation in newtons, and then manually resize the image by turning a crank.
* An alarm clock app that plays a very loud sound effect every 5 minutes reminding you that your alarm will ring in 6 hours. The closer it gets to the 6 hour mark, the lower the volume of the sound effect. When the time is up, the sound effect is virtually inaudible.

Remember that teamwork is not optional for our code jams - You must find a way to work together. For this jam, we've assigned a leader for each team based on their responses to the application form. Remember to listen to your leader, and communicate with the rest of your team!
Remember that teamwork is not optional for our code jams - You must find a way to work together. For this jam, we've assigned a leader for each team based on their responses to the application form. Remember to listen to your leader, and communicate with the rest of your team!

**Remember to provide instructions on how to set up and run your app at the bottom of this README**.

Expand All @@ -22,24 +22,29 @@ Remember that teamwork is not optional for our code jams - You must find a way t

# Setting Up

You should be using [Pipenv](https://pipenv.readthedocs.io/en/latest/). Take a look
You should be using [Pipenv](https://pipenv.readthedocs.io/en/latest/). Take a look
[at the documentation](https://pipenv.readthedocs.io/en/latest/) if you've never used it before. In short:

* Setting up for development: `pipenv install --dev`
* Running the application (assuming you use our project layout): `pipenv run start`

# Project Information

`# TODO`
We didn't get to finish, but the basic gist of it was a personality quiz that focused on widget animations to make it difficult to use.

`master` should be the repo judged on, however we were able to get a page working (somewhat) after the deadline, in the `animations` branch. That would be the best example of our vision.

## Description

`# TODO`
We have some neat features: concurrent caching, a nice loading screen (that works 85% of the time), and a pretty thorough animation lib.

## Setup & Installation

`# TODO`

**Additional Dependencies**: tcl/tk (tkinter)
```sh
pipenv install
```
## How do I use this thing?

`# TODO`
```sh
pipenv run start
```
5 changes: 5 additions & 0 deletions res/api.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"image": "https://api.thecatapi.com/v1/images/search",
"info": "https://www.pawclub.com.au/assets/js/namesTemp.json",
"hobbies": "https://gist.githubusercontent.com/mbejda/453fdb77ef8d4d3b3a67/raw/e8334f09109dc212892406e25fdee03efdc23f56/hobbies.txt"
}
5 changes: 5 additions & 0 deletions res/docs/intro.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Note:

Through this quiz you will achieve new levels of spiritual insight, of not only yourself, but the very fabric of reality.

Please answer these very important questions with the utmost honesty, they are crucial to achieving true enlightenment.
3 changes: 3 additions & 0 deletions res/docs/questions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"What is your least favorite color?": ["#0801d5", "#ee018d", "#03a130", "#db0013", "#fd9501"]
}
Binary file added res/images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/images/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/settings.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[APP]
title = The Always (One-Hundred Percent of the Time) Correct and Never Wrong (In Any Way), Completely Accurate Personality Quiz Adventure
geometry = 400x500
Binary file added res/sounds/jumpscare.mp3
Binary file not shown.
7 changes: 7 additions & 0 deletions res/widgets.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[base]

[primary]


[secondary]

12 changes: 12 additions & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from pathlib import Path

SRC: Path = Path(__file__).parent
ROOT: Path = SRC.parent
RES: Path = ROOT / 'res'

SETTINGS: Path = RES / 'settings.ini'
THEME: Path = RES / 'widgets.ini'
IMAGES: Path = RES / 'images'
SOUNDS: Path = RES / 'sounds'
API: Path = RES / 'api.json'
DOCS: Path = RES / 'docs'
6 changes: 6 additions & 0 deletions src/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .main import App

if __name__ == "__main__":
root = App()
root.protocol('WM_DELETE_WINDOW', root.cleanup)
root.mainloop()
Loading