Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
0bcc838
used login required mixin
clair3st Feb 14, 2017
92f827c
fetch/pull to create PR to development.
Feb 14, 2017
a31c09d
Merge pull request #35 from NeuroPyPlanner/medication-model
clair3st Feb 14, 2017
cfc51b4
added todo list view, began templates
pasaunders Feb 14, 2017
b098aeb
first pass, detail view, add and list todo. urls and views updated
pasaunders Feb 14, 2017
4a36710
build class for tests
clair3st Feb 14, 2017
ed36bce
Merge branch 'todo-templates' of https://github.com/NeuroPyPlanner/Ne…
clair3st Feb 14, 2017
d737b11
handled merge
clair3st Feb 14, 2017
379f49e
added todo urls
clair3st Feb 14, 2017
e13e25a
updated form
clair3st Feb 14, 2017
62fcc19
removed todo and put in the project level url
clair3st Feb 14, 2017
1ce245c
removed permissions for now
clair3st Feb 14, 2017
e6c931c
Merge branch 'development' into security
clair3st Feb 14, 2017
7ed8a8a
Merge pull request #37 from NeuroPyPlanner/security
serashioda Feb 14, 2017
8f61dd6
removed decorator
clair3st Feb 14, 2017
be1728f
added login required mixins
clair3st Feb 14, 2017
351e61d
Merge branch 'development' into todo-templates
clair3st Feb 14, 2017
b82e78a
merged new content, fixed conflicts
pasaunders Feb 14, 2017
13a68a8
added todo for admin
clair3st Feb 14, 2017
ef7d7b6
adding links for navigation
clair3st Feb 14, 2017
6ed57de
bug hunting
pasaunders Feb 14, 2017
edbbdb7
Merge branch 'todo-templates' of https://github.com/NeuroPyPlanner/Ne…
pasaunders Feb 14, 2017
ace0f94
added userprofile for admin
clair3st Feb 14, 2017
31d27d7
added str method for easier visibility in admin
clair3st Feb 14, 2017
e9022ab
add google authentication settings and to requirements.pip
amosboldor Feb 14, 2017
e007ab2
add CredentialsModel for google authentication
amosboldor Feb 14, 2017
24750bb
register CredentialsModel to admin
amosboldor Feb 14, 2017
6c0ceeb
first pass at adding form widget
pasaunders Feb 14, 2017
1a45a67
Merge branch 'todo-templates' of https://github.com/NeuroPyPlanner/Ne…
pasaunders Feb 14, 2017
9644801
added new template for edit view vs add view
clair3st Feb 14, 2017
d106505
added model to todo
clair3st Feb 14, 2017
6d09a12
Merge branch 'todo-templates' of https://github.com/NeuroPyPlanner/Ne…
clair3st Feb 14, 2017
aa898bf
converted model field commands to form fields for new forms.
pasaunders Feb 14, 2017
6b4b4b2
Merge branch 'todo-templates' of https://github.com/NeuroPyPlanner/Ne…
pasaunders Feb 14, 2017
c5f47df
moved new forms to forms.py
pasaunders Feb 14, 2017
183a3c1
added nav for add and edit
clair3st Feb 14, 2017
cc8d90f
added link in nav
clair3st Feb 14, 2017
78b6e21
added user passes test mixin
clair3st Feb 14, 2017
020e802
add and edit todo custom forms working
pasaunders Feb 14, 2017
f597310
changed to pk
clair3st Feb 14, 2017
f33187c
added nav buttons
clair3st Feb 14, 2017
3ee96db
Merge branch 'todo-templates' of https://github.com/NeuroPyPlanner/Ne…
clair3st Feb 14, 2017
b3bd9b0
added basic test for list todo route
clair3st Feb 15, 2017
d013d95
fixed issues after update
clair3st Feb 15, 2017
d11c4f2
added simple test for detail view
clair3st Feb 15, 2017
0c66390
add migration credentialsmodel
amosboldor Feb 15, 2017
6e06b8f
switching to algorithm branch.
Feb 15, 2017
dab519c
3 of 5 tuesday tests complete
pasaunders Feb 15, 2017
af4a93c
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 15, 2017
a355f02
Merge pull request #38 from NeuroPyPlanner/todo-templates
clair3st Feb 15, 2017
6e5bb12
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 15, 2017
cd3152d
fix merge
amosboldor Feb 15, 2017
19f6c6d
add functions for getting, adding and updateing users calendar
amosboldor Feb 15, 2017
d7aa6d2
fix some tests and view
amosboldor Feb 15, 2017
fa9b05f
uncomment settings
amosboldor Feb 15, 2017
9228609
Merge pull request #40 from NeuroPyPlanner/google-calender
clair3st Feb 15, 2017
6b9ba59
add tests for profile views
amosboldor Feb 15, 2017
64ad261
add tests for CredentialsModel
amosboldor Feb 15, 2017
68c8f8d
add test for todo list view
amosboldor Feb 15, 2017
cbe0eaa
medication models and .json updated after algorithm sudo.
Feb 15, 2017
c8c6650
fixed validator bug.
Feb 15, 2017
258855d
migration
Feb 15, 2017
aabb5b9
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 15, 2017
f97c5ce
Merge pull request #42 from NeuroPyPlanner/algorithm
pasaunders Feb 15, 2017
89867f5
Merge pull request #41 from NeuroPyPlanner/profile-templates
pasaunders Feb 15, 2017
61ab2e3
README formatting.
Feb 15, 2017
1eb9e71
minor typo
Feb 15, 2017
127737c
.gitignore.
Feb 15, 2017
b6831ff
update .gitignore
Feb 15, 2017
6c390e8
minor merge conflict.
Feb 15, 2017
8b5de5c
Merge pull request #44 from NeuroPyPlanner/readme
clair3st Feb 15, 2017
ee11b7a
mid-debugging, adding a radio button form to user profile
pasaunders Feb 15, 2017
a9ca239
updated the medication form class to inhert from basic form
clair3st Feb 15, 2017
1c0e53e
fixed a typo
clair3st Feb 15, 2017
35b285a
removed decorator that was causing an error
clair3st Feb 15, 2017
d870b16
require_post added to profile form route and formatting changes.
pasaunders Feb 15, 2017
9275e6f
.json reformatted
Feb 15, 2017
2583f24
removed captialization of two of the names
clair3st Feb 15, 2017
90dd25a
changed str method
clair3st Feb 15, 2017
a81d745
chaged to a model choice field
clair3st Feb 15, 2017
79244b1
setup for algorithm writing
pasaunders Feb 15, 2017
ad1e767
Merge branch 'algorithm' of https://github.com/NeuroPyPlanner/NeuroPy…
pasaunders Feb 15, 2017
c66aa75
sketching out helper functions to build schedule.
pasaunders Feb 15, 2017
2b6d6a2
teak calendar_get function to take one day and return all events for …
amosboldor Feb 15, 2017
c1656de
Merge pull request #45 from NeuroPyPlanner/profile-templates
clair3st Feb 15, 2017
7d37142
new json format
Feb 15, 2017
2c251f8
added start and end time fields to todo models to be filled in when p…
pasaunders Feb 15, 2017
431189b
5 bucket json format.
Feb 15, 2017
8019ed9
updated to have custom font and background image
clair3st Feb 15, 2017
f3a660f
added logo
clair3st Feb 15, 2017
1d1dc97
added some images for styling
clair3st Feb 15, 2017
8dc8e5c
test debugging
pasaunders Feb 15, 2017
1aedbae
add template for schedule
amosboldor Feb 15, 2017
4074f58
rename template
amosboldor Feb 16, 2017
a54ddde
made view for schedule
amosboldor Feb 16, 2017
7b68462
updated fonts
clair3st Feb 16, 2017
b4d3738
added header fonts
clair3st Feb 16, 2017
a70047c
added space under form
clair3st Feb 16, 2017
2239285
updated choice fields
clair3st Feb 16, 2017
31dddcb
added space under form
clair3st Feb 16, 2017
38f8ef5
updated title so username is in a different font
clair3st Feb 16, 2017
f55fc83
added a white icon
clair3st Feb 16, 2017
7818a57
updated nav bar
clair3st Feb 16, 2017
e88c677
added space under form
clair3st Feb 16, 2017
478a405
fix grammar
clair3st Feb 16, 2017
1a9a840
fix migration stuff
amosboldor Feb 16, 2017
99bd912
Merge pull request #46 from NeuroPyPlanner/schedule-view
pasaunders Feb 16, 2017
d0825e8
Merge branch 'development' into front-end
clair3st Feb 16, 2017
c2d7c61
added four profile tests
pasaunders Feb 16, 2017
b98d140
add algorithm. reorder priority rank, create template.
Feb 16, 2017
7afe3ec
fix .json merge conflict issue
pasaunders Feb 16, 2017
beec51d
added 5 tests to profile views
pasaunders Feb 16, 2017
fab78a8
updating gitignore for new venv on my machine.
pasaunders Feb 16, 2017
3bf077a
fixed a failing test
clair3st Feb 16, 2017
bdfca7b
added styling to increase space below form
clair3st Feb 16, 2017
9c4a045
removed text area
clair3st Feb 16, 2017
2a9e15b
fixed html
clair3st Feb 16, 2017
d41d6f7
changed user profile model to show nicer output for early bird
clair3st Feb 16, 2017
61353ff
added formatting for nav for the brand icon
clair3st Feb 16, 2017
7d81e29
added brand icon
clair3st Feb 16, 2017
8e48c73
add two tests for add
amosboldor Feb 16, 2017
1f0a066
had to change to datefield to avoid time zone issues
clair3st Feb 16, 2017
c9dca6d
added some functional tests for edit todo and add todo
clair3st Feb 16, 2017
0e78a7b
made a small change to the todo model
clair3st Feb 16, 2017
48179c0
basic algo complete on todo views. Changed .json and to fit current a…
Feb 16, 2017
a8df98d
create schedule template started. added to url to routes.
Feb 16, 2017
e542d5c
minor merge conflict.
Feb 16, 2017
f1cb82a
fixed migration merge issue.
Feb 16, 2017
4a59c3f
organized migrations so it can run from clean state.
Feb 16, 2017
7cb759a
more tests for edit
amosboldor Feb 16, 2017
dec84e7
small fix for Schedule view
amosboldor Feb 16, 2017
8a3ee29
Merge pull request #50 from NeuroPyPlanner/schedule-view
clair3st Feb 16, 2017
da43589
Merge pull request #49 from NeuroPyPlanner/front-end
serashioda Feb 16, 2017
bd51eb9
merge with amos
clair3st Feb 16, 2017
c54c099
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 16, 2017
2720539
fixed some tests to reflect new front end
clair3st Feb 16, 2017
8c3ce6e
Merge pull request #51 from NeuroPyPlanner/todo-testing
serashioda Feb 16, 2017
429d797
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 16, 2017
1a8f398
updating string method to allow merge
pasaunders Feb 16, 2017
c332185
just tests and a gitignore update
pasaunders Feb 16, 2017
9a0edea
Merge pull request #52 from NeuroPyPlanner/profile-test2
clair3st Feb 16, 2017
54bdf95
merge conflict handling
pasaunders Feb 16, 2017
b401ed7
setup for form moving
pasaunders Feb 16, 2017
1ec6857
update todo-views to consider current date.
Feb 16, 2017
02ef82a
added a try except for if there is a key error
clair3st Feb 16, 2017
95dc2f5
added error handling to template
clair3st Feb 16, 2017
fb8bb58
added a button to link to edit template
clair3st Feb 16, 2017
057fc6c
updated readme
pasaunders Feb 16, 2017
67fe2d6
Merge pull request #53 from NeuroPyPlanner/debug-views
serashioda Feb 16, 2017
826c852
Merge pull request #54 from NeuroPyPlanner/readme
serashioda Feb 16, 2017
eac6d1c
committing to pull
Feb 16, 2017
c7605f0
added travis.yml, needs more work
pasaunders Feb 16, 2017
ea222f4
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 16, 2017
8cece08
travis integration - first attempt
pasaunders Feb 16, 2017
31e5f85
Bringing in medication froms and str method fix. Fixed merge conflict.
Feb 16, 2017
c45c2f1
Merge branch 'medication-form' of https://github.com/NeuroPyPlanner/N…
amosboldor Feb 16, 2017
dc595bb
edit python versions for automated testing
pasaunders Feb 16, 2017
3768f60
add encrypted env variables
pasaunders Feb 16, 2017
359e946
travis dependency installation edited, env variables slimmed down
pasaunders Feb 16, 2017
cb203e3
travis installations tweaked
pasaunders Feb 16, 2017
3d61cfe
new requirements added
pasaunders Feb 16, 2017
b6d8fad
testing directory fix
pasaunders Feb 16, 2017
09599eb
travis tweaking
pasaunders Feb 16, 2017
2fc75f4
more travis
pasaunders Feb 16, 2017
4ea1d43
installing six before all other dependencies
pasaunders Feb 16, 2017
49b692f
tweaking before_install
pasaunders Feb 16, 2017
9cdc2a6
installing more stuff
pasaunders Feb 16, 2017
af82d11
added travis badge to readme
pasaunders Feb 17, 2017
09c8943
fixed todo views to reroute correctly. added urls. working out templa…
Feb 17, 2017
6385121
update date/time format in views to show properly on create_schedule …
Feb 17, 2017
8fc70bf
Merge pull request #63 from NeuroPyPlanner/algorithm
clair3st Feb 17, 2017
01993af
Merge pull request #62 from NeuroPyPlanner/travis
clair3st Feb 17, 2017
00bbc08
adding links to readme
pasaunders Feb 17, 2017
5f75f7c
Merge branch 'development' into readme
pasaunders Feb 17, 2017
5cbce3c
added links to our psersonal githubs and updated routes info
pasaunders Feb 17, 2017
aaf71ea
Merge pull request #64 from NeuroPyPlanner/readme
clair3st Feb 17, 2017
4ccff65
redid ScheduleView to work with new oauth code
amosboldor Feb 17, 2017
7f08da8
fix merge
amosboldor Feb 17, 2017
4199e6e
new oauth file for authenticating for google api
amosboldor Feb 17, 2017
4857361
edit oauth urls to use new urls
amosboldor Feb 17, 2017
d9d07a7
fix migration errors
amosboldor Feb 17, 2017
3df43b7
about page.
Feb 17, 2017
5426fca
about page scaffold started
Feb 17, 2017
f1d2a0b
ignore secret file
amosboldor Feb 17, 2017
e47649d
Merge pull request #66 from NeuroPyPlanner/schedule-view
pasaunders Feb 17, 2017
178040b
add empty client secret json
amosboldor Feb 17, 2017
2528312
add fake data
amosboldor Feb 17, 2017
2670cc2
Merge pull request #67 from NeuroPyPlanner/schedule-view
clair3st Feb 17, 2017
dc56fab
style changes
clair3st Feb 17, 2017
d0cf691
making schduleview pretty
clair3st Feb 17, 2017
9ec9887
removed uneeded code
clair3st Feb 17, 2017
8c28b67
styled input
clair3st Feb 17, 2017
5482e74
about page with developer info and pics.
Feb 17, 2017
78290b6
about page with developer info and pics.
Feb 17, 2017
af8397b
Merge branch 'development' into debug-views
clair3st Feb 17, 2017
76771bb
five tests checking that logged out users cannot access the todo views
pasaunders Feb 17, 2017
3f47f40
fixed form for test
clair3st Feb 17, 2017
831bf09
reformat about page
Feb 17, 2017
995499b
minor migration merge conflict
Feb 17, 2017
82b491d
added more google cal colors
clair3st Feb 17, 2017
81219a2
Merge pull request #69 from NeuroPyPlanner/debug-views
serashioda Feb 17, 2017
3fb2cfd
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 17, 2017
8818a60
Merge pull request #70 from NeuroPyPlanner/about-page
clair3st Feb 17, 2017
359f07f
changed test to reflect new front end
clair3st Feb 17, 2017
4f8010b
Merge branch 'development' into debug-views
clair3st Feb 17, 2017
0be9c87
more tests, all pass
pasaunders Feb 17, 2017
9ad2e9a
bringing in necessary components/authentication into userprofile view…
Feb 17, 2017
d9c0750
bringing in necessary components/authentication into userprofile view…
Feb 17, 2017
c96ac2f
Merge branch 'development' into todo-test
pasaunders Feb 17, 2017
a39dc1c
updated size
clair3st Feb 17, 2017
3331466
fixed static and updated to have info from readme
clair3st Feb 17, 2017
8ac04dd
added link to about
clair3st Feb 17, 2017
b8a3067
added link to about
clair3st Feb 17, 2017
e5e7a82
Merge pull request #72 from NeuroPyPlanner/debug-views
pasaunders Feb 17, 2017
0e36385
more tests
pasaunders Feb 17, 2017
407a15c
merging to pull
Feb 17, 2017
4b78269
Merge branch 'development' of https://github.com/NeuroPyPlanner/Neuro…
Feb 17, 2017
0e271d8
minor fix in oauth.
Feb 17, 2017
ed4b2c4
Merge branch 'development' into todo-test
pasaunders Feb 17, 2017
3119182
Merge pull request #71 from NeuroPyPlanner/todo-test
clair3st Feb 17, 2017
cde8b16
stop travis spam
pasaunders Feb 17, 2017
312f567
Merge pull request #73 from NeuroPyPlanner/todo-test
pasaunders Feb 17, 2017
4ad8178
added test for about page route
clair3st Feb 17, 2017
971ebbc
Merge branch 'development' into about-page
clair3st Feb 17, 2017
5b8240d
Merge pull request #74 from NeuroPyPlanner/about-page
pasaunders Feb 17, 2017
fe8cd51
added insert prioritized todo-entries into google cal. fixed date for…
Feb 17, 2017
cbebae0
fixed forloop bug
Feb 17, 2017
622c56c
Merge pull request #75 from NeuroPyPlanner/algorithm
pasaunders Feb 17, 2017
b502302
change some code for oauth2.0 FLOW
amosboldor Feb 17, 2017
ad1f25a
Merge pull request #76 from NeuroPyPlanner/schedule-view
clair3st Feb 17, 2017
9658e7d
5 algorithm tests. passing.
Feb 17, 2017
a025152
docstrings.
Feb 17, 2017
a337f11
icon on about page
Feb 17, 2017
5af309e
minor edits to about
Feb 17, 2017
22ca072
Merge pull request #77 from NeuroPyPlanner/algorithm
amosboldor Feb 17, 2017
6f27f0d
added coveragerc and another test
pasaunders Feb 17, 2017
db04b82
Merge pull request #78 from NeuroPyPlanner/todo-test
serashioda Feb 17, 2017
27b299d
merge conflict
Feb 17, 2017
af3f43c
merge conflict
Feb 17, 2017
562e0a9
corpse code and pdb
Feb 17, 2017
0a4f24a
Merge pull request #79 from NeuroPyPlanner/about-page
amosboldor Feb 17, 2017
d8e5553
fixed added more algo tests. passing.
Feb 20, 2017
b14c5ef
moved algo test to designated area.
Feb 20, 2017
250494b
diff
Feb 21, 2017
953d222
corpse code.
Feb 21, 2017
98cc36e
Added tests
Feb 21, 2017
f5f6d03
Added medication JSON files
Feb 21, 2017
d192bd1
added more todo algo tests. All passing.
Feb 21, 2017
8680b0f
clean up corpse code and comments.
Feb 21, 2017
57eee92
Merge pull request #81 from NeuroPyPlanner/algorithm
amosboldor Feb 21, 2017
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ var/
*.egg-info/
.installed.cfg
*.egg
envNeuro/
.DS_Store
bin/
man/
pip-selfcheck.json
pyvenv.cfg
share/



# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python
python:
- '2.7'
- '3.5'
before_install:
- pip install -U pip setuptools
- pip install six
install:
- pip install -r requirements.pip
env:
global:
- secure: O0pOPi+1KGOJMaKqJB+09lRhIsXSNP7ycGn9jsJhvN6XljHBK+bgqWEriSNZ2y01l8GKy+fcnNuiMQLDIc4tQvFkxmYUhoBClkcx12Css1glS9cYpssmbav1YvazKdPL6Y/XdDTtA7na1ggPUaV3Ww4zcIazxOPifnR+Rc5YwGxFBsv0cVRGaAZ8Z7XeqitV7M1DxYa4i2O0hTWQEkw5d9BQH+kZxvervSIE4e4RrPvkopvsXd/Al1djTsJA3ZX0qvCyykuMwANj2ERes9ye2SvP5+etugdmeo267nsXasFN+FO2x+IZYWBNGL8Yl689pOuiGdmvvuP5pG1VYRi+cyk2nMZUC+aN0iuipocfLqJTjaZg7rjdjpRy22M/9eQbMBAUBKHSUkeaLDba+lpvbNiY6ybKQZlwd2pKQZSjHHsAa3lgBG3WduNSCGEKCsKmUgGBRn1c4h5yQFXcHjIRdqr9k21tbF6hCE/LJJoWJEY5XIJIqboitGvNcxWF3qtfau+koTYqH8ZufePOikkKvxiOpoK0bML1HViBdCvSFNB7ioYsLTqXaCN4RhXRUuFrU1O7k4wTZXoLLvyhIYIdnwjpXJX+7HgZq7ieIvAIYkB9rX199xK8cgKb/3WjMGZ7AEF1y4Tay8dRGcAsPu/MUBTSm/BzJvXB+Yy/SrqIXNk=
script:
- cd neuropy
- ./manage.py test

