Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge for version 1.2.4 #229

Merged
merged 88 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
77f8b75
Updated version to 1.2.4
SBriere May 31, 2023
90b0df8
Fixed issues in UserQueryTestType for inaccessible test types.
SBriere Jun 12, 2023
b1f375c
Refs #219, Fixed certificates error (not checking path) when not usin…
doumdi Jun 12, 2023
6a9750c
Refs #219, moved certificates in the config directory.
doumdi Jun 12, 2023
87bcc71
Merge branch 'dev' of github.com:introlab/opentera into dev
doumdi Jun 12, 2023
2489d6a
Fixed DBManagerTeraUserAccess query_test_type
SBriere Jun 12, 2023
52373f9
Merge branch 'dev' of https://github.com/introlab/opentera into dev
SBriere Jun 12, 2023
0541229
Changed delete access check in UserQueryTestType
SBriere Jun 22, 2023
7b10408
Refs #220, Allow participants and devices with static token to post f…
doumdi Jul 6, 2023
9b5119c
Refs #221 Test for object is not None before handling update / delete
doumdi Jul 6, 2023
0ee5638
Refs #221 Test for object is not None before handling update / delete
doumdi Jul 6, 2023
74b04a9
Fixed project admins unable to delete sessions created by site admins.
SBriere Jul 11, 2023
e804d61
Refs #222. Updated non-flask requirements.
SBriere Jul 11, 2023
e86b27a
Refs #222. Upgraded SQLAlchemy to 2.0.18
SBriere Jul 11, 2023
fdfad72
Fixes #223. Replaced "_request_ctx_stack" with the global variable 'g'
SBriere Jul 11, 2023
82f588b
Refs #222. Added "future" parameters to use new SQLAlchemy internals.
SBriere Jul 11, 2023
e625148
Updated to Python 3.11
SBriere Jul 11, 2023
895b277
Updated workflows to use Python 3.11.4
SBriere Jul 11, 2023
ddbb4cd
Fixed workflows.
SBriere Jul 11, 2023
703faee
Refs #203. Implemented base for hard delete - working for assets and …
SBriere Jul 12, 2023
c09f8ea
Merge pull request #224 from introlab/sqlalchemy-upgrade
SBriere Jul 13, 2023
912fc54
Refs #203. Implemented hard delete for participant
SBriere Jul 13, 2023
3ee6921
Merge branch 'dev' of https://github.com/introlab/opentera into dev
SBriere Jul 13, 2023
1d48d8d
Merge branch 'main' of https://github.com/introlab/opentera into dev
SBriere Jul 13, 2023
8a3a480
Refs #203. Added tests for hard delete in all main models.
SBriere Jul 13, 2023
65f634f
Fixed issue querying session types as super admin but with session ty…
SBriere Jul 17, 2023
1c01cba
Refs #202. Work started on undelete feature (TeraAsset for now)
SBriere Jul 25, 2023
cbe916e
Refs #202. Updated undelete behavior
SBriere Jul 26, 2023
ac63e45
Refs #202 Work in progress...
SBriere Jul 26, 2023
fb55592
Refs #202. Almost completed all models tests for undelete feature.
SBriere Jul 27, 2023
0250b68
Refs #202. Completed undelete feature and tests for database models.
SBriere Jul 28, 2023
d60d787
Refs #225, review paper and suggestions. Will run GitHub action to ge…
doumdi Aug 29, 2023
1fc7cc7
Refs #225, Incorporated @galessiorob suggestions.
doumdi Aug 29, 2023
748be2d
Refs #225, Incorporated @galessiorob suggestions.
doumdi Aug 29, 2023
b943e7f
Refs #225, Incorporated @Rocsg clarification for earlier paper on Ope…
doumdi Aug 29, 2023
35ab166
Refs #225, Incorporated @Rocsg clarification for earlier paper on Ope…
doumdi Aug 29, 2023
cc21c16
Updated requirements to latest version
doumdi Sep 13, 2023
403f613
Refs #227, #228 Implementing any or all user roles, simplified token …
doumdi Sep 13, 2023
9b0de76
Refs #227, #228 Fixing wrong indent.
doumdi Sep 13, 2023
d27db9d
Refs #227, #228 Implementing any or all user roles, simplified token …
doumdi Sep 13, 2023
9962f8d
Updated with new python version
doumdi Sep 13, 2023
cd7cd6a
Updated Dockerfile
doumdi Sep 13, 2023
4a4cf9c
Updated python version
doumdi Sep 13, 2023
f8a9e38
unused file
doumdi Sep 13, 2023
ddafe9d
Refs #228, #227, testing different decorators and roles
doumdi Sep 13, 2023
1120466
Refs #228, #227, testing different decorators and roles
doumdi Sep 13, 2023
ff691b7
Refs #230. Added first implementation music streaming in VideoRehab.
SBriere Sep 14, 2023
713c4ee
Merge branch 'dev' of https://github.com/introlab/opentera into dev
SBriere Sep 14, 2023
1110eb6
Refs #230. Fixed audio sharing not working and not stopping. Added co…
SBriere Sep 14, 2023
eadbddb
Refs #230. Fixed screen sharing not showing screen if not audio only.
SBriere Sep 14, 2023
44d130c
Refs #230. Fix for not being able to stop music sharing.
SBriere Sep 14, 2023
d178fe5
Refs #230. Fixed screen sharing not working anymore. Updated music pl…
SBriere Sep 15, 2023
430c8fc
Refs #230. Added SDP filter to try to improve music quality.
SBriere Sep 19, 2023
913a54d
Refs #230. Adjusted SDP filter for higher quality audio.
SBriere Sep 21, 2023
fb4d92c
Refs #230. Adjusted video parameters when streaming music.
SBriere Sep 26, 2023
2d12479
Refs #230. Tentative fix to mute speakers when remote streams count > 4.
SBriere Sep 26, 2023
a1eceaa
VideoRehab: Updated bootstrap to 4.6
SBriere Oct 3, 2023
3aa2b18
VideoRehab: Updated Flask Bootstrap library to 4.6
SBriere Oct 3, 2023
0955e3c
VideoRehab: Updated jQuery to version 3.7.1
SBriere Oct 3, 2023
38d5209
VideoRehab - Updated easyrtc jquery version.
SBriere Oct 3, 2023
36ebddd
About and doc files: updated jquery version
SBriere Oct 3, 2023
9c3f7e3
VideoRehabService: Updated jquery and bootstrap.
SBriere Oct 3, 2023
4f0cd7a
VideoRehabService: Removed bootstrap bundle min.
SBriere Oct 3, 2023
86b87b2
Updated requirements to latest version
doumdi Oct 3, 2023
5196f8d
Added translations
doumdi Oct 3, 2023
0b4a76d
Updated translations, python version
doumdi Oct 3, 2023
8ba2d98
Fixed action versions
doumdi Oct 3, 2023
597ce30
Merge branch 'joss-paper-review' of github.com:introlab/opentera into…
doumdi Oct 3, 2023
b33ea06
Refs #230. Reworked layout manager to prevent display of "blank" musi…
SBriere Oct 4, 2023
55c3d23
Merge branch 'dev' of https://github.com/introlab/opentera into dev
SBriere Oct 4, 2023
4dbaaa7
Refs #230. Tentative fix for unmute speaker not working on music share.
SBriere Oct 4, 2023
9141d4d
Refs #230. Added icon and moved video area on participant layout when…
SBriere Oct 5, 2023
fc7fe31
Refs #230. Fixed issue on music not playing when speaker is initially…
SBriere Oct 12, 2023
72e629d
Updated docs structure, now documenting Docker deployment
doumdi Oct 25, 2023
d4c8eb3
Added Docker documentation
doumdi Oct 25, 2023
13e3790
Added Docker documentation
doumdi Oct 25, 2023
bcdeae3
Added Docker documentation
doumdi Oct 25, 2023
55ba416
Fixed typo
doumdi Oct 25, 2023
6da7c82
fixed typos
doumdi Oct 25, 2023
cb981f1
Minor change
doumdi Oct 25, 2023
0110061
updated documentation
doumdi Oct 25, 2023
203db4b
Updated, unfinished
doumdi Oct 25, 2023
5cc839f
Updated documentation
doumdi Oct 26, 2023
dfd4044
Working prod Docker Example and documentation
doumdi Oct 27, 2023
35f133b
Changed to debian bookworm
doumdi Oct 27, 2023
a2ce4f7
Updated documentation
doumdi Oct 27, 2023
966e36a
Fixed typo
doumdi Oct 27, 2023
0aaac14
Add verbose flag
doumdi Oct 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/draft-joss-paper-pdf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: JOSS Paper Draft PDF

