[Beginner]: Add explicit return types to inner closures in update_jobs.py #1
Open
harryautomazione wants to merge 181 commits intomainfrom
Open
[Beginner]: Add explicit return types to inner closures in update_jobs.py #1harryautomazione wants to merge 181 commits intomainfrom
harryautomazione wants to merge 181 commits intomainfrom
Conversation
5159f51 to
38d8aa6
Compare
…icuity#161) ### Description Fixes ambicuity#79. This PR adds support for relative time strings in hours and minutes (e.g., "3 hours ago", "45 minutes ago") to the [normalize_date_string](cci:1://file:///c:/Users/adam-/Desktop/Issues%20new%20grad%20jobs/New-Grad-Jobs/scripts/update_jobs.py:1386:0-1440:20) function. These formats are commonly returned by JobSpy and LinkedIn APIs. ### Tasks - [x] Implement regex support for 'hours ago' and 'hour ago' in [normalize_date_string](cci:1://file:///c:/Users/adam-/Desktop/Issues%20new%20grad%20jobs/New-Grad-Jobs/scripts/update_jobs.py:1386:0-1440:20) - [x] Implement regex support for 'minutes ago' and 'minute ago' in [normalize_date_string](cci:1://file:///c:/Users/adam-/Desktop/Issues%20new%20grad%20jobs/New-Grad-Jobs/scripts/update_jobs.py:1386:0-1440:20) - [x] Ensure both resolve to the current date (today) - [x] Add automated tests in [tests/test_date_normalization.py](cci:7://file:///c:/Users/adam-/Desktop/Issues%20new%20grad%20jobs/New-Grad-Jobs/tests/test_date_normalization.py:0:0-0:0) - [x] Verify all tests pass locally using `pytest` ### Verification Results - **Automated Tests**: Ran `py -m pytest tests/test_date_normalization.py` and all cases passed (including the new ones). - **Correctness**: Confirmed che le regex gestiscono correttamente sia le forme plurali ("hours") che singolari ("hour"). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Date parsing now recognizes relative times like "3 hours ago" and "45 minutes ago", treating recent posts as today (improves LinkedIn/JobSpy compatibility). * **Documentation** * Updated release notes and RSS feed entries (added/adjusted job listings and timestamps). * **Tests** * Added tests confirming recent relative-time postings normalize to today. * **Chores** * Updated health and market snapshot metrics. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: riteshr19 <riteshrana36@gmail.com>
## Summary - fix watchdog gh CLI issue creation to use explicit repo context - stop PR policy workflows from crashing on fork comment 403s - ensure generated health.json writes with a trailing newline ## Validation - pre-commit run --files on changed workflow and repo files - verified gh issue list --repo works outside a git checkout - rebuilt this branch on top of the latest origin/main
## Linked Issue Fixes ambicuity#176 ## Summary Added a sticky active-filter summary bar above the job results that dynamically displays currently selected filters (search, category, tier, country, state) as interactive chips. Users can now remove individual filters or clear all of them with a single click, keeping the state fully synced with the URL parameters. ## Changes Made | File | What changed | |------|-------------| | [docs/index.html](cci:7://file:///d:/OSS%20Contributions/docs/index.html:0:0-0:0) | Added the `#active-filters-summary` container structure above the jobs list. | | [docs/styles.css](cci:7://file:///d:/OSS%20Contributions/docs/styles.css:0:0-0:0) | Added styling for the sticky summary bar, glassmorphism effect, filter chips, and clear actions. | | [docs/app.js](cci:7://file:///d:/OSS%20Contributions/docs/app.js:0:0-0:0) | Implemented [renderActiveFilters()](cci:1://file:///d:/OSS%20Contributions/docs/app.js:628:0-678:1) to generate chips. Wired up individual and bulk removal events, ensuring UI and URL remain synced. | ## Testing - [x] Tested locally in browser (verifying filters sync, UI renders correctly, and URL params update). - [ ] `python -m py_compile scripts/update_jobs.py` — no errors - [ ] `make test` — all tests pass - [ ] `pre-commit run --all-files` — clean ## Notes for Reviewer The active filter bar uses `position: sticky; top: 80px;` to remain visible just beneath the header as the user scrolls through the job results. It only appears when at least one filter (or search term) is active. Everything uses the existing CSS variables for dark/light mode support. --- > ** What is checked automatically by CI — you do not need to self-certify these:** > > | Check | Enforced by | > |-------|-------------| > | PR title follows Conventional Commits | `bot-pr-title-check` — auto-rejects on open | > | PR links to an assigned issue | `bot-linked-issue-enforcer` + `bot-assignment-check` | > | [README.md](cci:7://file:///d:/OSS%20Contributions/New-Grad-Jobs-main/README.md:0:0-0:0) and [jobs.json](cci:7://file:///d:/OSS%20Contributions/New-Grad-Jobs-main/jobs.json:0:0-0:0) not manually edited | `bot-pr-protected-files` — hard CI failure | > | Branch is up to date with `main` | Branch protection — merge blocked if behind | > | Python syntax and lint (E9/F-class) | `ci.yml` — required status check | > | All unit tests pass | `tests.yml` — required status check | > | Pre-commit hooks (secrets, YAML, whitespace) | `pre-commit.yml` — required status check | > | Security scan (CodeQL + Trivy) | `codeql.yml` + `trivy.yml` | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a visual active filters summary displaying all currently applied filters in an easy-to-see format. * Users can remove individual filters by clicking on interactive filter chips. * Introduced "Clear All" button to quickly reset all applied filters at once. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: riteshr19 <riteshrana36@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ambicuity#59. [Beginner]: Add explicit return types to inner closures in update_jobs.py
Description
This PR addresses issue ambicuity#59 by adding explicit Python return type hints to nested worker functions (inner closures) within scripts/update_jobs.py. This improves static analysis coverage and code readability.
Changes Made
-> List[Dict[str, Any]]return type hints to:Verification Results
py -m pre_commit run --all-files(All hooks PASSED ✅).python -m py_compile.