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

Python bootstrap #182

Merged
merged 5 commits into from
Oct 20, 2023
Merged

Python bootstrap #182

merged 5 commits into from
Oct 20, 2023

Conversation

benoit74
Copy link
Collaborator

@benoit74 benoit74 commented Oct 16, 2023

Fix #180

Changes:

  • CI has been revisited with new jobs / stages
    • ⚠️ Trusted publishing must be setup on this repo
  • pre-commit is ready to use
  • use python 3.11 + bookworm (drop support for older Python versions)
  • enhance documentation
  • update Python and JS dependencies
  • migrate to hatch instead of setuptools
  • fix issues raised by linter / type checker
    • add a load_mandatory_json util function which raises an error if file is not present or JSON is not valid (instead of returning None)
    • add a render_template util function which returns a string or returns an error (to circumvent various types returned by Jinja)
      • this might not be needed anymore once we will be able to update Jinja
  • add dummy test (before more will come hopefully)

@codecov
Copy link

codecov bot commented Oct 16, 2023

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@benoit74 benoit74 self-assigned this Oct 16, 2023
- move to hatch instead of setuptools
- Python 3.11
- upgrade dependencies
- re-arrange Dockerfile to optimize image / build time
- many small code adaptations linked to issues raised by linter or type checker
- rework CI/CD workflows
- add dummy test to open the road to many more
JQuery Chosen is deprecated and forces us to stay on JQuery 1
ogv.js has not been updated
@benoit74
Copy link
Collaborator Author

I just uploaded https://dev.library.kiwix.org/viewer#badminton_webm_2023-10/home.html which has been created by this new code.

I would like to test this on IE11 / old Safari to ensure there is no regression since I updated the webp polyfill, but I probably do not have it at home.

@benoit74 benoit74 marked this pull request as ready for review October 16, 2023 09:38
@benoit74 benoit74 requested a review from rgaudin October 16, 2023 09:39
@rgaudin
Copy link
Member

rgaudin commented Oct 18, 2023

  * ⚠️ Trusted publishing must be setup on this repo

Added

Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

We're getting a lot better at time every time 😉

contrib/reencode_low_quality.py Outdated Show resolved Hide resolved
contrib/reencode_low_quality.py Outdated Show resolved Hide resolved
contrib/video_encoding_tester.py Outdated Show resolved Hide resolved
contrib/video_encoding_tester.py Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
src/youtube2zim/scraper.py Outdated Show resolved Hide resolved
src/youtube2zim/utils.py Outdated Show resolved Hide resolved
src/youtube2zim/utils.py Outdated Show resolved Hide resolved
src/youtube2zim/utils.py Show resolved Hide resolved
src/youtube2zim/youtube.py Outdated Show resolved Hide resolved
- Simplify Youtube class to get rid of typing issues
- Small fixes
@benoit74 benoit74 requested a review from rgaudin October 19, 2023 08:28
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

I'm OK with changes but some conversations are not resolved

@benoit74
Copy link
Collaborator Author

I think I've provided feedback on remaining points.

Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

Good to merge then

@rgaudin rgaudin merged commit a0e0300 into main Oct 20, 2023
5 checks passed
@rgaudin rgaudin deleted the python_bootstrap branch October 20, 2023 08:15
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.

Adopt python bootstrap conventions
2 participants