Skip to content

Conversation

@charleswoerner-wayve
Copy link

@charleswoerner-wayve charleswoerner-wayve commented Dec 30, 2024

Add support for new MultiPick extension command. Add support for memoization of shellCommands so that the computation can be reused (and remain stable) across multiple references within the same command evaluation scope. Internally, I refactored to extract a Resolver class within the UserCommandsController to enable command-scoped caching to avoid cache conflicts between simultaneously running async functions. Additionally, MultiPick selections are persisted across command invocations.

As implied by the documentation changes, the use case here is to support the selection of a subset of PyTest tests invoked via a runnable PyTest target under Bazel. I wanted to be able to invoke a runnable PyTest target in --collect-only mode, filter out the list of PyTest cases, present them to the user as a multi-pick selector, then take the selected items and append them to a Bazel PyTest test command to run the selected tests. Options such as --no-cov have to be able to be toggled in order to disable coverage thresholds when running just a few tests.

This addresses the feature request I created in #30

@charleswoerner-wayve charleswoerner-wayve force-pushed the topic/multi-pick-and-memoization branch from fe1b999 to 6d7d036 Compare December 30, 2024 22:55
document py_test usage
refactor to extract resolver class to support command-scoped cache

fix documentation about pytest usage in README
@charleswoerner-wayve charleswoerner-wayve force-pushed the topic/multi-pick-and-memoization branch from b8b4eee to 14961c6 Compare January 1, 2025 03:01
@charleswoerner-wayve
Copy link
Author

@jabbottn Hi Josh, I worked out an implementation for a few proposed enhancements to better support some of the more complex setups we envisioned at work.

@cwoerner
Copy link

@jabbottn Thoughts about merging this multi-pick feature?

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.

2 participants