on: [push]
on:
push:
branches: [main, joss-paper-review]
workflow_dispatch:
branches: [main, joss-paper-review]

jobs:
paper:
Expand All @@ -23,4 +27,3 @@ jobs:
# PDF. Note, this should be the same directory as the input
# paper.md
path: joss-paper/paper.pdf

4 changes: 2 additions & 2 deletions .github/workflows/gen-doc-and-deploy-to-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.7]
python-version: [3.11.4]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
run: |
cmake .
make python-all
echo "OPENTERA_PYTHON=$(echo $PWD/python/env/python-3.10/bin/python)" >> $GITHUB_ENV
echo "OPENTERA_PYTHON=$(echo $PWD/python/env/python-3.11/bin/python)" >> $GITHUB_ENV
echo "PYTHONPATH=$(echo $PWD/python)" >> $GITHUB_ENV

- name: Generate Self Signed TLS Certificates
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python-package-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.7]
python-version: [3.11.4]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -42,8 +42,8 @@ jobs:
- name: Build dist package with setuptools
working-directory: teraserver/python
run: |
./env/python-3.10/bin/python3 -m pip install --upgrade setuptools wheel twine
./env/python-3.10/bin/python3 setup.py sdist bdist_wheel
./env/python-3.11/bin/python3 -m pip install --upgrade setuptools wheel twine
./env/python-3.11/bin/python3 setup.py sdist bdist_wheel
du -h dist

