tools/mpy-triage: Add database layer and GitHub API wrapper#32
Draft
andrewleech wants to merge 4 commits intoreview/mpy-github-triagefrom
Draft
tools/mpy-triage: Add database layer and GitHub API wrapper#32andrewleech wants to merge 4 commits intoreview/mpy-github-triagefrom
andrewleech wants to merge 4 commits intoreview/mpy-github-triagefrom
Conversation
Remove the VS 2017 build matrix entry and the Chocolatey installation step. Use the v142 toolset pre-installed on windows-2022 runners for VS 2019 testing, and explicitly set PlatformToolset for both VS 2019 (v142) and VS 2022 (v143) builds. Pin the runner to windows-2022 for the MSVC build matrix to ensure the v142 toolset remains available.
setup-msbuild requires a matching VS installation, not just a toolset component. Use VS 2022's MSBuild (vs-version [17,18)) for both v142 and v143 builds — the PlatformToolset property selects the compiler.
Implements db.py (SQLite connection, schema init, sync state, sqlite-vec loading) and gh.py (gh CLI wrapper with pagination multiparse, rate-limit backoff, search, and diff fetching). Includes tests for both modules. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## review/mpy-github-triage #32 +/- ##
=========================================================
Coverage 98.46% 98.46%
=========================================================
Files 176 176
Lines 22784 22784
=========================================================
Hits 22435 22435
Misses 349 349 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Code size report: |
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.
Summary
Adds the foundational database and GitHub API modules for mpy-triage, a CLI tool for detecting duplicate/related MicroPython issues and PRs using semantic search.
db.py: SQLite connection management with WAL mode, schema initialization, sync state key-value store, and sqlite-vec extension loading.gh.py:ghCLI wrapper with paginated response parsing (handles concatenated JSON arrays), rate-limit detection with sleep-until-reset backoff, search queries with date range filtering, and PR diff fetching.Testing
uv run pytest tests/test_db.py tests/test_gh.py -v- 27 tests pass.uv run ruff check src/ tests/- clean.uv run mpy-triage --help- works.Generative AI
I used generative AI tools when creating this PR, but a human has checked the
code and is responsible for the code and the description above.