Skip to content

Commit

Permalink
Documentation update (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
varun646 authored Aug 29, 2024
2 parents 9cc1ca1 + 60cbe7f commit 88a4719
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ This repository is meant to be used with the [Copier](https://copier.readthedocs

Detailed instructions for how to use Copier with this repository can be found [here](docs%2Fcopier.md).

Details of the Copier questionnaire are described [here](docs/questionnaire.md).

#### Copier will generate some configuration files along with the web application.

A `Dockerfile` will be created so that the web application can be deployed as a container if the target server supports containers.
GitHub Actions `yaml` files can, optionally, be created for automating deployment from a GitHub repository, should you choose to commit the web application Copier creates. These will be in the `.github/workflows` subdirectory and may be "hidden" in your system user interface. They should be visible from the shell/terminal.

Two GitHub Actions `yaml` files will be created for automating deployment from a GitHub repository, should you choose to commit the web application Copier creates. These will be in the `.github/workflows` subdirectory and may be "hidden" in your system user interface. They should be visible from the shell/terminal.
A `Dockerfile` can, optionally, be created so that the web application can be deployed as a container if the target server supports containers.

Even if your target server does not come with Docker installed, if you would like to try Docker locally we have compiled some instructions for getting started [here](docs%2Fdocker.md). One of the GitHub Actions yaml files supports deploying using the `Dockerfile`. The advantage here is that how the web application functions in your local instance of Docker will be a faithful representation of how it will function on the deployment server.
Even if your target server does not come with Docker installed, if you would like to try Docker locally we have compiled some instructions for getting started in the Copier output repository docs folder. One of the GitHub Actions yaml files supports deploying using the `Dockerfile`. The advantage here is that how the web application functions in your local instance of Docker will be a faithful representation of how it will function on the deployment server.
24 changes: 20 additions & 4 deletions template/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
# Web-based Behavioral Closed Loop Experiment

This is a tutorial on running web based behavioral experiments with autora.
This project, generated by Copier from [the AutoRA-experiment-server repo](https://github.com/gt-sse-center/AutoRA-experiment-server), is the website that is served to the participant. The data store gets populated with conditions from the autora-runner and stores observations when participants visit the website. The autora-runner will read the observations and pass them to the theorist.

This repository is the website that is served to the participant.The datastore gets populated with conditions from the autora-runner and stores observations when participants visit the website. The autora-runner will read the observations and pass them to the theorist.
To start the web app locally you can simply run the start script from a terminal.

```shell
./start.sh
```

## Write Your Code

The autora_workflow.py file shows a basic example on how to run a closed loop autora experiment. Navigate [here](https://autoresearch.github.io/autora/) for more advanced options.
The [autora_workflow.py](https://github.com/AutoResearch/autora-user-cookiecutter/blob/main/%7B%7B%20cookiecutter.__project_slug%20%7D%7D/researcher_hub/autora_workflow.py) file shows a basic example on how to run a closed loop autora experiment. Navigate [here](https://autoresearch.github.io/autora/) for more advanced options.

## Major Technologies in Use

### ViteJS + NodeJS + npm

This project uses "vanilla" Javascript, the [`ViteJS`](https://vitejs.dev/guide/static-deploy.html#building-the-app) dev build server, and [`npm`](https://nodejs.org/en/learn/getting-started/an-introduction-to-the-npm-package-manager) for Javascript dependency management. The frontend is defined, including its dependencies, in the `package.json` file.

### jsPsych

The core Javascript dependency is [`jsPsych`](https://www.jspsych.org/v7/) which is used to define the behavioral experiment(s). The Copier output will initialize a `jsPsych timeline` in `main.js` based on your Copier questionnaire responses. `main.js` contains the core logic and setup for the experiment. [jsPsych provides comprehensive timeline documentation](https://www.jspsych.org/v7/overview/timeline/) to help you define your trials. If you wish to customize the experiment (e.g., modifying trials, adjusting settings, or adding new features) please do so by working with the `timeline` in `main.js`.

### FastAPI

The code for the JsPsych experiment is located in the main.js file. This file contains the core logic and setup for the experiment. If you wish to customize the experiment (e.g., modifying trials, adjusting settings, or adding new features), please refer to main.js as the primary entry point.
This project uses [`FastAPI`](https://fastapi.tiangolo.com/tutorial/) for the backend web framework and [`uvicorn`](https://www.uvicorn.org/) as a web server.

For more detailed information on customizing JsPsych experiments, including documentation and examples, visit [here](https://www.jspsych.org/v7/overview/timeline/).

Expand Down

0 comments on commit 88a4719

Please sign in to comment.