Skip to content

[DONE] improve clean_video_files and code cleaning #782

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

Merged
merged 479 commits into from
Mar 23, 2023

Conversation

Badatos
Copy link
Collaborator

@Badatos Badatos commented Mar 21, 2023

Now clean_video_files command can clean obsolete video files AND User folders.

  • add --type and --dry options to clean_video_files
  • Replace python 3.7 by 3.10 in CI, as 3.7 EOL is 27 Jun 2023
  • Upgrade ldap3 package for python 3.10 compatibility
  • Accessibility testing are run with coverage
  • Code formatting: Remove useless " " in python strings

Mateo6051 and others added 30 commits January 17, 2023 12:34
- Suppression des données propres à l'Université de Lille
- Modification de la documentation
- Modification de la documentation
- Modification du ficher dockerfile-dev-with-volumes/config/elasticsearch/settings_local-7-exemple.py
- Modification de la documentation
- Modification de la documentation
…tion comments, add webp for podfile image extension and remove video extension for podfile document
…ation_markdown

[DONE] Ptitloup/configuration markdown
…configuration

Ptitloup/improve configuration
…configuration

move configuration json file to main app and create md config file to…
…configuration

remove unused commit in code formatting action
@gitguardian
Copy link

gitguardian bot commented Mar 21, 2023

⚠️ GitGuardian has uncovered 11 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
- Generic High Entropy Secret b3622f8 pod/main/test_settings.py View secret
5773735 Django Secret Key a72942b dockerfile-dev-with-volumes/config/elasticsearch/settings_local-7-exemple.py View secret
5671468 Generic High Entropy Secret 8b71cfd pod/main/test_settings.py View secret
5671468 Generic High Entropy Secret bc9099a pod/main/test_settings.py View secret
5671468 Generic High Entropy Secret 4f0d61d pod/main/test_settings.py View secret
5671468 Generic High Entropy Secret c0885a4 pod/main/test_settings.py View secret
5671469 Generic High Entropy Secret 97ebbc8 pod/authentication/tests/test_populated.py View secret
5671469 Generic High Entropy Secret 4233e7d pod/authentication/tests/test_populated.py View secret
5671469 Generic High Entropy Secret d2ef31c pod/authentication/tests/test_populated.py View secret
5671468 Generic High Entropy Secret d2ef31c pod/main/test_settings.py View secret
5671468 Generic High Entropy Secret 5241488 pod/main/test_settings.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@Badatos Badatos changed the title [WIP] Feature/improve archiving [DONE] improve clean_video_files and code cleaning Mar 21, 2023
Copy link
Contributor

@ptitloup ptitloup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci pour cette contribution

Copy link
Contributor

@ptitloup ptitloup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok pour moi

@ptitloup
Copy link
Contributor

ok niveau code mais les tests unitaires ne passent pas, tu peux regarder pourquoi ? merci

@Badatos
Copy link
Collaborator Author

Badatos commented Mar 22, 2023

ok niveau code mais les tests unitaires ne passent pas, tu peux regarder pourquoi ? merci

Ca ne passe plus depuis le merge d'une des dernière PR sur les live :

FAIL: test_attributs (pod.live.tests.test_models.BroadcasterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/Esup-Pod/Esup-Pod/pod/live/tests/test_models.py", line 139, in test_attributs
    self.assertEqual(broadcaster.transcription_file.url, "/media/testfile.vtt")
AssertionError: '/media/live_transcripts/broadcaster1.vtt' != '/media/testfile.vtt'
- /media/live_transcripts/broadcaster1.vtt
+ /media/testfile.vtt

@Badatos
Copy link
Collaborator Author

Badatos commented Mar 22, 2023

J'ai remplacé "testfile.vtt" par "broadcaster1.vtt" pour que ca passe les tests, mais pour faire bien je pense qu'il faudra ajouter un tests supplémentaire pour vérifier que testfile.vtt est bien présent quelque-part. (ou alors c'est qu'il ne faut plus préciser le fichier vtt à la création du Broadcaster)

ptitloup
ptitloup previously approved these changes Mar 22, 2023
@ptitloup ptitloup self-requested a review March 22, 2023 13:11
@ptitloup ptitloup dismissed their stale review March 22, 2023 13:12

dans les tests unitaire, tu as utilisé MEDIA_ROOT au lieu de MEDIA_URL

@ptitloup
Copy link
Contributor

AssertionError: '/media/live_transcripts/broadcaster1.vtt' != '/home/runner/work/Esup-Pod/Esup-Pod/pod/me[33 chars].vtt'

  • /media/live_transcripts/broadcaster1.vtt
  • /home/runner/work/Esup-Pod/Esup-Pod/pod/media/live_transcripts/broadcaster1.vtt

ptitloup
ptitloup previously approved these changes Mar 22, 2023
Copy link
Contributor

@ptitloup ptitloup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok pour moi, merci !

…%s_%s.png" % (video_to_encode.slug, thumbnail_path),` in `store_json_list_thumbnail_files`
@LoicBonavent LoicBonavent self-requested a review March 23, 2023 09:36
Copy link
Collaborator

@LoicBonavent LoicBonavent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La commande python manage.py clean_video_files supprime bien les fichiers inutiles.

Copy link
Contributor

@ptitloup ptitloup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@ptitloup ptitloup merged commit 2d594aa into EsupPortail:develop Mar 23, 2023
@Badatos Badatos deleted the feature/improve_archiving branch March 23, 2023 11:01
ptitloup added a commit that referenced this pull request Apr 12, 2023
* 🐛 podfile fix pagination display (#787)
* improve clean_video_files and code cleaning (#782)
* Fix wrong url of paginated sub-themes (#789)
* Add "help" command to makefile (#792)
* Ptitloup/fix thumbnail (#790)
* Hide channel desc (#794)
* fix podfile (#798)
* Correct podfile sidebar (#799)
* Ptitloup/fix link playlist (#801)
* Fix video theme (#800)


---------
Co-authored-by: MattBild <34771705+mattbild@users.noreply.github.com>
Co-authored-by: Olivier Bado-Faustin <bado@unice.fr>
Co-authored-by: pampletousse <51699553+pampletousse@users.noreply.github.com>
vsabatie pushed a commit to vsabatie/Pod that referenced this pull request Apr 20, 2023
* 🐛 podfile fix pagination display (EsupPortail#787)
* improve clean_video_files and code cleaning (EsupPortail#782)
* Fix wrong url of paginated sub-themes (EsupPortail#789)
* Add "help" command to makefile (EsupPortail#792)
* Ptitloup/fix thumbnail (EsupPortail#790)
* Hide channel desc (EsupPortail#794)
* fix podfile (EsupPortail#798)
* Correct podfile sidebar (EsupPortail#799)
* Ptitloup/fix link playlist (EsupPortail#801)
* Fix video theme (EsupPortail#800)

---------
Co-authored-by: MattBild <34771705+mattbild@users.noreply.github.com>
Co-authored-by: Olivier Bado-Faustin <bado@unice.fr>
Co-authored-by: pampletousse <51699553+pampletousse@users.noreply.github.com>
@Badatos Badatos self-assigned this Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants