diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-05-08 18:34:11 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-05-08 18:34:11 +0100 |
| commit | e11bc31b55df43c0ded49672ad96fde9752e4e9e (patch) | |
| tree | 50c2e590b8d7fb529b48b67756bab526fe257fa7 /app | |
| parent | Add update/credit flags to user table (diff) | |
| download | AnnotateChange-e11bc31b55df43c0ded49672ad96fde9752e4e9e.tar.gz AnnotateChange-e11bc31b55df43c0ded49672ad96fde9752e4e9e.zip | |
Update code for public release
Diffstat (limited to 'app')
| -rw-r--r-- | app/__init__.py | 4 | ||||
| -rw-r--r-- | app/admin/__init__.py | 4 | ||||
| -rw-r--r-- | app/admin/forms.py | 4 | ||||
| -rw-r--r-- | app/admin/routes.py | 4 | ||||
| -rw-r--r-- | app/auth/__init__.py | 4 | ||||
| -rw-r--r-- | app/auth/email.py | 4 | ||||
| -rw-r--r-- | app/auth/forms.py | 4 | ||||
| -rw-r--r-- | app/auth/routes.py | 4 | ||||
| -rw-r--r-- | app/cli.py | 4 | ||||
| -rw-r--r-- | app/decorators.py | 4 | ||||
| -rw-r--r-- | app/email.py | 4 | ||||
| -rw-r--r-- | app/errors/__init__.py | 4 | ||||
| -rw-r--r-- | app/errors/handlers.py | 4 | ||||
| -rw-r--r-- | app/main/__init__.py | 4 | ||||
| -rw-r--r-- | app/main/datasets.py | 4 | ||||
| -rw-r--r-- | app/main/demo.py | 4 | ||||
| -rw-r--r-- | app/main/email.py | 4 | ||||
| -rw-r--r-- | app/main/forms.py | 4 | ||||
| -rw-r--r-- | app/main/routes.py | 4 | ||||
| -rw-r--r-- | app/models.py | 4 | ||||
| -rw-r--r-- | app/utils/datasets.py | 9 | ||||
| -rw-r--r-- | app/utils/tasks.py | 4 |
22 files changed, 89 insertions, 4 deletions
diff --git a/app/__init__.py b/app/__init__.py index 32fd0c7..5105c0a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + __version__ = "0.4.5" import logging diff --git a/app/admin/__init__.py b/app/admin/__init__.py index 737dcc6..a6304ab 100644 --- a/app/admin/__init__.py +++ b/app/admin/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import Blueprint bp = Blueprint("admin", __name__, url_prefix="/admin") diff --git a/app/admin/forms.py b/app/admin/forms.py index 5ff5361..ad066fc 100644 --- a/app/admin/forms.py +++ b/app/admin/forms.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import os from flask import current_app diff --git a/app/admin/routes.py b/app/admin/routes.py index a6225ce..4ae1aef 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import clevercsv import io import os diff --git a/app/auth/__init__.py b/app/auth/__init__.py index c938693..712c39e 100644 --- a/app/auth/__init__.py +++ b/app/auth/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import Blueprint bp = Blueprint('auth', __name__) diff --git a/app/auth/email.py b/app/auth/email.py index 581c9ce..3510938 100644 --- a/app/auth/email.py +++ b/app/auth/email.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import current_app, render_template from app.email import send_email diff --git a/app/auth/forms.py b/app/auth/forms.py index 14f390f..ae07a4f 100644 --- a/app/auth/forms.py +++ b/app/auth/forms.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import current_app, flash from flask_wtf import FlaskForm diff --git a/app/auth/routes.py b/app/auth/routes.py index 57bd605..62d8dff 100644 --- a/app/auth/routes.py +++ b/app/auth/routes.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import datetime import markdown import textwrap @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import getpass from email_validator import validate_email diff --git a/app/decorators.py b/app/decorators.py index 9fbf1f4..ee81af6 100644 --- a/app/decorators.py +++ b/app/decorators.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from functools import wraps from flask import current_app, request, redirect, flash, url_for diff --git a/app/email.py b/app/email.py index 7b97364..76c750c 100644 --- a/app/email.py +++ b/app/email.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from threading import Thread from flask import current_app diff --git a/app/errors/__init__.py b/app/errors/__init__.py index 8a85dca..e0044bc 100644 --- a/app/errors/__init__.py +++ b/app/errors/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import Blueprint bp = Blueprint("errors", __name__) diff --git a/app/errors/handlers.py b/app/errors/handlers.py index 6c2b1e7..96354c9 100644 --- a/app/errors/handlers.py +++ b/app/errors/handlers.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import render_template from app import db from app.errors import bp diff --git a/app/main/__init__.py b/app/main/__init__.py index 2612509..bfceafa 100644 --- a/app/main/__init__.py +++ b/app/main/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask import Blueprint bp = Blueprint('main', __name__) diff --git a/app/main/datasets.py b/app/main/datasets.py index 7245e51..8959b0d 100644 --- a/app/main/datasets.py +++ b/app/main/datasets.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import os import json import logging diff --git a/app/main/demo.py b/app/main/demo.py index 29687d6..2ee8171 100644 --- a/app/main/demo.py +++ b/app/main/demo.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import datetime import logging import markdown diff --git a/app/main/email.py b/app/main/email.py index c10e234..093b4f6 100644 --- a/app/main/email.py +++ b/app/main/email.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import json from flask import current_app, render_template diff --git a/app/main/forms.py b/app/main/forms.py index dcdffd3..af9c4c4 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + from flask_wtf import FlaskForm from wtforms import SubmitField diff --git a/app/main/routes.py b/app/main/routes.py index 8d2aa6e..69e3937 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import datetime import logging diff --git a/app/models.py b/app/models.py index 1ebdc53..0219a22 100644 --- a/app/models.py +++ b/app/models.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + import datetime import jwt import time diff --git a/app/utils/datasets.py b/app/utils/datasets.py index db2c514..d348b47 100644 --- a/app/utils/datasets.py +++ b/app/utils/datasets.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + """ Dataset handling @@ -10,8 +14,6 @@ www.jsonschema.net or yapi.demo.qunar.com/editor/ Missing values must be denoted by 'NaN' (this is understood by the JSON decoder). -Author: Gertjan van den Burg - """ import hashlib @@ -76,7 +78,6 @@ def validate_dataset(filename): if None in data["time"]["raw"]: return "Null is not supported in time axis. Use 'NaN' instead." - has_missing = False for var in data["series"]: if len(var["raw"]) != data["n_obs"]: @@ -85,7 +86,7 @@ def validate_dataset(filename): return "Null is not supported in series. Use 'NaN' instead." has_missing = has_missing or any(map(math.isnan, var["raw"])) - # this doesn't happen in any dataset yet, so let's not implement it until + # this doesn't happen in any dataset yet, so let's not implement it until # we need it. if data["n_dim"] > 1 and has_missing: return "Missing values are not yet supported for multidimensional data" diff --git a/app/utils/tasks.py b/app/utils/tasks.py index 8356876..c082160 100644 --- a/app/utils/tasks.py +++ b/app/utils/tasks.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- +# Author: G.J.J. van den Burg <gvandenburg@turing.ac.uk> +# License: See LICENSE file +# Copyright: 2020 (c) The Alan Turing Institute + """Utilities for task assignment """ |
