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

Initial Update #151

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
321eaf1
First used plot_date() rather than straight plot(), then rotated the …
abkfenris Oct 9, 2015
641429b
trying to deploy current branch
abkfenris Oct 9, 2015
61712be
Merge pull request #95 from abkfenris/feature/xticks-rotate
abkfenris Oct 9, 2015
646e0ff
Update flask from 0.10.1 to 0.12
pyup-bot Feb 26, 2017
a6b02cb
Update flask-admin from 1.3.0 to 1.4.2
pyup-bot Feb 26, 2017
7f5961e
Update flask-bootstrap from 3.3.5.6 to 3.3.7.1
pyup-bot Feb 26, 2017
8299329
Update flask-debugtoolbar from 0.10.0 to 0.10.1
pyup-bot Feb 26, 2017
8ec6de8
Update flask-login from 0.2.11 to 0.4.0
pyup-bot Feb 26, 2017
bfbedd1
Update flask-migrate from 1.5.0 to 2.0.3
pyup-bot Feb 26, 2017
baa5a0f
Update flask-security from 1.7.4 to 1.7.5
pyup-bot Feb 26, 2017
649627b
Update flask-sqlalchemy from 2.0 to 2.1
pyup-bot Feb 26, 2017
df0230e
Update flask-wtf from 0.12 to 0.14.2
pyup-bot Feb 26, 2017
9f1c541
Update alembic from 0.8.1 to 0.8.10
pyup-bot Feb 26, 2017
fc6b281
Update geoalchemy2 from 0.2.5 to 0.4.0
pyup-bot Feb 26, 2017
7eb1e02
Update sqlalchemy from 1.0.8 to 1.1.5
pyup-bot Feb 26, 2017
7b1eb29
Update psycopg2 from 2.6.1 to 2.6.2
pyup-bot Feb 26, 2017
6806145
Update celery from 3.1.18 to 4.0.2
pyup-bot Feb 26, 2017
9645922
Update redis from 2.10.3 to 2.10.5
pyup-bot Feb 26, 2017
f59ed99
Update arrow from 0.6.0 to 0.10.0
pyup-bot Feb 26, 2017
b50f466
Update beautifulsoup4 from 4.4.0 to 4.5.3
pyup-bot Feb 26, 2017
5d4c465
Update ipaddress from 1.0.14 to 1.0.18
pyup-bot Feb 26, 2017
ea36666
Update jinja2 from 2.8 to 2.9.5
pyup-bot Feb 26, 2017
2e5ab1f
Update mako from 1.0.1 to 1.0.6
pyup-bot Feb 26, 2017
0bdb6ea
Update passlib from 1.6.5 to 1.7.1
pyup-bot Feb 26, 2017
0350218
Update parsedatetime from 1.5 to 2.2
pyup-bot Feb 26, 2017
755e8c6
Update pillow from 2.9.0 to 4.0.0
pyup-bot Feb 26, 2017
b143900
Update pyparsing from 2.0.3 to 2.1.10
pyup-bot Feb 26, 2017
ef5ad40
Update python-dateutil from 2.4.2 to 2.6.0
pyup-bot Feb 26, 2017
664120d
Update pytz from 2015.4 to 2016.10
pyup-bot Feb 26, 2017
339ff69
Update pyyaml from 3.11 to 3.12
pyup-bot Feb 26, 2017
2e5caec
Update requests from 2.7.0 to 2.13.0
pyup-bot Feb 26, 2017
24120cc
Update shapely from 1.5.11 to 1.5.17.post1
pyup-bot Feb 26, 2017
e4aa14d
Update raven from 5.5.0 to 6.0.0
pyup-bot Feb 26, 2017
a823403
Update six from 1.9.0 to 1.10.0
pyup-bot Feb 26, 2017
a8e3dcd
Update werkzeug from 0.10.4 to 0.11.15
pyup-bot Feb 26, 2017
66ba1b1
Update wtforms from 2.0.2 to 2.1
pyup-bot Feb 26, 2017
0c06ece
Update matplotlib from 1.4.3 to 2.0.0
pyup-bot Feb 26, 2017
0c0c978
Update seaborn from 0.6.0 to 0.7.1
pyup-bot Feb 26, 2017
b815282
Update coverage from 3.7.1 to 4.3.4
pyup-bot Feb 26, 2017
c9914a9
Update coveralls from 0.5 to 1.1
pyup-bot Feb 26, 2017
3eb9001
Update flask-testing from 0.4.2 to 0.6.1
pyup-bot Feb 26, 2017
09c74ba
Update mock from 1.3.0 to 2.0.0
pyup-bot Feb 26, 2017
fc8e4a7
Update pytest from 2.7.2 to 3.0.6
pyup-bot Feb 26, 2017
5f76ebf
Update vcrpy from 1.7.2 to 1.10.5
pyup-bot Feb 26, 2017
3ed4de4
Pin codecov to latest version 2.0.5
pyup-bot Feb 26, 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
4 changes: 3 additions & 1 deletion app/main/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ def _axisfigure(self):
for sample in data:
x.append(sample.datetime)
y.append(sample.value)
ax.plot(x, y, '-')
ax.plot_date(x, y, '-')
self._setaxislimits(ax, min(y), max(y))
if self.sensor.name:
ax.set_title('{0} - {1}'.format(self.sensor.gage.name, self.sensor.name))
else:
ax.set_title('{0} - {1}'.format(self.sensor.gage.name, self.sensor.stype.capitalize()))
for item in ax.get_xticklabels():
item.set_rotation(30)
return ax, fig

