Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add solver config to control default the solver and displayed output #1060

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

dcookspi
Copy link
Collaborator

This adds solver configuration and options to set the default solver and default solver to display solver output from. This will let sites configure the solver/s they want, and let individual commands override that when required.

These changes add:

  • --solver-to-show <SOLVER> argument to commands with Solver cli flags
  • solver_to_run to the Solver section of the spk config file
  • solver_to_show to the Solver section of the spk config file
  • environment variable defaults to --solver-to-run and --solver-to-show. They use SPK_SOLVER__SOLVER_TO_RUN and SPK_SOLVER__SOLVER_TO_SHOW respectively to line up with the spk config file
  • constants for the names used on the command line for the various solvers

Examples:

# Run all (both) the solvers and show the cli solver's output - this is the built-in default
spk explain python --solver-to-run all --solver-to-show cli

# Run all (both) the solvers and show the impossible checks solver's output
spk explain python --solver-to-run all --solver-to-show checks

# Run only the impossible checks solver and show its output
spk explain python --solver-to-run checks 

# Run all (both) the solvers and show the impossible checks solver's output
env SPK_SOLVER__SOLVER_TO_SHOW=checks spk explain spwidgets 

# Run only the cli solver and show its output
env SPK_SOLVER__SOLVER_TO_RUN=cli spk explain spwidgets 

@dcookspi dcookspi added enhancement New feature or request SPI AOI Area of interest for SPI SPI-0.41 labels Jun 26, 2024
@dcookspi dcookspi self-assigned this Jun 26, 2024
@dcookspi dcookspi requested a review from jrray June 26, 2024 01:40
…TO_RUN and SPK_SOLVER_TO_SHOW for controlling the solves

Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Updates config related env vars, and adds constants for the solver names

Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
@dcookspi dcookspi force-pushed the add-solver-to-show-controls branch from c22a418 to b63cc11 Compare July 4, 2024 19:51
@dcookspi dcookspi merged commit e25d2bd into main Aug 6, 2024
7 checks passed
@dcookspi dcookspi deleted the add-solver-to-show-controls branch August 6, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SPI AOI Area of interest for SPI SPI-0.41
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants