Skip to content

Commit

Permalink
Calling this version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
colbyj committed May 10, 2024
1 parent c5a1d84 commit 142560f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 38 deletions.
37 changes: 1 addition & 36 deletions BOFS/admin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def route_results_boxplot(field_name: str):

for condition in unique_conditions:
df_part = df.loc[df.condition == condition]
count = df_part.count()
#count = df_part.count()

data = {
"y": df_part[field_name].to_list(),
Expand Down Expand Up @@ -354,41 +354,6 @@ def route_questionnaire_html(questionnaireName):
return render_template("preview_questionnaire_simple.html", q=json_data)


#@admin.route("/analyze_questionnaire/<questionnaireName>/<tag>")
#@admin.route("/analyze_questionnaire/<questionnaireName>")
#@verify_admin
#def route_analyze_questionnaire(questionnaireName, tag=0):
# questionnaire = questionnaires[questionnaireName]
#
# gridPlotData = {}
# gridPlotJSVars = []
#
# numericResults = NumericResults(questionnaire.dbClass, questionnaire.fields, tag)
#
# for condition, valueDict in list(numericResults.dataDescriptive.items()):
# gpd = {
# 'name': condition,
# 'type': 'bar',
# 'x': [field for (field, descriptives) in list(valueDict.items())],
# 'y': [descriptives.mean for (field, descriptives) in list(valueDict.items())],
# 'error_y': {
# 'type': 'data',
# 'visible': True,
# 'array': [descriptives.sem for (field, descriptives) in list(valueDict.items())]
# }
# }
# gridPlotData[condition] = json.dumps(gpd)
# gridPlotJSVars.append("gpd_{}".format(condition))
#
# return render_template("questionnaire_results.html",
# questionnaireName=questionnaireName,
# tag=tag,
# conditionCount=fetch_condition_count(),
# gridPlotData=gridPlotData,
# gridPlotJSVars=json.dumps(gridPlotJSVars).replace('"', ''),
# numericResults=numericResults)


def table_data(tableName):
rows = db.session.query(db.metadata.tables[tableName]).all()

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ BOF requires Python 3.9+, along with the following Python packages.

* `flask` - The web framework that BOF is based off of.
* `sqlalchemy` - An object-relational manager that is used for database table definitions and query access.
* `flask-sqlalchemy` - A bridge between Flask and SQLAlchemy
* `flask-sqlalchemy` - A bridge between Flask and SQLAlchemy.
* `flask-compressed` - To support the compressed files that Unity WebGL builds use.
* `eventlet` - This is used as the production (live) web server, as an alternative to Flask's built in web server or the Apache web server.
* `toml` - The configuration files use the toml format.
* `crawlerdetect` - To detect web crawlers so that they don't get counted as actual participants.
* `pandas` - Used to process data for the export and for the results preview.


Installing and Running BOFS
Expand Down
45 changes: 45 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Changes from 1.2 to 2.0
=======================

Core Changes
* Removed support for Python 2.7.x
* Changes to support the lastest Flask version and latest SQLAlchemy.
* [New documentation](https://docs.frankensystem.net/).
* Updated all JS libraries.
* Consent text is now read in from a `consent.html` file next to the configuration file instead of from the configuration file.
* Added "BOFS" command to start projects instead of needing a separate `run.py` file.
* No more need for the "app" directory to be a part of the project.
* Use `flask-compress` to serve brotli and gz files (e.g., for Unity WebGL builds).
* Improved auto-reload feature that now works with templates.
* Export code rewritten to minimize the chance of throwing exceptions.
* Simple error messages will now show up if in production mode, rather than a generic 500 error.
* If not in debug mode, save any 500 errors to a log file.
* When project stats, check for missing DB columns from tables and questionnaires and add them (only works with SQLite).
* Detect web scrapers and if found exclude them from the condition counts and progress page.
* Many bug fixes.

Project Configuration Options
* Can now specify a specific completion code, or redirect users to an external URL upon reading `/end`.
* `/start_mturk` route is now `/external_id`.
* Can now configure what the prompt on `/external_id` says.
* If `PROLIFIC_PID` is passed in as a URL parameter, the session variable is set and the input field on `/external_id` is automatically populated with the value passed.
* Conditions are now defined with labels and can be disabled selectively; labels show on progress page and are used in the export instead of the numbers.
* Can now configure `ABANDONED_MINUTES` and `COUNTS_INCLUDE_ABANDONED`, relating to ignoring participants who abandoned the task when considering participant counts within conditions.

Administration
* Can now download SQLite database from admin panel as well as clear it out.
* Admin panel styling changes.
* Admin login now redirects user to where they were trying to go instead of always redirecting to the progress page.
* Added the ability to selectively indicate individual participants to exclude from the participant counts.
* Added a results page to the admin panel to view summary statistics of any numeric data.

Tables, Questionnaires, and Blueprints
* Can define custom exports within the [JSON-defined tables](https://docs.frankensystem.net/en/latest/tables.html).
* Can now use 'HAVING' clauses in custom exports.
* Can now configure default value of sliders.
* Some slight improvements to how the questionnaires are rendered on mobile devices.
* `/table` POST route now understands JSON data.
* Blueprints no longer need a `views.py` file to be included.
* Can now have ["simple" html pages](https://docs.frankensystem.net/en/latest/simple_pages.html), that support templates but can be shown without any additional Python code.
* It is now possible to define [custom question types](https://docs.frankensystem.net/en/latest/questionnaires/custom_questions.html) to use within questionnaires.
* Can put questionnaire and tables inside of blueprint folders
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "bride-of-frankensystem"
version = "1.9.3.7"
version = "2.0.0.0"
description = "A framework that allows for the development of custom online experiments and surveys."
readme = "README.md"
authors = [{ name = "Colby Johanson", email = "colby.johanson@usask.ca" }]
Expand Down

0 comments on commit 142560f

Please sign in to comment.