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

Get the whole page tree and process options to filter it #5

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

benoit74
Copy link
Contributor

@benoit74 benoit74 commented Oct 1, 2024

Changes:

  • build a tree of website pages, with links between them (parent and children, since the tree is exposed like this - a node can have only one parent)
  • filter this tree of pages based on CLI input arguments (useful at least for debug, but I see use cases for production as well, one might be interested in only one course for instance)

Nota: to be reviewed after #4 is merged

@benoit74 benoit74 self-assigned this Oct 1, 2024
@benoit74 benoit74 force-pushed the add_filtering branch 2 times, most recently from 90dec6b to 94461b9 Compare October 1, 2024 11:37
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 59.25926% with 33 lines in your changes missing coverage. Please review.

Project coverage is 47.54%. Comparing base (e7a408c) to head (35b5448).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
scraper/src/libretexts2zim/client.py 57.14% 23 Missing and 1 partial ⚠️
scraper/src/libretexts2zim/processor.py 72.72% 6 Missing ⚠️
scraper/src/libretexts2zim/entrypoint.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
+ Coverage   44.94%   47.54%   +2.60%     
==========================================
  Files           7        7              
  Lines         336      408      +72     
  Branches       32       40       +8     
==========================================
+ Hits          151      194      +43     
- Misses        184      212      +28     
- Partials        1        2       +1     

☔ 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 1, 2024 12:05
@benoit74 benoit74 requested a review from rgaudin October 1, 2024 12:05
@benoit74 benoit74 added this to the 0.1 milestone Oct 1, 2024
@rgaudin rgaudin changed the base branch from main to add_api_and_caching October 1, 2024 15:48
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 agree the filter can be handy for various reasons. We dont have to expose them on ZF at first. user-written regex often leads to frustration

scraper/src/libretexts2zim/client.py Outdated Show resolved Hide resolved
scraper/src/libretexts2zim/client.py Outdated Show resolved Hide resolved
scraper/src/libretexts2zim/client.py Outdated Show resolved Hide resolved
scraper/src/libretexts2zim/client.py Outdated Show resolved Hide resolved
scraper/src/libretexts2zim/generator.py Outdated Show resolved Hide resolved
scraper/src/libretexts2zim/generator.py Outdated Show resolved Hide resolved
@benoit74 benoit74 force-pushed the add_api_and_caching branch 4 times, most recently from 2def419 to c3bb8c5 Compare October 3, 2024 14:15
Base automatically changed from add_api_and_caching to main October 3, 2024 14:41
@benoit74 benoit74 merged commit 18d81f3 into main Oct 4, 2024
9 checks passed
@benoit74 benoit74 deleted the add_filtering branch October 4, 2024 10:17
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.

2 participants