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

Add utility function to compute/check ZIM descriptions #111

Merged
merged 7 commits into from
Aug 22, 2023

Conversation

benoit74
Copy link
Collaborator

@benoit74 benoit74 commented Aug 21, 2023

Fix #110

Changes:

  • new utility function compute_descriptions in inputs.py to compute ZIM-compliant descriptions based on default and user-provided values
  • small improvements to tox configuration
  • small type hint fix of handle_user_provided_file in inputs.py

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (4f8c3cc) 100.00% compared to head (591c6dc) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #111   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines         1302      1319   +17     
=========================================
+ Hits          1302      1319   +17     
Files Changed Coverage Δ
src/zimscraperlib/constants.py 100.00% <100.00%> (ø)
src/zimscraperlib/inputs.py 100.00% <100.00%> (ø)
src/zimscraperlib/zim/metadata.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benoit74 benoit74 force-pushed the handle_descriptions branch 2 times, most recently from d4c2453 to 9fd0fff Compare August 21, 2023 14:41
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.

Works as expected ; thank you but this new Descriptions class is uncalled for. We don't want to extend the API surface which such a thing. I believe returning a tuple here is appropriate.

@benoit74 benoit74 requested a review from rgaudin August 22, 2023 07:24
@rgaudin
Copy link
Member

rgaudin commented Aug 22, 2023

@benoit74 I had this stashed. Can you review this commit?
Also please add your change to CHANGELOG and we'll be good to merge

@benoit74
Copy link
Collaborator Author

It's ok for me, and I've added my CHANGELOG.
I let you merge since I can't 😆

@rgaudin rgaudin merged commit cb01a0f into main Aug 22, 2023
15 checks passed
@rgaudin rgaudin deleted the handle_descriptions branch August 22, 2023 13:38
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.

Add support for handling description and long_description
2 participants