Skip to content

Commit

Permalink
Fixed merge conflict with main
Browse files Browse the repository at this point in the history
  • Loading branch information
Chloe Eghtebas authored and Chloe Eghtebas committed Oct 30, 2023
2 parents 61ea570 + 620bfa2 commit f27da90
Show file tree
Hide file tree
Showing 94 changed files with 1,886 additions and 1,390 deletions.
5 changes: 2 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
This is a draft Pull Request Template.
This is a draft Pull Request Template.

- [ ] Description of what changes have been made (why and how for big features)
- [ ] Reference [Issue](https://github.com/TUMFARSynchrony/experimental-hub/issues) sovled (if any)
- [ ] Unit tests + have you tried merging from main?
- [ ] Unit tests + have you tried merging from main?
- [ ] Terminology consistent with the rest of the codebase?
- [ ] Who do you think should review?

8 changes: 4 additions & 4 deletions .github/workflows/backend-static-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
pull_request:
branches:
branches:
- main

jobs:
Expand All @@ -24,9 +24,9 @@ jobs:
run: |
pip3 install --upgrade pip
pip3 install -r ./backend/requirements.dev.txt
- name: Format with Black
run: black --config=./backend/pyproject.toml --preview ./backend

- name: Lint with Flake8
run: flake8 --config=./backend/.flake8 ./backend
run: flake8 --config=./backend/.flake8 ./backend
44 changes: 22 additions & 22 deletions .vscode.example/launch.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Py: Backend Main whithout libraries",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/backend/main.py",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Py: Backend Main including libraries",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/backend/main.py",
"console": "integratedTerminal",
"justMyCode": false
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Py: Backend Main whithout libraries",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/backend/main.py",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Py: Backend Main including libraries",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/backend/main.py",
"console": "integratedTerminal",
"justMyCode": false
}
]
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -107,7 +107,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ An online tool for researchers to host and conduct customizable online experimen