def matplot(self):
Expand Down
14 changes: 7 additions & 7 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,25 @@ def configure_git():
"""
require.directory(GIT_DIR, use_sudo=True)
with cd(GIT_DIR):
sudo('mkdir gage-web.git')
#sudo('mkdir gage-web.git')
with cd('gage-web.git'):
sudo('git init --bare')
#sudo('git init --bare')
with lcd(LOCAL_CONFIG_DIR):
with cd('hooks'):
put('./post-receive', './', use_sudo=True)
sudo('chmod +x post-receive')
with lcd(LOCAL_APP_DIR):
local(
'git remote add production {user}@{server}:{GIT_DIR}/gage-web.git'
.format(user=env.user, server=env.host_string, GIT_DIR=GIT_DIR))
#with lcd(LOCAL_APP_DIR):
# local(
# 'git remote add production {user}@{server}:{GIT_DIR}/gage-web.git'
# .format(user=env.user, server=env.host_string, GIT_DIR=GIT_DIR))


def deploy():
"""
Push current master to production and restart gunicorn
"""
with lcd(LOCAL_APP_DIR):
local('git push production master')
local('git push production')
sudo('supervisorctl restart gage:*')


Expand Down
66 changes: 33 additions & 33 deletions requirements/core.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
# Flask
Flask==0.10.1
Flask-Admin==1.3.0
Flask-Bootstrap==3.3.5.6
Flask==0.12
Flask-Admin==1.4.2
Flask-Bootstrap==3.3.7.1
Flask-Cache==0.13.1
Flask-DebugToolbar==0.10.0
Flask-Login==0.2.11
Flask-DebugToolbar==0.10.1
Flask-Login==0.4.0
Flask-Mail==0.9.1
Flask-Migrate==1.5.0
Flask-Migrate==2.0.3
Flask-Principal==0.4.0
Flask-Script==2.0.5
Flask-Security==1.7.4
Flask-SQLAlchemy==2.0
Flask-WTF==0.12
Flask-Security==1.7.5
Flask-SQLAlchemy==2.1
Flask-WTF==0.14.2


# Database
alembic==0.8.1
GeoAlchemy2==0.2.5
SQLAlchemy==1.0.8
psycopg2==2.6.1
alembic==0.8.10
GeoAlchemy2==0.4.0
SQLAlchemy==1.1.5
psycopg2==2.6.2


# Celery
celery==3.1.18
redis==2.10.3
celery==4.0.2
redis==2.10.5

# Utilities
arrow==0.6.0
beautifulsoup4==4.4.0
arrow==0.10.0
beautifulsoup4==4.5.3
blinker==1.4
docopt==0.6.2
ipaddress==1.0.14
ipaddress==1.0.18
itsdangerous==0.24
Jinja2==2.8
Mako==1.0.1
Jinja2==2.9.5
Mako==1.0.6
MarkupSafe==0.23
passlib==1.6.5
parsedatetime==1.5
pillow==2.9.0
pyparsing==2.0.3
python-dateutil==2.4.2
pytz==2015.4
PyYAML==3.11
requests==2.7.0
Shapely==1.5.11
raven==5.5.0
six==1.9.0
Werkzeug==0.10.4
WTForms==2.0.2
passlib==1.7.1
parsedatetime==2.2
pillow==4.0.0
pyparsing==2.1.10
python-dateutil==2.6.0
pytz==2016.10
PyYAML==3.12
requests==2.13.0
Shapely==1.5.17.post1
raven==6.0.0
six==1.10.0
Werkzeug==0.11.15
WTForms==2.1
4 changes: 2 additions & 2 deletions requirements/not-travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# So we keep them seperate and let travis grab them from there instead

#numpy==1.9.2
matplotlib==1.4.3
matplotlib==2.0.0
#scipy==0.15.1
#pandas==0.16.2
seaborn==0.6.0
seaborn==0.7.1
14 changes: 7 additions & 7 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Testing
coverage==3.7.1
coveralls==0.5
Flask-Testing==0.4.2
mock==1.3.0
pytest==2.7.2
vcrpy==1.7.2
codecov
coverage==4.3.4
coveralls==1.1
Flask-Testing==0.6.1
mock==2.0.0
pytest==3.0.6
vcrpy==1.10.5
codecov==2.0.5
6 changes: 5 additions & 1 deletion server-config/post-receive
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/sh
GIT_WORK_TREE=/home/www/gage-web git checkout -f
while read oldrev newrev ref
do
echo "$ref recieved, probably deploying master"
GIT_WORK_TREE=/home/www/gage-web git checkout -f $ref
done