- name: Run Tests
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Upload package to PyPi
working-directory: teraserver/python
run: |
./env/python-3.10/bin/python3 -m twine upload dist/*
./env/python-3.11/bin/python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/run_tests_on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.7]
python-version: [3.11.4]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
run: |
cmake .
make python-all
echo "OPENTERA_PYTHON=$(echo $PWD/python/env/python-3.10/bin/python)" >> $GITHUB_ENV
echo "OPENTERA_PYTHON=$(echo $PWD/python/env/python-3.11/bin/python)" >> $GITHUB_ENV
echo "PYTHONPATH=$(echo $PWD/python)" >> $GITHUB_ENV

- name: Generate Self Signed TLS Certificates
Expand Down Expand Up @@ -100,7 +100,12 @@ jobs:
working-directory: teraserver/python/tests/opentera/db/models
run: |
$OPENTERA_PYTHON -m unittest discover . "test_*.py"


- name: Run Service Tests
working-directory: teraserver/python/tests/opentera/services
run: |
$OPENTERA_PYTHON -m unittest discover . "test_*.py"

- name: Run FileTransferService Tests
working-directory: teraserver/python/tests/services/FileTransferService
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ coverage.xml

# Sphinx documentation
docs/_build/
docs/--no-check-certificate
docs/swagger.json

build-teraplus-Desktop_Qt_5_12_0_MSVC2017_64bit-Debug
*.user
build-teraserver-Desktop_Qt_5_12_0_MSVC2017_64bit-Debug
.idea
python-3.6

# Docker
docker/prod/certificates/*.pem

# Node modules
node_modules/
Expand Down Expand Up @@ -92,3 +96,4 @@ joss-paper/paper.jats
joss-paper/paper.pdf
/.vscode
_python-3.10
python-3.11
96 changes: 73 additions & 23 deletions docker/dev/README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,102 @@
# Getting Started for Developers - Docker
# Setup a dev Environment with Docker-Compose on Mac/Linux/Windows

## Pre-requisites
[Docker Compose](https://docs.docker.com/compose/) is a tool that simplifies the management of multi-container [Docker](https://docs.docker.com/) applications. It allows you to define and run complex applications using a simple YAML file, specifying the services, networks, and volumes needed, making it easier to orchestrate and manage multiple Docker containers as a single application. An example Docker Compose configuration is provided with OpenTeraServer on GitHub in the [docker/dev](https://github.com/introlab/opentera/tree/main/docker/dev) directory.

## Warnings

The following example is provided for testing on a local machine and is not suited for production.

## Requirements

* [Install Docker Desktop for Windows/Linux/Mac](https://www.docker.com/products/docker-desktop/)
* [Install Visual Studio Code](https://code.visualstudio.com/download)
* Enough free space on your disk (10Gb+)

### Install Docker Desktop

* Follow installation procedures and use default settings.
* Follow installation procedures for your operating system and use default settings. You might need to have Administration rights to proceed with installation.

### Install Visual Studio Code

* Follow installation procedures and use default settings.
* Follow installation procedures for your operating system and use default settings. You might need to have Administration rights to proceed with installation.

#### Visual Studio Code Extensions

* Install the following extensions:
* [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
* [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
* [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker)
* [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake)
* [Markdown](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
Launch Visual Studio Code and install the following [extensions](https://code.visualstudio.com/docs/editor/extension-marketplace):

* [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
* [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
* [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker)
* [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake)
* [Markdown](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)

## Open OpenTera Base Folder in Visual Studio Code

We assume here that you have cloned the [code from GitHub](https://github.com/introlab/opentera.git).
You must select the root directory of the opentera git project.

## Build the Development Environment with docker-compose
### Build the Development Environment with docker-compose

A sample [docker-compose.yml](https://github.com/introlab/opentera/blob/main/docker/dev/docker-compose.yml) file is provided that generates a full environment with the following components running in individual containers :

* Redis server
* PostgresSQL server
* NGINX reverse proxy server
* A certificate generator for https self-signed certificates
* TeraServer and base services

Procedure:

1. Right-click on the [docker-compose.yml](https://github.com/introlab/opentera/blob/main/docker/dev/docker-compose.yml) and select "Compose Up". This can take several minutes the first time to download all the images and start the containers.
2. Docker compose will create **volumes** (shared disks) to store your databases, configurations, files as specified in the "volume:" section. Those directories are automatically mounted when the containers are started.
3. When running for the first time, databases with default values are generated.
4. **The default user is "admin" with password "admin".**
5. The opentera source code is copied (not mounted) at the moment. If you make changes in the code, you need to do "Compose Up" again to generate the new container.

**At this stage you have a running OpenTeraServer on your local machine on port 40075. Congratulations!**

API Documentation can be viewed by browsing to [https://localhost:40075/doc](https://localhost:40075/doc). Accept the security risks if your browser is giving you a warning, this is caused because by your local server using a self generated certificate.

### Connecting to the Local Server with OpenTeraPlus

You can use the GUI application OpenTeraPlus to connect and configure the server. [The application can be downloaded from OpenTeraPlus files release](https://github.com/introlab/openteraplus/releases). Alternatively, you can compile the application. More information are available on [OpenTeraPlus GitHub project](https://github.com/introlab/openteraplus).

#### Configuring OpenTeraPlus with your Local Server

The default OpenTeraPlus configuration should allow you to connect to the server named: "Local - Port 40075". You might want to add "Local-Docker" server in the Documents/OpenTeraPlus/config/OpenTeraPlus.json for OpenTeraPlus if you decide to change your docker-compose configuration with a new port :

```json
{
"Settings": {
"showServers": true,
"logToFile": true
},
"Servers": {
"Local - Port 40075": {
"url": "localhost",
"port": 40075
},
"Local-Docker": {
"url": "localhost",
"port": 40075
}
}
}
```

A sample [docker-compose.yml](./docker-compose.yml) file is provided that generates a full environment with the following components running in individual containers :
- Redis server
- PostgresSQL server
- NGINX reverse proxy server
- A certificate generator for https self-signed certificates
- TeraServer and base services
## Advanced Options

>1. Right-click on the [docker-compose.yml](./docker-compose.yml) and select "Compose Up". This can take several minutes the first time to download all the images and start the containers.
### Connect to the Local Database using pgAdmin

>2. Docker compose will create **volumes** (shared disks) to store your databases, configurations, files as specified in the "volume:" section. Those directories are automatically mounted when the containers are started.
[pgAdmin](https://www.pgadmin.org/) is an open-source administration and management tool for the PostgreSQL database. It provides a user-friendly graphical interface for interacting with PostgreSQL databases, allowing users to perform tasks like querying the database, managing tables and data, and configuring server settings without needing to use command-line tools.

>3. When running for the first time, databases with default values are generated.
You can connect to the PostgreSQL database running in your container by using port **5433** and using **user: "postgres"** and **password: "postgres"**. This is useful for debugging databases or to understand its structure.

>4. The default user is "admin" with password "admin".
### Connect to Redis

>5. The opentera source code is copied (not mounted) at the moment. If you make changes in the code, you need to do "Compose Up" again to generate the new container.
Redis connexion is available on port **6380**. You can use your favorite tool to inspect the cache and publish/subscribe to topics for debugging.

## Debugging with VS Code
### Debugging with VS Code

Using the Visual Studio Code remote debugger, you can connect to running code in the opentera-server container on port 5678. A mapping to the local code corresponding to the container TeraServer code is required. You can create a configuration file named "launch.json" in the .vscode directory that contains :

Expand Down
2 changes: 1 addition & 1 deletion docker/dev/certificates/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-bullseye
FROM python:3.11.5-bullseye

# Install requirements (not changing often)
ADD ./teraserver/python/env/requirements.txt /requirements.txt
Expand Down
6 changes: 3 additions & 3 deletions docker/dev/teraserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.10-bullseye
FROM python:3.11.5-bullseye

# Change default shell to bash
SHELL ["/bin/bash", "-c"]
Expand Down Expand Up @@ -38,15 +38,15 @@ ADD ./teraserver/python/env/requirements.txt /requirements.txt
RUN ["/bin/bash", "-c", "python3 -m pip install -r /requirements.txt"]

# Install latest npm / nodejs
RUN curl -sL https://deb.nodesource.com/setup_16.x -o /nodesource_setup.sh
RUN curl -sL https://deb.nodesource.com/setup_18.x -o /nodesource_setup.sh
RUN bash /nodesource_setup.sh
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y nodejs

# Add directory from host (path relative to context)
ADD ./teraserver /teraserver

# Remove local environment that was copied in the ADD command if it exists
RUN if [ -d "/teraserver/python/env/python-3.10" ]; then rm -rf /teraserver/python/env/python-3.10; fi
RUN if [ -d "/teraserver/python/env/python-3.11" ]; then rm -rf /teraserver/python/env/python-3.11; fi

# Cleanup directory of cmake cache (we possibly are using it outside of docker)
RUN if [ -f "/teraserver/CMakeCache.txt" ]; then rm -f /teraserver/CMakeCache.txt; fi
Expand Down
Loading