Skip to content

feat: Add auto-fetch of semester dates from GMU registrar#1

Merged
ahnafnafee merged 3 commits into
mainfrom
feat/auto-fetch-semester-dates-3601093727462650682
Apr 19, 2026
Merged

feat: Add auto-fetch of semester dates from GMU registrar#1
ahnafnafee merged 3 commits into
mainfrom
feat/auto-fetch-semester-dates-3601093727462650682

Conversation

@ahnafnafee

Copy link
Copy Markdown
Owner

Implemented dynamic web lookup of schedules for fall and spring semesters per year to better automate scheduling.

  1. Created calendar_parser.py: A new module that uses playwright to render the GMU registrar page and beautifulsoup4 / python-dateutil to parse the academic calendar tables for the start date, end date, and any breaks (skip dates) for a given semester.
  2. Added book-semester Command: Updated main.py with a new CLI command uv run main.py book-semester <fall|spring|summer> <year> that leverages the parser, automatically updates the config, and executes the booking run.
  3. Refactored main.py Execution: Extracted the core booking logic out of book_all into execute_booking_run so it can be reused. SEMESTER_START_DATE and SEMESTER_END_DATE are now properly validated within book_all instead of globally on load.
  4. Updated Documentation: Added instructions for the new command to README.md.
  5. Updated Dependencies: Added beautifulsoup4 and python-dateutil to pyproject.toml.

PR created automatically by Jules for task 3601093727462650682 started by @ahnafnafee

- Adds `calendar_parser.py` using `beautifulsoup4` and `python-dateutil` to fetch and parse start, end, and skip dates for a given semester from the GMU academic calendar.
- Refactors `main.py` by extracting the booking loop into `execute_booking_run`.
- Adds `book-semester <semester> <year>` command to dynamically construct the fetch URL, parse dates, and run the scheduling.
- Updates dependencies and `README.md`.

Co-authored-by: ahnafnafee <48362866+ahnafnafee@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits April 19, 2026 22:05
- Added `pytest` and `pytest-mock` to dependencies.
- Added `tests/test_date_utils.py` for testing date calculation functions.
- Added `tests/test_calendar_parser.py` with both unit and mocked playwright tests.
- Added `tests/test_main.py` using `click.testing.CliRunner` to test CLI command workflows.
- Added `tests/test_booker.py` as a confidence test using mocked Playwright objects.

Co-authored-by: ahnafnafee <48362866+ahnafnafee@users.noreply.github.com>
- Created `.github/workflows/ci.yml` to run `uv run pytest`.
- Configured triggers for `push` to `main` and `master`, and `pull_request` creation/updates.

Co-authored-by: ahnafnafee <48362866+ahnafnafee@users.noreply.github.com>
@ahnafnafee ahnafnafee merged commit 056719f into main Apr 19, 2026
1 check passed
@ahnafnafee ahnafnafee deleted the feat/auto-fetch-semester-dates-3601093727462650682 branch April 19, 2026 22:15
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.

1 participant