Add gh_cli_jll as fallback for LinearSolveAutotune when gh CLI is not installed #687
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
This PR adds
gh_cli_jll
as a fallback option for LinearSolveAutotune.jl when the GitHub CLI (gh
) is not installed on the system, and adds automatic authentication prompts to make sharing results easier. This ensures that LinearSolveAutotune's telemetry features work seamlessly regardless of whether users have gh installed or configured.Changes
Part 1: JLL Fallback Support
gh_cli_jll
as a dependency to LinearSolveAutotune's Project.tomlget_gh_command()
function that intelligently selects between system gh and JLL-provided ghPart 2: Automatic Authentication (New!)
setup_github_authentication()
to offer interactive authentication when not configuredauto_login
parameter to control authentication promptsgh auth login
interactively if they agreeshare_results()
to use the new auto-login featureImplementation Details
gh Command Selection
The new
get_gh_command()
function follows this logic:gh
is installed on the system usingSys.which("gh")
gh_cli_jll
Auto-Authentication Flow
When
share_results()
is called:auto_login=true
(default):gh auth login
interactivelyAll existing gh CLI calls have been updated to use this wrapper:
setup_github_authentication()
- for checking auth statusupload_plots_to_gist_gh()
- for creating and managing gistscomment_on_issue_gh()
- for adding comments to issuescreate_benchmark_issue_gh()
- for creating new issuesTesting
Added test file
test_gh_fallback.jl
that verifies:get_gh_command()
function returns a valid commandTested locally with both scenarios:
Benefits
Example Usage
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]