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

Fix unnecessary pillow import by using image size from CDN endpoint #218

Merged
merged 9 commits into from
Jul 3, 2024

Conversation

gounux
Copy link
Contributor

@gounux gounux commented Jun 24, 2024

No description provided.

@github-actions github-actions bot added the bug Something isn't working label Jun 24, 2024
@gounux gounux requested a review from Guts June 24, 2024 17:49
geotribu_cli/content/header_check.py Outdated Show resolved Hide resolved
geotribu_cli/content/header_check.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 16.27907% with 36 lines in your changes missing coverage. Please review.

Project coverage is 66.46%. Comparing base (30ce4e4) to head (6278337).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
- Coverage   67.15%   66.46%   -0.69%     
==========================================
  Files          43       43              
  Lines        1985     2016      +31     
  Branches      355      362       +7     
==========================================
+ Hits         1333     1340       +7     
- Misses        567      593      +26     
+ Partials       85       83       -2     
Flag Coverage Δ
unittests 66.17% <16.27%> (-0.74%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
geotribu_cli/content/header_check.py 36.69% <16.27%> (-6.83%) ⬇️

... and 2 files with indirect coverage changes

@Guts
Copy link
Member

Guts commented Jul 2, 2024

@gounux je me suis permis de merger main pour checker que mon fix des flaky tests fonctionne 🤞

Copy link

sonarcloud bot commented Jul 3, 2024

@gounux gounux requested a review from Guts July 3, 2024 07:55
@gounux
Copy link
Contributor Author

gounux commented Jul 3, 2024

kikou @Guts, à mes yeux c'est prêt pour review, avec les derniers ajouts:

  • vérification de la taille de l'image de l'en-tête (max : 800px, configurable en argument du cli)
  • vérification du ratio de l'image de l'en-tête (entre 1.45 et 1.55, configurable en argument du cli)
  • vérification de l'extension de l'image de l'en-tête (doit être parmi les valeurs de la variable defaults_settings.images_header_extensions soit ".png", ".jpg", ".jpeg")

@gounux
Copy link
Contributor Author

gounux commented Jul 3, 2024

à l'avenir ça mériterait un petit coup de refactoring, SonarLint me souffle dans l'oreillette que la complexité de la fonction run est de 80 vs les 15 max recommandés :D

Copy link
Member

@Guts Guts left a comment

Choose a reason for hiding this comment

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

Allez, go, on verra pour itérer plus tard pour le refacto/optim surtout que tu es allergique aux docstrings xD !

@gounux
Copy link
Contributor Author

gounux commented Jul 3, 2024

Allez, go, on verra pour itérer plus tard pour le refacto/optim surtout que tu es allergique aux docstrings xD !

Je me soigne ...

@gounux gounux merged commit 046d091 into main Jul 3, 2024
31 checks passed
@gounux gounux deleted the fix/pillow-import branch July 3, 2024 08:07
@Guts
Copy link
Member

Guts commented Jul 3, 2024

Allez, go, on verra pour itérer plus tard pour le refacto/optim surtout que tu es allergique aux docstrings xD !

Je me soigne ...

Si t'es sur VS Code, y'a l'extension autodocstring qui fait la structure automatique avec la config qui va bien dans le projet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants