Skip to content

Commit 0298e29

Browse files
authored
[DONE] Develop 3.7.0
Merge pull request #1119 from EsupPortail/develop
2 parents be94744 + 5dedf14 commit 0298e29

File tree

283 files changed

+19419
-7228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+19419
-7228
lines changed

.coveragerc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11

22
[report]
3-
# Here you can exclude a file from coverage testing
3+
# Add a column to the report with a summary of which lines (and branches) the tests missed.
4+
# This makes it easy to go from a failure to fixing it, rather than using the HTML report.
5+
show_missing = True
6+
7+
[run]
8+
relative_files = True
9+
source = .
410

11+
# This ensures that your code runs through both the True and False paths of each conditional statement.
12+
# branch = True
13+
14+
# Here you can exclude a file from coverage testing
515
# nb: you can also add a "# pragma: no cover"
616
# on each function you don't want to be covered
7-
[run]
8-
source = pod/
917
omit = pod/*settings*.py
18+
pod/custom/settings*.py
1019
pod/*apps.py
1120
pod/wsgi.py
21+
pod/db_migrations/*
1222
*/tests/*
1323
*/commands/*
1424
*/migrations/*

.eslintrc.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
22
"env": {
33
"browser": true,
4-
"commonjs": true,
4+
"commonjs": false,
55
"es2021": true,
6-
"node": true
6+
"node": false
77
},
88
"extends": "eslint:recommended",
99
"parserOptions": {
@@ -30,6 +30,8 @@ module.exports = {
3030
},
3131
/* functions and Objects that will not trigger a "not defined" error. */
3232
"globals": {
33+
"require": true,
34+
"process": true,
3335
"Cookies": "readonly",
3436
"gettext": "readonly",
3537
"ngettext": "readonly",
@@ -41,5 +43,12 @@ module.exports = {
4143
"showalert": "writable",
4244
"showLoader": "writable",
4345
"manageDisableBtn": "writable"
44-
}
46+
},
47+
overrides: [
48+
{
49+
// Allow use of import & export functions
50+
files: [ "pod/main/static/js/utils.js", "pod/video/static/js/regroup_videos_by_theme.js" ],
51+
parserOptions: { sourceType: "module" },
52+
}
53+
]
4554
};

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212

1313
# Désigne tous les fichiers qui sont vraiment binaires et ne doivent pas être modifiés.
1414
*.png binary
15-
*.jpg binary
15+
*.jpg binary
16+
*.webp binary

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Before sending your pull request, make sure the following are done:
1+
# Before sending your pull request, make sure the following are done
22

33
* [ ] You have read our [contribution guidelines](https://github.com/EsupPortail/Esup-Pod/blob/master/CONTRIBUTING.md).
44
* [ ] Your PR targets the `develop` branch.

.github/workflows/code_formatting.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: Code Formatting
44
on:
55
push:
66
branches: [master, develop]
7+
workflow_dispatch:
78

89
jobs:
910
code-formatting:

.github/workflows/pod_dev.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ on:
1111
pull_request:
1212
branches:
1313
- develop
14+
workflow_dispatch:
1415

1516
env:
1617
PYTHON_VERSION: '3.9'
1718
DJANGO_SUPERUSER_USERNAME: "admin"
1819
DJANGO_SUPERUSER_PASSWORD: "passwd"
19-
DJANGO_SUPERUSER_EMAIL: "noreplay@uni.fr"
20+
DJANGO_SUPERUSER_EMAIL: "noreply@uni.fr"
2021
ELASTICSEARCH_TAG: "elasticsearch:7.17.18"
21-
NODE_VERSION: "19"
22-
NODE_TAG: "node:19"
22+
NODE_VERSION: "20"
23+
NODE_TAG: "node:20"
2324
PYTHON_TAG: "python:3.9-bullseye"
2425
REDIS_TAG: "redis:alpine3.16"
2526
DOCKER_ENV: "full-test"
@@ -55,18 +56,17 @@ jobs:
5556
5657
- name: Install Dependencies
5758
run: |
58-
sudo apt-get clean
5959
sudo apt-get update
60-
sudo apt-get install ffmpeg
61-
sudo apt-get install -y ffmpegthumbnailer
60+
sudo apt-get install -y --no-install-recommends ffmpeg ffmpegthumbnailer
61+
sudo apt-get clean
62+
sudo rm -rf /var/lib/apt/lists/*
6263
python -m pip install --upgrade pip
6364
pip install -r requirements-dev.txt
6465
sudo npm install -g yarn
6566
66-
# FLAKE 8
67+
# FLAKE 8 (see setup.cfg for configurations)
6768
- name: Flake8 compliance
68-
run: |
69-
flake8 --max-complexity=7 --ignore=E501,W503,E203 --exclude .git,pod/*/migrations/*.py,test_settings.py,node_modules/*/*.py,pod/static/*.py,pod/custom/tenants/*/*.py
69+
run: flake8
7070

7171
## Start remote encoding and transcoding test ##
7272
- name: Create settings local file
@@ -106,7 +106,7 @@ jobs:
106106
docker exec pod-back-with-volumes ps auxf
107107
docker exec pod-back-with-volumes python manage.py loaddata pod/video/fixtures/sample_videos.json
108108
- name: run test in docker
109-
run: docker exec pod-back-with-volumes coverage run --append --source='.' manage.py test -v 3 --keepdb pod.video_encode_transcript.tests.test_remote_encode_transcode
109+
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
110110

111111
- name: Run pa11y-ci full
112112
run: docker exec pa11y-ci pa11y-ci -c /usr/src/app/dockerfile-dev-with-volumes/pa11y-ci/config.json
@@ -135,15 +135,22 @@ jobs:
135135

136136
- name: Setup Pod
137137
run: |
138-
coverage run --append --source='.' manage.py create_pod_index --settings=pod.main.test_settings
138+
coverage run --append manage.py create_pod_index --settings=pod.main.test_settings
139139
python manage.py makemigrations --settings=pod.main.test_settings
140140
python manage.py migrate --settings=pod.main.test_settings
141141
142142
- name: Run Tests with coverage
143143
env:
144144
PYTHONUNBUFFERED: 1
145145
run: |
146-
coverage run --append --source='.' manage.py test -v 3 --settings=pod.main.test_settings
146+
coverage run --append manage.py test -v 3 --settings=pod.main.test_settings
147+
coverage xml -o cobertura.xml
148+
149+
- name: Codacy coverage reporter
150+
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
151+
continue-on-error: true
152+
env:
153+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
147154

148155
- name: Send coverage to coveralls.io
149156
# coveralls command has been installed by requirements-dev.txt

.github/workflows/pod_main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
branches:
1111
- main
1212
- master
13+
workflow_dispatch:
1314

1415
jobs:
1516
Pod-Main:
@@ -35,7 +36,7 @@ jobs:
3536
uses: actions/setup-python@v5
3637
with:
3738
python-version: ${{ matrix.python-version }}
38-
39+
3940
# Remove apt repos that are known to break from time to time
4041
# See https://github.com/actions/virtual-environments/issues/323
4142
- name: Remove broken apt repos [Ubuntu]
@@ -44,11 +45,10 @@ jobs:
4445
4546
- name: Install Dependencies
4647
run: |
47-
sudo apt-get clean
4848
sudo apt-get update
49-
sudo apt-get install ffmpeg
50-
sudo apt-get install -y ffmpegthumbnailer
51-
sudo apt-get install -y npm
49+
sudo apt-get install -y --no-install-recommends ffmpeg ffmpegthumbnailer npm
50+
sudo apt-get clean
51+
sudo rm -rf /var/lib/apt/lists/*
5252
python -m pip install --upgrade pip
5353
pip install -r requirements-dev.txt
5454
sudo npm install -g yarn

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Compiled source #
1+
# Compiled source #
22
###################
33
*.com
44
*.class
@@ -60,6 +60,7 @@ chromedriver
6060
pod/static/
6161
*.bak
6262
.coverage
63+
.cache_ggshield
6364
htmlcov
6465
compile-model
6566

.markdownlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"default": true,
3+
"MD033": false,
4+
"MD013": {
5+
"line_length": 90
6+
}
7+
}

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/gitguardian/ggshield
3+
rev: v1.27.0
4+
hooks:
5+
- id: ggshield
6+
language_version: python3
7+
stages: [commit]

0 commit comments

Comments
 (0)