openzim / gutenberg

Scraper for downloading the entire ebooks repository of project Gutenberg
https://download.kiwix.org/zim/gutenberg
GNU General Public License v3.0
126 stars 37 forks source link

Updated the Codebase to use pathlib instead of using os.path and path.py #208

Closed MUCCHU closed 5 months ago

MUCCHU commented 6 months ago

Fix #195

Make sure consistency is maintained by using pathlib.Path to handle all file operations.

After the changes I ran the docker container which worked perfectly fine.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 89 lines in your changes are missing coverage. Please review.

Comparison is base (2fd98ed) 0.76% compared to head (31eed63) 0.77%.

Files Patch % Lines
src/gutenberg2zim/export.py 0.00% 31 Missing :warning:
src/gutenberg2zim/download.py 0.00% 25 Missing :warning:
src/gutenberg2zim/urls.py 0.00% 20 Missing :warning:
src/gutenberg2zim/rdf.py 0.00% 4 Missing :warning:
src/gutenberg2zim/utils.py 0.00% 3 Missing :warning:
src/gutenberg2zim/entrypoint.py 0.00% 2 Missing :warning:
src/gutenberg2zim/s3.py 0.00% 2 Missing :warning:
src/gutenberg2zim/zim.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #208 +/- ## ===================================== Coverage 0.76% 0.77% ===================================== Files 15 15 Lines 1559 1556 -3 Branches 336 336 ===================================== Hits 12 12 + Misses 1547 1544 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

benoit74 commented 6 months ago

Nota: black formatting is not OK as well ; you should probably:

MUCCHU commented 6 months ago

Thank you for the feedback. I made all the changes you requested and also ensured that the formatting is perfect by enabling pre-commit. Kindly review the PR.

benoit74 commented 6 months ago

I really like what you did, good job. Just give me some time to start an end-to-end test and I will come back to you.

benoit74 commented 6 months ago

Still did not had time to start a test run, sorry about that.

benoit74 commented 5 months ago

Closed for inactivity, feel free to reopen if you have new changes to submit.