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

Rename scraper from libretexts to mindtouch and make it as generic as possible #35

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

benoit74
Copy link
Contributor

@benoit74 benoit74 commented Oct 24, 2024

Fix #6

Changes:

  • rename everything that needs to be
  • drop the --library-slug argument which made sense only in libretexts.org context
  • add more mandatory CLI argument now that scraper is generic (no more meaningful default value possible)
  • fix Dockerfile casing
  • adapt to new Dockerfile convention on LABEL label=key instead of LABEL label key
  • add missing openzim.toml in Dockerfile at proper stage
  • add more tests around files present in the ZIM
  • add missing .pre-commit-config.yaml (how did we missed that?)
  • remove double checks for metadata length (no need to do it in scraper, already done in zimscraperlib)
  • simplified placeholder handling (drop metadata class) since we have very few placeholder now (only name and period, used to compute the filename)

@benoit74 benoit74 self-assigned this Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 44.28%. Comparing base (018982a) to head (5381b22).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
scraper/src/mindtouch2zim/client.py 31.57% 13 Missing ⚠️
scraper/src/mindtouch2zim/processor.py 40.00% 6 Missing ⚠️
scraper/src/mindtouch2zim/__main__.py 0.00% 1 Missing ⚠️
scraper/src/mindtouch2zim/entrypoint.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
- Coverage   45.69%   44.28%   -1.41%     
==========================================
  Files           8        8              
  Lines         499      481      -18     
  Branches       53       51       -2     
==========================================
- Hits          228      213      -15     
+ Misses        269      266       -3     
  Partials        2        2              

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

@benoit74 benoit74 marked this pull request as ready for review October 24, 2024 09:27
@benoit74 benoit74 requested a review from rgaudin October 24, 2024 09:36
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.

LGTM

.github/workflows/PublishDockerDevImage.yaml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
scraper/src/mindtouch2zim/client.py Outdated Show resolved Hide resolved
@benoit74
Copy link
Contributor Author

Thank you!

@benoit74 benoit74 merged commit 6540ad9 into main Oct 24, 2024
10 checks passed
@benoit74 benoit74 deleted the move_to_mindtouch branch October 24, 2024 14:54
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.

Rename the scraper / repo
2 participants