notifications:
email: false
145 changes: 145 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,147 @@
# NeuroPy
[![Build Status](https://travis-ci.org/NeuroPyPlanner/NeuroPy.svg?branch=development)](https://travis-ci.org/NeuroPyPlanner/NeuroPy)

Personalized CBT-based priority planner

## Creators:

[Amos Bolder](https://github.com/amosboldor) | [Claire Gatenby](https://github.com/clair3st) | [Patrick Saunders](https://github.com/pasaunders) | [Sera Smith](https://github.com/serashioda)

### URL: [HERE](http://ec2-52-14-126-118.us-east-2.compute.amazonaws.com/)

### About the App:
A personalized priority app to support a *Cognitive Behavioral Therapy* (CBT) approach to efficiently organize your day according to a struggle/disorder that is effectively treated by CBT. CBT is a goal-oriented pyschotherapy treatment, taking a hands-on approach to problem solving. Goal of CBT is to change the patterns of thinking or behavior that are behind a person's difficulties, modifying their feelings and therefore their thinking and behavior overtime.

*Neuropy* Considers what the habit/disorder the user wants to treat with CBT, along with medication, it's half-life and peak periods. Also works around black-out periods on user's schedule by syncing with Google Calender, personal preference or most productive period of the day for user, and finally considers time commitments for each activity. Each "TO-DO" will be ranked considering these aspects and will be worked into periods of the day.

##### version-0.1 (in active development)
##### Keywords:

No medical data is stored by NeuroPy

##Getting Started

Clone this repository into whatever directory you want to work from.
```
https://github.com/NeuroPyPlanner/NeuroPy.git
```
Assuming that you have access to Python 3 at the system level, start up a new virtual environment.
```
$ cd NeuroPy
$ python3 -m venv ENV
$ source ENV/bin/activate
```
Once your environment has been activated, make sure to install Django and all of this project's required packages.
```
(NeuroPy) $ pip install -r requirements.pip
```
Navigate to the project root, imagersite, and apply the migrations for the app.
```
(NeuroPy) $ cd imagersite

(NeuroPy) $ ./manage.py migrate
```
Finally, run the server in order to server the app on localhost
```
(NeuroPy) $ ./manage.py runserver
```
Django will typically serve on port 8000, unless you specify otherwise. You can access the locally-served site at the address http://localhost:8000.


##Current Models (outside of Django built-ins):

This application allow users to store and organize photos.

**The `Profile` model contains:**

- The period which the user is up and active
- The time of day when a user is best able to focus and work
- The time of day when a user takes their medication
- A __str__ method which returns the user's username.

**The `Todo` model contains:**

- Date
- Ease of accomplishing the task
- Duration of task
- Owner of the task
- Title of the task
- Description
- Priority level
- A __str__ method which returns the task title

**The `Medication` model contains:**

- Name
- Medication Type
- Use (on or off label)
- Half life
- Ramp-up time
- Peak Period
- Start and end times for the easy, medium and peak energy periods
represented as a comma seperated set of integers where the first
integer represents the number of hours since the user took the
medicaion, and the second integer representing the number of extra
minutes.
- A __str__ method which returns the medication's name

##Current URL Routes

- `/oauth2/` Google calendar request authorization
- `/admin` Superuser admin page.
- `/` Home page.
- `/login` Login page.
- `/logout` Logout route, no view.
- `/accounts/register` Register a user form.
- `/accounts/activate/complete/` Activation complete view.
- `/accounts/register/complete/` Registration complete, email sent.
- `/profile/` Links to the following routes:
- `/` Shows the user their profile data.
- `/edit/` Allows the user to edit their profile
- `/profile/todo/ Links to the following routes:
- `/calendar/` Allows the user to view their schedule
- `/schedule/` Shows the user's to-do list ordered by priority and difficulty
- `/[todo_id]/edit/` Allows the user to edit their to-do items
- `/[todo_id]/` Detail view for an individula to-do item
- `/add/` Allows the user to create a new to-do item
- `/` Shows the user a summary of all their to-do items


##Running Tests

Running tests for the NeuroPy is fairly straightforward. Navigate to the same directory as the manage.py file and type:
```
(NeuroPy) $ coverage run manage.py test
```
This will show you which tests have failed, which tests have passed. If you'd like a report of the actual coverage of your tests, type
```
(NeuroPy) $ coverage report
```
This will read from the included .coverage file, with configuration set in the .coveragerc file. Currently the configuration will show which lines were missing from the test coverage.


### USER STORIES:

#### User Stories

- As a user I want the app to use good CBT principles so that I can effectively manage my energy.
- As a user I want the app to take my medications into account so that I can work at my highest-focus time of day.
- As a user I want the app to take in my personal preferences into account so that I don’t work on easy tasks when I have energy and hard tasks when I’m tired.
- As a user I want the app to preserve my preferences so that I can conveniently generate new schedules.
- As a user I want to be able to input my personal preferences and data easily and accurately so that the app can prioritize my day effectively.
- As a user I want my medical data to be secure so that I can avoid fraud and identity theft.
- As a user I want to be able to quickly generate schedules with minimal clicks so that I don’t have to spend all my energy organizing.
- As a user I want my newly generated schedule to be integrated into my google calendar with notifications.
- As a user I want the app to take into account my sleep schedule so that I can work when I have the most energy.


#### Developer Stories

- As a developer I want readable and well documented code to make maintenance easier.
- As a developer I want to practise test driven development in building my app and spotting bugs early on.
- As a developer I want to avoid storing any medical data so that I don’t have to deal with HIPAA violations.
- As a developer I want to store data of users in appropriate models, with logical relationships.
- As a developer I want to build for one disorder before expanding so that I can build on a strong foundation.
- As a developer I want a narrow open source license so that we retain plenty of rights to our work.
- As a developer I want to write an algorithm that prioritises todos based on a user’s profile.
- As a developer I want to integrate the google calendars with my app using an api.
21 changes: 21 additions & 0 deletions neuropy/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[run]
omit =
*/migrations/*,
*/tests.py
manage.py
neuropy/wsgi.py
neuropy/urls.py
neuropy/views.py
*/envNeuro/*
*/apps.py
*/admin.py
*/__init__.py

source =
neuropy
medication
todo
userprofile

[report]
show_missing = True
22 changes: 22 additions & 0 deletions neuropy/manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "neuropy.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
execute_from_command_line(sys.argv)
Empty file added neuropy/medication/__init__.py
Empty file.
4 changes: 4 additions & 0 deletions neuropy/medication/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.contrib import admin
from medication.models import Medication

admin.site.register(Medication)
7 changes: 7 additions & 0 deletions neuropy/medication/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from __future__ import unicode_literals

from django.apps import AppConfig


class MedicationConfig(AppConfig):
name = 'medication'
112 changes: 112 additions & 0 deletions neuropy/medication/fixtures/medication.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
[
{
"fields":{
"treating_dis":"ADD/ADHD",
"name":"CONCERTA",
"post_peak_medium_end":"12:00:00",
"post_peak_medium_start":"09:30:00",
"ramp_up":"03:30:00",
"half_life":"03:30:00",
"medium_end":"05:00:00",
"medium_start":"03:30:00",
"peak_period":"09:30:00",
"med_type":"stimulant",
"peak_end":"09:30:00",
"post_peak_easy_start":"12:00:00",
"post_peak_easy_end":"16:00:00",
"peak_start":"00:00:00",
"easy_start":"00:00:00",
"easy_end":"03:30:00"
},
"model":"medication.medication",
"pk":1
},
{
"fields":{
"treating_dis":"ADD/ADHD",
"name":"ADDERALL",
"post_peak_medium_end":"12:00:00",
"post_peak_medium_start":"09:30:00",
"ramp_up":"07:00:00",
"half_life":"10:00:00",
"medium_end":"05:00:00",
"medium_start":"03:30:00",
"peak_period":"09:30:00",
"med_type":"stimulant",
"peak_end":"09:30:00",
"post_peak_easy_start":"12:00:00",
"post_peak_easy_end":"16:00:00",
"peak_start":"00:00:00",
"easy_start":"00:00:00",
"easy_end":"03:30:00"
},
"model":"medication.medication",
"pk":2
},
{
"fields":{
"treating_dis":"ADD/ADHD",
"name":"Focalin",
"post_peak_medium_end":"12:00:00",
"post_peak_medium_start":"09:30:00",
"ramp_up":"06:30:00",
"half_life":"07:00:00",
"medium_end":"05:00:00",
"medium_start":"03:30:00",
"peak_period":"09:30:00",
"med_type":"stimulant",
"peak_end":"09:30:00",
"post_peak_easy_start":"12:00:00",
"post_peak_easy_end":"16:00:00",
"peak_start":"00:00:00",
"easy_start":"00:00:00",
"easy_end":"03:30:00"
},
"model":"medication.medication",
"pk":3
},
{
"fields":{
"treating_dis":"ADD/ADHD",
"name":"Ritalin LA",
"post_peak_medium_end":"12:00:00",
"post_peak_medium_start":"09:30:00",
"ramp_up":"07:00:00",
"half_life":"03:30:00",
"medium_end":"05:00:00",
"medium_start":"03:30:00",
"peak_period":"09:30:00",
"med_type":"stimulant",
"peak_end":"09:30:00",
"post_peak_easy_start":"12:00:00",
"post_peak_easy_end":"16:00:00",
"peak_start":"00:00:00",
"easy_start":"00:00:00",
"easy_end":"03:30:00"
},
"model":"medication.medication",
"pk":5
},
{
"fields":{
"treating_dis":"ADD/ADHD",
"name":"Vyvanse",
"post_peak_medium_end":"12:00:00",
"post_peak_medium_start":"09:30:00",
"ramp_up":"02:00:00",
"half_life":"11:00:00",
"medium_end":"05:00:00",
"medium_start":"03:30:00",
"peak_period":"09:30:00",
"med_type":"stimulant",
"peak_end":"09:30:00",
"post_peak_easy_start":"12:00:00",
"post_peak_easy_end":"16:00:00",
"peak_start":"00:00:00",
"easy_start":"00:00:00",
"easy_end":"03:30:00"
},
"model":"medication.medication",
"pk":6
}
]
40 changes: 40 additions & 0 deletions neuropy/medication/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-17 01:28
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import re


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Medication',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default='CONCERTA', max_length=20)),
('med_type', models.CharField(default='stimulant', max_length=20)),
('treating_dis', models.CharField(default='ADD/ADHD', max_length=25)),
('half_life', models.DurationField()),
('ramp_up', models.DurationField()),
('peak_period', models.DurationField()),
('easy_start', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('easy_end', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('medium_start', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('medium_end', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('peak_start', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('peak_end', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('post_peak_medium_start', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('post_peak_medium_end', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('post_peak_easy_start', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
('post_peak_easy_end', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z', 32), code='invalid', message='Enter only digits separated by commas.')])),
],
),
]
Loading