From 3fb8a4de897eabd3e85520358619af7abcbd7664 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 23 Dec 2022 08:47:44 +0300 Subject: Help: Provide some help content for end user --- qc_app/entry.py | 5 +++ qc_app/static/css/styles.css | 29 ++++++++++++++- qc_app/templates/data_review.html | 77 +++++++++++++++++++++++++++++++++++++++ qc_app/templates/index.html | 20 ++++++++++ 4 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 qc_app/templates/data_review.html (limited to 'qc_app') diff --git a/qc_app/entry.py b/qc_app/entry.py index 2c4600d..abea5ed 100644 --- a/qc_app/entry.py +++ b/qc_app/entry.py @@ -101,3 +101,8 @@ def upload_file(): return redirect(url_for( "parse.parse", filename=filename, filetype=request.form["filetype"])) + +@entrybp.route("/data-review", methods=["GET"]) +def data_review(): + """Provide some help on data expectations to the user.""" + return render_template("data_review.html") diff --git a/qc_app/static/css/styles.css b/qc_app/static/css/styles.css index d2071e6..c9f6737 100644 --- a/qc_app/static/css/styles.css +++ b/qc_app/static/css/styles.css @@ -10,12 +10,20 @@ label, legend { text-transform: capitalize; } +#explainer { + font-family: Georgia, Garamond, serif; + font-style: normal; + font-size: 1.275em; +} + .heading { color: #FEFEFE; background-color: #336699; text-transform: capitalize; - border-radius: 5px; + border-radius: 5px 5px 0 0; padding-left: 0.5em; + font-weight: bold; + line-height: 1.5em; } fieldset { @@ -108,6 +116,23 @@ table th,td { border-radius: 1em; } +form { + border-radius: 5px; + border-width: 1px; + border-style: solid; + border-color: #336699; +} + +@media(min-width: 1250px) { + form { + width: 40%; + } + + #explainer { + width: 65ch; + } +} + fieldset { border-style: none; display: grid; @@ -132,7 +157,7 @@ input[disabled="true"],input[disabled="disabled"] { background-color: #F8D7DA; } -form legend { +form fieldset legend { padding-left: 3em; text-transform: capitalize; font-weight: bolder; diff --git a/qc_app/templates/data_review.html b/qc_app/templates/data_review.html new file mode 100644 index 0000000..7ac01ba --- /dev/null +++ b/qc_app/templates/data_review.html @@ -0,0 +1,77 @@ +{%extends "base.html"%} + +{%block title%}Data Review{%endblock%} + +{%block contents%} +

data review

+ +
+

Data Concerns

+

The following are some of the requirements that the data in your file + MUST fulfil before it is considered valid for this system: +

+ +
    +
  1. File headings +
      +
    • The first row in the file should contains the headings. The number of + headings in this first row determines the number of columns expected for + all other lines in the file.
    • +
    • Each heading value in the first row MUST appear in the first row + ONE AND ONLY ONE time
    • +
    • The strain headers in your first row will be against a source of truth + (see strains.csv [1.7M]).
      + Pick the strain names from the 'Name' and + 'Name2' fields.
    • +
    +
  2. + +
  3. Data +
      +
    1. NONE of the data cells/fields is allowed to be empty. + All fields/cells MUST contain a value.
    2. +
    3. The first column of the data rows will be considered a textual field, + holding the "identifier" for that row
    4. +
    5. Except for the first column/field for each data row, + NONE of the data columns/cells/fields should contain + spurious characters like `eeeee`, `5.555iloveguix`, etc...
      + All of them should be decimal values
    6. +
    7. decimal numbers must conform to the following criteria: +
        +
      • when checking an average file decimal numbers must have exactly three + decimal places to the right of the decimal point.
      • +
      • when checking a standard error file decimal numbers must have six or + greater decimal places to the right of the decimal point.
      • +
      • there must be a number to the left side of the decimal place + (e.g. 0.55555 is allowed but .55555 is not).
      • +
      +
    8. +
    +
  4. +
+ + +

Supported File Types

+ We support the following file types: + + + +
+{%endblock%} diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html index 9111af0..9ee3af6 100644 --- a/qc_app/templates/index.html +++ b/qc_app/templates/index.html @@ -5,8 +5,28 @@ {%block contents%}

upload file

+
+

This application assumes that you are familiar with the basics of data + verification formats and uploading procedures. If you haven't done so please + go to this page to learn the requirements for file formats and helpful + suggestions to enter your data in a fast and easy way.

+ +
    +
  1. PLEASE REVIEW YOUR DATA.Make sure your data complies + with our system requirements. ( + Help + )
  2. +
  3. UPLOAD YOUR DATA FOR DATA VERIFICATION. We accept + .csv, .txt and .zip + files (Help)
  4. +
+
+
+ upload file {%with messages = get_flashed_messages(with_categories=True) %} {%if messages %}
-- cgit v1.2.3