Skip to content

[Beginner]: Remove redundant USA location checks in fetch_google_jobs #82

@ambicuity

Description

@ambicuity

For issue creators: Beginner issues sit between Good First Issues and Intermediate issues.
The contributor should need to read existing code, understand a pattern, and make a
small decision — but not design a solution from scratch.

If a step-by-step recipe would suffice, it belongs in a Good First Issue.
If it requires understanding multiple interacting systems, it belongs in Intermediate.


🐥 Beginner Friendly

Welcome! This is a Beginner Issue — a natural next step after Good First Issues.

It expects you to:

  • Read existing code and follow its patterns
  • Own a small implementation decision
  • Write or extend tests

Difficulty:

  • Basic Python (reading and writing functions) required
  • No external API experience needed
  • Familiarity with the contribution workflow expected

Important

We recommend completing at least one Good First Issue before attempting a Beginner Issue.

You must be assigned before starting — comment /assign to claim this issue.
PRs submitted without a prior assignment will be closed.

Tip

You should be comfortable with:

  • Forking, branching, committing, and opening a PR without a tutorial
  • Reading Python code you did not write and following its patterns
  • Running make test and fixing failures before pushing
  • Rebasing onto main to resolve merge conflicts
  • Looking things up on your own before asking for help

If any of that feels new, start with a
Good First Issue
first. You can always come back.

Support: The maintainer actively monitors this issue and will respond to questions.

⏱️ Typical time to complete: 2–4 hours
🧩 Difficulty: Requires investigation and testing
🎓 Best for: Contributors ready to work past copy-paste solutions


🏁 When this issue is complete, you will have:

  • ✅ Improved your knowledge of the update_jobs.py codebase
  • ✅ Owned an implementation decision
  • ✅ Written or extended tests

👾 Description of the Issue

In update_jobs.py, the fetch_google_jobs() function explicitly restricts searches to the US in the API URL:
url = f".../search/?location=United States..."

However, lines 534-536 manually check if country_code == 'US' again. While safe, it adds unnecessary nesting and cognitive load.

Before claiming:

  • Check the issue labels to see what area this touches
  • Review the CodeRabbit AI plan (posted as a comment) for a rough implementation overview
  • If this feels like too big a step, try a Good First Issue first

✅ Acceptance Criteria

  • Remove the redundancy: either thoroughly document why the second check is needed (does the API return non-US results despite the query param?), or remove the if loc.get('country_code') == 'US': block to simplify the parsing loop.
  • Ensure make test still passes.
  • PR is linked to this issue with Fixes #<number>
  • PR title follows Conventional Commits format

🏗️ Which area does this touch?

🤖 Core scraper (scripts/update_jobs.py)

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomers — welcoming entry pointhelp wantedExtra attention needed from the communitytype: enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions