New subcommand spack config scopes [-hips]#41455
Conversation
5b5404c to
579abf3
Compare
8878c18 to
5cadea7
Compare
5cadea7 to
aea4597
Compare
|
@tldahlgren I have (I believe) brought this PR up to date in the light of #48784. I'd be grateful if you could help me get this merged, please. |
Merge from upstream, replacing arch config scopes with spack#48784 and updating `spack config list-scopes` to match spack#41455.
tldahlgren
left a comment
There was a problem hiding this comment.
LGTM. I have a couple of questions. One is about the mutual exclusion of the options. The other is have you confirmed the outputs in the description are up-to-date?
Looking into removing mutual exclusion, and I have updated the description. |
ec20835 to
2fbcb66
Compare
|
@tldahlgren I think I've addressed your comments, but if you have any tips on how to test either the inclusion/exclusion of platform scopes, or |
2fbcb66 to
2195805
Compare
56af9d9 to
2a1bfda
Compare
|
This will need to be adjusted when platform scopes go away with #50603. |
|
Also @tldahlgren @tgamblin Any chance this can be in 1.0? I think this would complement #50603 nicely. |
* Improve help text for `spack config scopes` * New option `--show-paths|-s` to show paths where scopes have them * Add shortcut `-i` to `--include` * Add non-option argument to specify section for which to show paths * `--path` -> `--path-scopes` to avoid confusion with `--show-paths`
Fix style
5f0cf46 to
51d744a
Compare
740b1ed to
8237da1
Compare
|
@tldahlgren pending your re-review, and Gitlab getting around to running the CI pipeline, I think this is ready to go. |
|
@spackbot run pipeline |
|
I'm sorry, gitlab does not have your latest revision yet, I can't run that pipeline for you right now. One likely possibility is that your PR pipeline has been temporarily deferred, in which case, it is awaiting a Please check the gitlab commit status message to see if more information is available. Detailspr head: d590a35, gitlab commit parents: ['7bca5ed', '5f0cf46'] |
spack config scopes [--included][--path-scopes][--show-paths]spack config scopes [-hips]
* New command list-scopes [--file] [--non-platform] - Add missing `_non_platform_scopes()` - Update shell completion scripts - Scope is "defaults," not, "default." - Reorder tests to look for OS-dependent test hysteresis - Disable output suppression for pipeline failure diagnosis - Remove problematic test criteria - `defaults` apparently not available in test environment * `--file` and `--non-platform` are no longer mutually-exclusive * Add `-f` alias for `--file` option * Remove test dependence on external shell environment * Add tests for platform-specific scopes * Add test for `--file --non-platform` * Update shell completion files * Fix key error in test * Use test platform in tests * Remove faulty list-scopes assertions * New `list-scopes` option `--included` * Update command completion * Remove non-working test code * `list-scopes` -> `scopes` Per spack#41455 (comment). * Remove `--non-platform` in antipication of spack#50603 * file -> path * Rationalize options and add ability to specify sections * Improve help text for `spack config scopes` * New option `--show-paths|-s` to show paths where scopes have the * Add shortcut `-i` to `--include` * Add non-option argument to specify section for which to show paths * `--path` -> `--path-scopes` to avoid confusion with `--show-paths` * Remove unhelpful type hint * Per @tldahlgren review * Improve tests per @tldahlgren suggestions * Attempt to accommodate Windows™ * Non-option argument `<section>` implies `-s|--show-paths`
* New command list-scopes [--file] [--non-platform] - Add missing `_non_platform_scopes()` - Update shell completion scripts - Scope is "defaults," not, "default." - Reorder tests to look for OS-dependent test hysteresis - Disable output suppression for pipeline failure diagnosis - Remove problematic test criteria - `defaults` apparently not available in test environment * `--file` and `--non-platform` are no longer mutually-exclusive * Add `-f` alias for `--file` option * Remove test dependence on external shell environment * Add tests for platform-specific scopes * Add test for `--file --non-platform` * Update shell completion files * Fix key error in test * Use test platform in tests * Remove faulty list-scopes assertions * New `list-scopes` option `--included` * Update command completion * Remove non-working test code * `list-scopes` -> `scopes` Per spack#41455 (comment). * Remove `--non-platform` in antipication of spack#50603 * file -> path * Rationalize options and add ability to specify sections * Improve help text for `spack config scopes` * New option `--show-paths|-s` to show paths where scopes have the * Add shortcut `-i` to `--include` * Add non-option argument to specify section for which to show paths * `--path` -> `--path-scopes` to avoid confusion with `--show-paths` * Remove unhelpful type hint * Per @tldahlgren review * Improve tests per @tldahlgren suggestions * Attempt to accommodate Windows™ * Non-option argument `<section>` implies `-s|--show-paths`
List the scopes available in the current environment in descending priority order.
-p|--path-scopes, list only writable, file-based scopes (ignoringcommand_lineand_builtin).-i|--included, list only included scopes (specified ininclude.yamlor an environmentinclude:clause).-s|--show-paths, annotate scopes with their directory or file (with non-option argumentsection) locations when appropriate.SPACK_DISABLE_LOCAL_CONFIG=trueUseful for understanding the best scope in which to put a particular specific configuration item, or for debugging "missing" config.
Examples
MacOS:
Linux: