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

Job posting spider. #82

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Job posting spider. #82

wants to merge 8 commits into from

Conversation

wRAR
Copy link
Member

@wRAR wRAR commented Nov 15, 2024

No description provided.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 95.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.85%. Comparing base (870e7ef) to head (9e0e658).

Files with missing lines Patch % Lines
zyte_spider_templates/spiders/job_posting.py 95.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
- Coverage   97.98%   97.85%   -0.14%     
==========================================
  Files          19       20       +1     
  Lines        1540     1630      +90     
==========================================
+ Hits         1509     1595      +86     
- Misses         31       35       +4     
Files with missing lines Coverage Δ
zyte_spider_templates/spiders/job_posting.py 95.55% <95.55%> (ø)

) -> Iterable[JobPosting]:
probability = job_posting.get_probability()

# TODO: convert to a configurable parameter later on after the launch
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a middleware in zyte-common-items to drop items below certain probability - what's the advantage of doing it in the spider?

Copy link
Contributor

Choose a reason for hiding this comment

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

This has been implemented this way probably mirroring the e-commerce counterpart code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, interesting - so, we're dropping custom attributes if the product probability is low; the middleware in zyte-common-items won't do it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I admit I just copied the e-commerce spider and trimmed it down.

We may want to do something differently but also we may want to extract common code, and I think we need to wait until this and articles exist in the same tree.

Copy link
Contributor

@Gallaecio Gallaecio left a comment

Choose a reason for hiding this comment

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

Looks good to me, besides the room for code-sharing with the e-commerce spider, which I am not sure how to best address and I am not sure whether or not to consider it in scope here, i.e. maybe we should handle that after we have articles and this already merged.

@wRAR
Copy link
Member Author

wRAR commented Nov 28, 2024

I was asked to not merge this yet.

@wRAR wRAR marked this pull request as draft November 28, 2024 16:34
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.

3 participants