diff --git a/app/main/plot.py b/app/main/plot.py index c5111b84..ce1ad96c 100644 --- a/app/main/plot.py +++ b/app/main/plot.py @@ -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): diff --git a/fabfile.py b/fabfile.py index 7d55d1ba..fbd0d8a7 100644 --- a/fabfile.py +++ b/fabfile.py @@ -128,17 +128,17 @@ 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(): @@ -146,7 +146,7 @@ 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:*') diff --git a/requirements/core.txt b/requirements/core.txt index 1e716dea..b76fc75b 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -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 diff --git a/requirements/not-travis.txt b/requirements/not-travis.txt index 4103824e..ad653dde 100644 --- a/requirements/not-travis.txt +++ b/requirements/not-travis.txt @@ -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 diff --git a/requirements/testing.txt b/requirements/testing.txt index 8936cb9d..aa1f933c 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -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 diff --git a/server-config/post-receive b/server-config/post-receive index 2f712717..a75de4a0 100644 --- a/server-config/post-receive +++ b/server-config/post-receive @@ -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