![Quick Demo Exp Hub](https://raw.githubusercontent.com/wiki/TUMFARSynchrony/experimental-hub/images/exp-quick-demo-small.gif)

As a part of our vision for the experimental hub, we hope to make at home video conferencing studies have more laboratory control through the **experimenter and participant workflows** we have designed in allowing safegaurds in the workflow and a flexible UI (e.g. custom participant video screen position, size, and order, limiting participant exposure pre-experiment to others in the call or seeing themselves with a fitler too early, etc.). We also hope that the [experimental templates](https://github.com/TUMFARSynchrony/experimental-hub/tree/ce-documentation/backend/sessions) and [filters](https://github.com/TUMFARSynchrony/experimental-hub/tree/ce-documentation/backend/filters) our platform uses helps the **egological validity and repeatability** of both HCI and psychology experiments and encourages sharing of anonymized data of the experiment. Finally, because our expirmental hub is self hosted, there should be more control over the **data privacy** of where potentially sensitive video and audio data is being stored.
As a part of our vision for the experimental hub, we hope to make at home video conferencing studies have more laboratory control through the **experimenter and participant workflows** we have designed in allowing safegaurds in the workflow and a flexible UI (e.g. custom participant video screen position, size, and order, limiting participant exposure pre-experiment to others in the call or seeing themselves with a fitler too early, etc.). We also hope that the [experimental templates](https://github.com/TUMFARSynchrony/experimental-hub/tree/ce-documentation/backend/sessions) and [filters](https://github.com/TUMFARSynchrony/experimental-hub/tree/ce-documentation/backend/filters) our platform uses helps the **egological validity and repeatability** of both HCI and psychology experiments and encourages sharing of anonymized data of the experiment. Finally, because our expirmental hub is self hosted, there should be more control over the **data privacy** of where potentially sensitive video and audio data is being stored.

For in detail motivation about the Experimental hub see our [introduciton to the Experimental Hub](https://github.com/TUMFARSynchrony/experimental-hub/wiki/) , otherwise check out our [quick start](./README.md#Building&Starting) or [detailed set up instructions](https://github.com/TUMFARSynchrony/experimental-hub/wiki/Project-Setup) to try it out yourself!
For in detail motivation about the Experimental hub see our [introduciton to the Experimental Hub](https://github.com/TUMFARSynchrony/experimental-hub/wiki/), read our [UbiComp'23 poster paper](https://dl.acm.org/doi/abs/10.1145/3594739.3610686), or checkout our [Medium blog](https://medium.com/ubicomp-iswc-2023/an-experimental-video-conferencing-platform-to-bridge-the-gap-in-communication-1b84f2a3b954). Otherwise get started with our [quick start](./README.md#Building&Starting) or [detailed set up instructions](https://github.com/TUMFARSynchrony/experimental-hub/wiki/Project-Setup) to try it out yourself!

# Setup

<!-- **TODO**: _pre-build release can be found_ ...
**TODO**: _quick setup / start + requirements_
Expand All @@ -22,18 +23,18 @@ For the general setup and prerequisites, please take a look at the [frontend](./
Continue with the steps bellow after both the frontend and backend are set up.

1. Build frontend
- Skip this step if there where no changes to the frontend since the last build process
- Go to the frontend directory: `cd frontend`
- If this is your first time running the experimental hub run: `npm install`
- Build the frontend: `npm run build`. Make sure the build process finishes without any errors
- Skip this step if there where no changes to the frontend since the last build process
- Go to the frontend directory: `cd frontend`
- If this is your first time running the experimental hub run: `npm install`
- Build the frontend: `npm run build`. Make sure the build process finishes without any errors
2. (Re-) Start server
- If the server is already running: stop the server
- Make sure to take a look at the settings. For more details see [backend configuration](./backend/README.md#configuration)
- It is recommended to set `environment` to `prod` to disable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
- In your venv, run `pip install -r requirements.txt` [(click here for more detailed instructions on setting up a virtual environment)](https://github.com/TUMFARSynchrony/experimental-hub/wiki/Project-Setup#creating-a-virtual-environment)
- Start the server by executing `main.py` in the backend directory. For example from the root directory: `python backend/main.py`
3. In your favorite browser (tested mainly with chrome) go to [http://localhost:8080/](http://localhost:8080/) or [https://localhost:8080/](https://localhost:8080/) depending on your projects configuration.
- If the server is already running: stop the server
- Make sure to take a look at the settings. For more details see [backend configuration](./backend/README.md#configuration)
- It is recommended to set `environment` to `prod` to disable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
- In your venv, run `pip install -r requirements.txt` [(click here for more detailed instructions on setting up a virtual environment)](https://github.com/TUMFARSynchrony/experimental-hub/wiki/Project-Setup#creating-a-virtual-environment)
- Start the server by executing `main.py` in the backend directory. For example from the root directory: `python backend/main.py`
3. In your favorite browser (tested mainly with chrome) go to [http://localhost:8080/](http://localhost:8080/) or [https://localhost:8080/](https://localhost:8080/) depending on your projects configuration.

### Notes

- For development, the React / frontend development server is recommended: `npm start`
- For development, the React / frontend development server is recommended: `npm start`
2 changes: 1 addition & 1 deletion backend/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ exclude = .git,__pycache__,.toml,.sh,.ini,Dockerfile,Jenkinfile

per-file-ignores = __init__.py:F401

extend-ignore = E501
extend-ignore = E501, E203, W503
42 changes: 21 additions & 21 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ The following steps only concern the backend (also referred to as server). In ca

## Prerequisites

- At least Python 3.10.x - [python.org](https://www.python.org/)
- pip - usually comes with python.
- At least Python 3.10.x - [python.org](https://www.python.org/)
- pip - usually comes with python.

## Setup

- Execute `pip install -r requirements.txt` inside the backend folder. This will install all server requirements.
- Take a look at the config `backend/config.json` and change the `experimenter_password`. Details can be seen in the [configuration section](#configuration) bellow.
- Execute `pip install -r requirements.txt` inside the backend folder. This will install all server requirements.
- Take a look at the config `backend/config.json` and change the `experimenter_password`. Details can be seen in the [configuration section](#configuration) bellow.

## Start

Expand All @@ -24,21 +24,21 @@ For testing, the `testing_main.py` provides an alternative to the above `main.py

The backend can be configured using the `backend/config.json`.

- `experimenter_password` - str: password experimenters must provide to authenticate themselves
- `host` - str : host address the backend should use
- `port` - int : port the backend should use
- `environment` - str : `dev` or `prod`
- `serve_frontend` - bool : Whether the server should serve the frontend. Set to `false` if the frontend is hosted by a different server (see note bellow)
- Developer Note: A better way to host the frontend would be using a [Reverse Proxy](https://en.wikipedia.org/wiki/Reverse_proxy) like [nginx](https://nginx.org/) or [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) services, as noted in [aiohttp](https://docs.aiohttp.org/en/stable/web_advanced.html?highlight=static#static-file-handling) which we use for hosting.
- `https` - bool : Whether the backend should use https
- `ssl_cert` - str : path to ssl certificate. Only used if https is true
- `ssl_key` - str : path to ssl private key. Only used if https is true
- `log` - str : Logging level for Hub. Must be one of: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Default: `INFO`
- `log_file` - null | str : If given, the logger will write the log into the file instead of the console
- `log_dependencies` - str : Logging level for project 3rd party dependencies (see [requirements.txt](./requirements.txt)). Must be one of: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Default: `WARNING`. Using `INFO` or `DEBUG` may lead to a strong increase in output.
- `ping_subprocesses` - float : If greater than 0, all subprocesses will be pinged in an interval defined by the value of `ping_subprocesses` (in seconds). Used for debugging, default should be `0.0`.
- `experimenter_multiprocessing` - bool : If true, experimenter connections will be executed on independent processes
- `participant_multiprocessing` - bool : If true, participant connections will be executed on independent processes
- `experimenter_password` - str: password experimenters must provide to authenticate themselves
- `host` - str : host address the backend should use
- `port` - int : port the backend should use
- `environment` - str : `dev` or `prod`
- `serve_frontend` - bool : Whether the server should serve the frontend. Set to `false` if the frontend is hosted by a different server (see note bellow)
- Developer Note: A better way to host the frontend would be using a [Reverse Proxy](https://en.wikipedia.org/wiki/Reverse_proxy) like [nginx](https://nginx.org/) or [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) services, as noted in [aiohttp](https://docs.aiohttp.org/en/stable/web_advanced.html?highlight=static#static-file-handling) which we use for hosting.
- `https` - bool : Whether the backend should use https
- `ssl_cert` - str : path to ssl certificate. Only used if https is true
- `ssl_key` - str : path to ssl private key. Only used if https is true
- `log` - str : Logging level for Hub. Must be one of: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Default: `INFO`
- `log_file` - null | str : If given, the logger will write the log into the file instead of the console
- `log_dependencies` - str : Logging level for project 3rd party dependencies (see [requirements.txt](./requirements.txt)). Must be one of: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`. Default: `WARNING`. Using `INFO` or `DEBUG` may lead to a strong increase in output.
- `ping_subprocesses` - float : If greater than 0, all subprocesses will be pinged in an interval defined by the value of `ping_subprocesses` (in seconds). Used for debugging, default should be `0.0`.
- `experimenter_multiprocessing` - bool : If true, experimenter connections will be executed on independent processes
- `participant_multiprocessing` - bool : If true, participant connections will be executed on independent processes

## Logging overview

Expand All @@ -52,8 +52,8 @@ The following logging levels are available for `log` and `log_dependencies` in t
| error | x | x | x | x | - |
| critical | x | x | x | x | x |

- If the logger is set to `INFO`, information with the debug level is ignored and only important events are logged, possibly with less detail.
- If the logger is set to `DEBUG` everything is logged. This also includes additional information that can be helpful in debugging.
- If the logger is set to `INFO`, information with the debug level is ignored and only important events are logged, possibly with less detail.
- If the logger is set to `DEBUG` everything is logged. This also includes additional information that can be helpful in debugging.

# Using a SSL Certificate

Expand Down
28 changes: 14 additions & 14 deletions backend/config.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"experimenter_password": "no-password-given",
"host": "127.0.0.1",
"port": 8080,
"environment": "dev",
"serve_frontend": true,
"log": "DEBUG",
"log_file": null,
"log_dependencies": "WARNING",
"https": false,
"ssl_cert": "./certificate/cert.crt",
"ssl_key": "./certificate/key.key",
"ping_subprocesses": 0.0,
"experimenter_multiprocessing": false,
"participant_multiprocessing": true
"experimenter_password": "no-password-given",
"host": "127.0.0.1",
"port": 8080,
"environment": "dev",
"serve_frontend": true,
"log": "DEBUG",
"log_file": null,
"log_dependencies": "WARNING",
"https": false,
"ssl_cert": "./certificate/cert.crt",
"ssl_key": "./certificate/key.key",
"ping_subprocesses": 0.0,
"experimenter_multiprocessing": false,
"participant_multiprocessing": true
}
Loading

0 comments on commit f27da90

Please sign in to comment.