Fix broken tests and add GitHub Actions CI#36
Merged
ashleyzhang01 merged 4 commits intomainfrom May 1, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes failing tests and introduces a GitHub Actions CI workflow to run linting and tests for both the offline and online/etl subprojects.
Changes:
- Refactors/cleans up test imports and a few unused variables to resolve test failures and Ruff violations.
- Replaces explicit
CancelledErrorhandling withcontextlib.suppress(...)in async progress tasks. - Adds CI workflow running
ruff check+pytestforofflineandonline/etl, and addspytestto offline dev dependencies.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| online/etl/tests/test_volumes.py | Import normalization / Ruff-isort compliance in tests. |
| online/etl/tests/test_schemas.py | Import normalization / Ruff-isort compliance in tests. |
| online/etl/tests/test_repository.py | Import split for Ruff-isort compliance. |
| online/etl/tests/test_quality_signals.py | Import normalization / Ruff-isort compliance in tests. |
| online/etl/tests/test_pr_author_extraction.py | Import normalization / Ruff-isort compliance in tests. |
| online/etl/tests/test_label.py | Removes unused pytest import and normalizes imports. |
| online/etl/tests/test_discover.py | Import normalization / Ruff-isort compliance in tests. |
| online/etl/tests/test_connection.py | Import normalization and fixes unused variable warnings in assertions. |
| online/etl/tests/test_backfill_pr_author.py | Import split for Ruff-isort compliance. |
| online/etl/tests/test_assemble.py | Import normalization and string literal quote normalization. |
| online/etl/pipeline/enrich.py | Removes unused exception binding in TokenInvalidError handler. |
| online/etl/pipeline/backfill_pr_author.py | Uses contextlib.suppress for CancelledError; import cleanup. |
| online/etl/main.py | Uses contextlib.suppress for CancelledError; minor constant → variable rename in batching logic. |
| offline/tests/test_step3.py | Updates dummy CLI args namespace to match new arguments. |
| offline/tests/test_step1.py | Updates test stubs/fixtures to match updated API expectations (e.g., user field, extra arg). |
| offline/tests/test_step0.py | Adds stub for newly expected make_repo_public method in tests. |
| offline/pyproject.toml | Adds pytest to dev dependency group. |
| offline/code_review_benchmark/step_speed_analysis.py | Refactors imports/formatting and adjusts timestamp parsing timezone handling. |
| offline/code_review_benchmark/step2_5_dedup_candidates.py | Uses zip(..., strict=True) and minor output formatting tweak. |
| .github/workflows/tests.yml | Adds CI workflow to run Ruff + pytest for both subprojects using uv. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
173
to
179
| def _parse_dt(s: str | None) -> datetime | None: | ||
| if not s: | ||
| return None | ||
| for fmt in ("%Y-%m-%dT%H:%M:%SZ", "%Y-%m-%dT%H:%M:%S+00:00", "%Y-%m-%dT%H:%M:%S.%fZ"): | ||
| try: | ||
| return datetime.strptime(s, fmt).replace(tzinfo=timezone.utc) | ||
| return datetime.strptime(s, fmt).replace(tzinfo=UTC) | ||
| except ValueError: |
| working-directory: online/etl | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: astral-sh/setup-uv@v5 |
zverianskii
approved these changes
May 1, 2026
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.
Uh oh!
There was an error while loading. Please reload this page.