-
-
Notifications
You must be signed in to change notification settings - Fork 5
Migrating to BOFS 2.0
Colby Johanson edited this page Oct 4, 2023
·
5 revisions
For the most part, BOFS 2.0 is backwards compatible with older versions of BOFS. Your old questionnaires and blueprints will work, however, the configuration file and the method used for starting BOFS has changed and your project will likely not run if you try to run it as you were before.
You must consider these to get your project working.
- BOFS no longer supports 2.*x -- you must use Python 3.7.x or newer.
- run.py files are no longer used. You must specify your port in your configuration file and start your project via the
BOFS
command (that command is installed when you install BOFS viapip
). (You might have some success using this approach, but it is not supported.) - Consent HTML code should no longer be included in your configuration file. It should be in a
consent.html
file that is located in the same directory as your configuration file. - Instead of specifying a number of conditions, conditions must now be named. These names are used when exporting data from BOFS. See the advanced example's
.toml
file for an example.
It is highly recommended that you adjust these parts of your project.
- The recommended format for the config file is now
.toml
instead of.cfg
. The.cfg
file was really a Python file in disguise. All examples and documentation moving forward will be in this format. The.toml
file syntax is very similar to what should be in your.cfg
file. Most lines should be the same with the exception of yourPAGE_LIST
. See the advanced example's.toml
file for an example.
- The
start_mturk
page is now calledexternal_id
(butstart_mturk
will still work). - The prompt on the external_id page can now be configured.
- Configuration options for completion codes. Can now be auto generated, a static pre-defined code, or no code at all.
- Can now specify an outgoing URL, to redirect participants after they have completed the study.
- If PROLIFIC_PID is passed in as a URL parameter (i.e., via
/?PROLIFIC_PID=...
), a session variable will be set and that value will show up on the /external_id page. - Conditions are now defined differently. They now are given labels and can be enabled/disabled.
- Changes to work with latest SQLAlchemy
- Consent text is now read in from a separate
.html
file instead of from the configuration. - Configuration can now be defined inside of a
.toml
or.json
file. - The parent folder of projects now no longer needs to be
app
.
See also the changes for past versions here.