Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .env.dev-exemple
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DJANGO_SUPERUSER_EMAIL=<MAIL>
### You can use internal registry
ELASTICSEARCH_TAG=elasticsearch:8.17.3
NODE_TAG=node:23
PYTHON_TAG=python:3.9-bookworm
PYTHON_TAG=python:3.12-bookworm
REDIS_TAG=redis:alpine3.21
### DOCKER_ENV: You can specify light or full.
### In case of value changing, you have to rebuild and restart your container.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pod_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ on:
workflow_dispatch:

env:
PYTHON_VERSION: '3.9'
PYTHON_VERSION: '3.10'
DJANGO_SUPERUSER_USERNAME: "admin"
DJANGO_SUPERUSER_PASSWORD: "passwd"
DJANGO_SUPERUSER_EMAIL: "noreply@uni.fr"
ELASTICSEARCH_TAG: "elasticsearch:8.17.3"
NODE_VERSION: "23"
NODE_TAG: "node:23"
PYTHON_TAG: "python:3.9-bullseye"
PYTHON_TAG: "python:3.10-bookworm"
REDIS_TAG: "redis:alpine3.21"
DOCKER_ENV: "full-test"

Expand Down
714 changes: 364 additions & 350 deletions CONFIGURATION_FR.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DJANGO_SUPERUSER_PASSWORD=
DJANGO_SUPERUSER_EMAIL=
ELASTICSEARCH_TAG=elasticsearch:8.17.3
NODE_TAG=node:23
PYTHON_TAG=python:3.9-bookworm
PYTHON_TAG=python:3.12-bookworm
REDIS_TAG=redis:alpine3.21
DOCKER_ENV=light
----
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/pod-back/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#------------------------------------------------------------------------------------------------------------------------------
# Conteneur node
ARG NODE_VERSION=23
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.12
FROM $NODE_VERSION AS source-build-js

WORKDIR /tmp/pod
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/pod-encode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# (")_(")
#------------------------------------------------------------------------------------------------------------------------------

ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.12

#------------------------------------------------------------------------------------------------------------------------------
# Conteneur python
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/pod-transcript/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# (")_(")
#------------------------------------------------------------------------------------------------------------------------------
# Conteneur node
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.12

#------------------------------------------------------------------------------------------------------------------------------
# Conteneur python
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/pod-xapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# (")_(")
#------------------------------------------------------------------------------------------------------------------------------
# Conteneur node
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.12

#------------------------------------------------------------------------------------------------------------------------------
# Conteneur python
Expand Down
2 changes: 1 addition & 1 deletion dockerfile-dev-with-volumes/pod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#------------------------------------------------------------------------------------------------------------------------------
# Conteneur node
ARG NODE_VERSION=23
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.12
FROM $NODE_VERSION AS source-build-js

WORKDIR /tmp/pod
Expand Down
6 changes: 2 additions & 4 deletions pod/ai_enhancement/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ class Meta:
)

tags = TagField(
help_text=_(
"""
help_text=_("""
Please choose tags for your video.
Separate tags with spaces, enclose the tags consist of several words in quotation marks.
"""
),
"""),
verbose_name=_("Tags"),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
)
from pod.video.models import Video


USE_AI_ENHANCEMENT = getattr(settings, "USE_AI_ENHANCEMENT", False)
AI_ENHANCEMENT_TO_STAFF_ONLY = getattr(settings, "AI_ENHANCEMENT_TO_STAFF_ONLY", True)

Expand Down
7 changes: 2 additions & 5 deletions pod/authentication/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ def cas_user_logout_callback(sender, **kwargs) -> None:
"""Callback for CAS user logout signal."""
args = {}
args.update(kwargs)
print(
"""cas_user_logout_callback:
print("""cas_user_logout_callback:
user: %s
session: %s
ticket: %s
"""
% (args.get("user"), args.get("session"), args.get("ticket"))
)
""" % (args.get("user"), args.get("session"), args.get("ticket")))
6 changes: 2 additions & 4 deletions pod/authentication/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ def test_authentication_logout(self) -> None:
response = self.client.post("/authentication_logout/")
self.assertRedirects(response, "/accounts/logout/?next=/", target_status_code=302)

print(
" ---> test_authentication_logout \
of authenticationViewsTestCase: OK!"
)
print(" ---> test_authentication_logout \
of authenticationViewsTestCase: OK!")

def test_userpicture(self) -> None:
self.client = Client()
Expand Down
23 changes: 10 additions & 13 deletions pod/cut/views.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
"""Esup-Pod video cutting app views."""

from django.shortcuts import render
from pod.main.views import in_maintenance
from django.shortcuts import redirect
from django.urls import reverse
from django.shortcuts import get_object_or_404
from django.contrib.sites.shortcuts import get_current_site
from django.contrib.auth.decorators import login_required
from django.utils.translation import gettext as _
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import PermissionDenied
from django.http import QueryDict
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import gettext as _
from django.views.decorators.csrf import csrf_protect

from pod.video_encode_transcript.encode import start_encode
from pod.main.views import in_maintenance
from pod.video.models import Video

from .models import CutVideo
from .forms import CutVideoForm
from .models import CutVideo
from .utils import clean_database

from django.conf import settings

RESTRICT_EDIT_VIDEO_ACCESS_TO_STAFF_ONLY = getattr(
settings, "RESTRICT_EDIT_VIDEO_ACCESS_TO_STAFF_ONLY", False
)
Expand Down Expand Up @@ -77,7 +73,8 @@ def cut_video(request, slug):

clean_database(video.id)

start_encode(video.id)
video.launch_encode = True
video.save()

messages.add_message(request, messages.SUCCESS, _("The cut was made."))
return redirect(reverse("video:dashboard"))
Expand Down
4 changes: 2 additions & 2 deletions pod/dressing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
from .models import Dressing
from django.conf import settings
from django.db.models import Q
from django.db.models import Q, QuerySet
from django.core.handlers.wsgi import WSGIRequest


Expand Down Expand Up @@ -34,7 +34,7 @@ def get_dressing_input(dressing: Dressing, ffmpeg_dressing_input: str) -> str:
return command


def get_dressings(user, accessgroup_set) -> list:
def get_dressings(user, accessgroup_set) -> QuerySet[Dressing]:
"""
Return the list of dressings that the user can use.

Expand Down
1 change: 1 addition & 0 deletions pod/enrichment/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# gitguardian:ignore

"""Esup-Pod unit tests for enrichment views."""

from django.test import TestCase
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
Expand Down
1 change: 0 additions & 1 deletion pod/import_video/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
from pod.main.tasks import task_start_bbb_presentation_encode_and_upload_to_pod
from pod.main.tasks import task_start_bbb_presentation_encode_and_move_to_destination


RESTRICT_EDIT_IMPORT_VIDEO_ACCESS_TO_STAFF_ONLY = getattr(
settings, "RESTRICT_EDIT_IMPORT_VIDEO_ACCESS_TO_STAFF_ONLY", True
)
Expand Down
Loading
Loading