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

Pod v4 MAIN #1229

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
73ed68a
* UPGRADE Django to v4.2.16
Badatos Oct 24, 2024
e50187e
Merge branch 'develop' into pod_V4
Badatos Oct 28, 2024
7e4cd06
* Remove USE_L10N deprecated param
Badatos Oct 28, 2024
af15471
Remove `USE_L10N` from test_settings
Badatos Oct 28, 2024
7c01d4b
Merge branch 'develop' into pod_V4
Badatos Oct 29, 2024
a721a03
* Correct video_edit slect2 display with tagulous (remove duplicated …
Badatos Oct 29, 2024
4deb722
* Remove Python 3.8 from compatible py versions, and add 3.12
Badatos Oct 30, 2024
b2975a6
Merge branch 'develop' into pod_V4
Badatos Oct 30, 2024
645b930
Upgrade dependencies
Badatos Oct 30, 2024
7c5d362
several corrections for 4.0. Prepare to say goodbye to CKEditor
Badatos Nov 13, 2024
917a006
correct video/models.py
Badatos Nov 13, 2024
9a4ab7f
Remove Compatibility with ES 6
Badatos Nov 21, 2024
097edab
Replace js_asset by django.templatetags.static, as js_asset is deprec…
Badatos Nov 21, 2024
151af7c
Fix code scanning alert no. 81: URL redirection from remote source
Badatos Nov 21, 2024
ccfebc3
Improve security in pod playlists, as suggested by CodeQL
Badatos Nov 21, 2024
5941015
Disable some video_tags functions
Badatos Nov 21, 2024
bf7dc21
Flake8 compliance
Badatos Nov 21, 2024
cb32056
Disable Debug in test_settings
Badatos Nov 21, 2024
c9de8e1
only add debug toolbar when not in testing mode
Badatos Nov 21, 2024
d28b3dc
Add title_en to sample videos.json
Badatos Nov 21, 2024
6bd0164
Reset ES-INDEX for tests as "Pod"
Badatos Nov 21, 2024
3c17c09
Use Elasticsearch 7 in github workflows
Badatos Nov 21, 2024
b54952b
set Video tags as "not required" + correct bug on video tags indexing
Badatos Nov 21, 2024
fd9fbaa
Adapt Video views and video-info to Tagulous
Badatos Nov 25, 2024
bf5cabd
adapt video get_json_to_index() function to Tagulous
Badatos Nov 25, 2024
92ac5b2
Adapt Video Recorder to Tagulous
Badatos Nov 25, 2024
cecec76
Only do dressing tests when `USE_DRESSING==True
Badatos Nov 25, 2024
f7d1a21
* Only run `cut` tests when `USE_CUT==True`
Badatos Nov 25, 2024
44a9a5b
Merge branch 'develop' into pod_V4
Badatos Nov 28, 2024
dfd0662
+ Upgrade all py packages
Badatos Dec 2, 2024
14c3457
Drop compatibility with ES 7
Badatos Dec 2, 2024
ff15569
Upgrade importlib-metadata to 7.2.1 for compatibility with ralph-malp…
Badatos Dec 2, 2024
e6ed3f7
replace "order" by "date_added" in channel video sorting
Badatos Dec 3, 2024
abd6cdc
Display a tag cloud with tags assigned to videos
Badatos Dec 3, 2024
4698507
apply GH actions "pod_dev" and "code_formatting" on pod_V4 branch
Badatos Dec 3, 2024
2501b45
Fixup. Format code with Prettier
invalid-email-address Dec 3, 2024
a18ea13
Fixup. Format code with Black
invalid-email-address Dec 3, 2024
76e6191
Auto-update configuration files
invalid-email-address Dec 3, 2024
7b58f99
Merge branch 'main' into pod_V4
Badatos Dec 4, 2024
c2d1011
Bump ELASTICSEARCH_TAG to 8.16.1
Badatos Dec 4, 2024
b5fc92a
Change elastic-github-actions to master to avoid ES 8 issue
Badatos Dec 4, 2024
92fa056
Set ES_VERSION=8 in settings_local_docker
Badatos Dec 5, 2024
4853cdd
Fixup. Format code with Black
invalid-email-address Dec 5, 2024
12d0c3f
test ES with CURL after create_pod_index
Badatos Dec 5, 2024
e62575b
Merge branch 'pod_V4' of https://github.com/EsupPortail/Esup-Pod into…
Badatos Dec 5, 2024
68d7f5f
test with es1:9200 url
Badatos Dec 5, 2024
3216702
Return to elasticsearch.localhost url
Badatos Dec 5, 2024
6eeedd4
add --insecure to curl command
Badatos Dec 5, 2024
8cfc848
Disable elastic-github-actions security
Badatos Dec 9, 2024
50c5437
replace https by http in curl
Badatos Dec 9, 2024
7343fa0
increase sqlite timeout in test settings to have less "sqlite3.Operat…
Badatos Dec 9, 2024
5115cb4
Replace `assertNotEquals`by `assertNotEqual`for Python 3.12 compatibi…
Badatos Dec 9, 2024
2f928f9
Replace remaining assertEquals by assertEqual
Badatos Dec 9, 2024
ec9addf
Bump Django to 4.2.17 (fix 2 CVE, see https://docs.djangoproject.com/…
Badatos Dec 9, 2024
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 @@ -2,7 +2,7 @@ DJANGO_SUPERUSER_USERNAME=<USER>
DJANGO_SUPERUSER_PASSWORD=<PWD>
DJANGO_SUPERUSER_EMAIL=<MAIL>
### You can use internal registry
ELASTICSEARCH_TAG=elasticsearch:8.13.0
ELASTICSEARCH_TAG=elasticsearch:8.16.1
NODE_TAG=node:19
PYTHON_TAG=python:3.9-bullseye
REDIS_TAG=redis:alpine3.16
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Code Formatting

on:
push:
branches: [master, develop]
branches: [master, develop, main, pod_V4]
workflow_dispatch:

jobs:
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/pod_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ on:
push:
branches:
- develop
- dev_v4
- features/**
- dependabot/**
pull_request:
branches:
- develop
- dev_v4
workflow_dispatch:

env:
PYTHON_VERSION: '3.9'
DJANGO_SUPERUSER_USERNAME: "admin"
DJANGO_SUPERUSER_PASSWORD: "passwd"
DJANGO_SUPERUSER_EMAIL: "[email protected]"
ELASTICSEARCH_TAG: "elasticsearch:7.17.18"
ELASTICSEARCH_TAG: "elasticsearch:8.16.1"
NODE_VERSION: "20"
NODE_TAG: "node:20"
PYTHON_TAG: "python:3.9-bullseye"
Expand Down Expand Up @@ -86,25 +88,30 @@ jobs:
echo PYTHON_TAG=$PYTHON_TAG >> .env.dev
echo REDIS_TAG=$REDIS_TAG >> .env.dev
echo DOCKER_ENV=$DOCKER_ENV >> .env.dev

- name: cat env
run: cat .env.dev

- name: make Build container
run: |
sudo rm -rf ./pod/log
sudo rm -rf ./pod/static
sudo rm -rf ./pod/node_modules
docker compose -f ./docker-compose-full-dev-with-volumes-test.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG --build-arg NODE_VERSION=$NODE_TAG --build-arg PYTHON_VERSION=$PYTHON_TAG --no-cache
docker compose -f ./docker-compose-full-dev-with-volumes-test.yml up --detach --force-recreate --always-recreate-deps

- name: Sleep for 60 seconds to wait run server on pod back
uses: jakejarvis/wait-action@master
with:
time: '60s'

- name: show running container
run: |
docker ps
echo "🍏 Docker is UP ${{ job.status }}."
docker exec pod-back-with-volumes ps auxf
docker exec pod-back-with-volumes python manage.py loaddata pod/video/fixtures/sample_videos.json

- name: run test in docker
run: docker exec pod-back-with-volumes coverage run --append manage.py test -v 3 --keepdb pod.video_encode_transcript.tests.test_remote_encode_transcode

Expand All @@ -126,18 +133,19 @@ jobs:
sudo chown -R runner:runner .

## Start unit test test ##
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@refactor_with_plugins
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
# stack-version: 7.6.0
stack-version: 6.8.23
stack-version: 8.16.1
plugins: analysis-icu
security-enabled: false

- name: Setup Pod
run: |
coverage run --append manage.py create_pod_index --settings=pod.main.test_settings
python manage.py makemigrations --settings=pod.main.test_settings
python manage.py migrate --settings=pod.main.test_settings
coverage run --append manage.py create_pod_index --settings=pod.main.test_settings
curl -XGET "http://elasticsearch.localhost:9200/pod/_search?pretty=true&q=fr"

- name: Run Tests with coverage
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/pod_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: ['3.8', '3.10']
python-version: ['3.10', '3.12']
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand Down Expand Up @@ -53,17 +53,18 @@ jobs:
pip install -r requirements-dev.txt
sudo npm install -g yarn

## Start unit test test ##
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@refactor_with_plugins
## Start unit tests ##
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
# stack-version: 7.6.0
stack-version: 6.8.23
stack-version: 8.16.1
plugins: analysis-icu
security-enabled: false

- name: Setup Pod
run: |
python manage.py create_pod_index --settings=pod.main.test_settings
curl -XGET "http://elasticsearch.localhost:9200/pod/_search?pretty=true&q=fr"
python manage.py makemigrations --settings=pod.main.test_settings
python manage.py migrate --settings=pod.main.test_settings
cd pod
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ pod/static/
.cache_ggshield
htmlcov
compile-model
pod/activitypub/*.pub

# IDE Files #
#############
.idea
.vscode
*.code-workspace

# Certificates #
################
Expand Down
Loading
Loading