Skip to content

[CLI] dask config set and dask config find updates.#10930

Merged
crusaderky merged 17 commits intodask:mainfrom
milesgranger:milesgranger/9746-config-set-specific-file
Feb 19, 2024
Merged

[CLI] dask config set and dask config find updates.#10930
crusaderky merged 17 commits intodask:mainfrom
milesgranger:milesgranger/9746-config-set-specific-file

Conversation

@milesgranger
Copy link
Copy Markdown
Contributor

@milesgranger milesgranger commented Feb 16, 2024

Example of dask config set new features:

❯ ls ~/.config/dask/
coiled.yaml  labextension.yaml

# default writing to ~/.config/dask/dask.yaml
❯ dask config set foo.bar False
Updated [foo.bar] to [False], config saved to /home/milesg/.config/dask/dask.yaml

# specific file location
❯ dask config set fizz.buzz True --file ~/.config/dask/custom-conf.yaml
Updated [fizz.buzz] to [True], config saved to /home/milesg/.config/dask/custom-conf.yaml

# Locate and update file that contains 'fizz.buzz' key.
❯ dask config set fizz.buzz False
Updated [fizz.buzz] to [False], config saved to /home/milesg/.config/dask/custom-conf.yaml

Example of new dask config find:

❯ ls ~/.config/dask/
coiled.yaml  labextension.yaml

# default saving to ~/.config/dask/dask.yaml
❯ dask config set fizz.buzz True
Updated [fizz.buzz] to [True], config saved to /home/milesg/.config/dask/dask.yaml

# explicit file specification
❯ dask config set fizz.buzz False --file ~/.config/dask/custom-conf.yaml
Updated [fizz.buzz] to [False], config saved to /home/milesg/.config/dask/custom-conf.yaml

# find config files specifying fizz.buzz
❯ dask config find fizz.buzz
Found [fizz.buzz] in the following files:
/home/milesg/.config/dask/custom-conf.yaml  [fizz.buzz=False]
/home/milesg/.config/dask/dask.yaml         [fizz.buzz=True]

# and when no config key is found:
❯ dask config find does.not.exist
Unable to find [does.not.exist] in any of the following paths:
/etc/dask
/home/milesg/mambaforge/envs/dask/etc/dask
/home/milesg/.config/dask

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 16, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     15 files  ±  0       15 suites  ±0   3h 18m 18s ⏱️ -20s
 13 109 tests + 54   12 178 ✅ + 54     931 💤 ±0  0 ❌ ±0 
162 313 runs  +810  145 759 ✅ +808  16 554 💤 +2  0 ❌ ±0 

Results for commit aa7e7dc. ± Comparison against base commit 7845983.

This pull request removes 8 and adds 62 tests. Note that renamed tests count towards both.
dask.tests.test_cli ‑ test_config_set_value[2-False]
dask.tests.test_cli ‑ test_config_set_value[2-True]
dask.tests.test_cli ‑ test_config_set_value[333MiB-False]
dask.tests.test_cli ‑ test_config_set_value[333MiB-True]
dask.tests.test_cli ‑ test_config_set_value[value2-False]
dask.tests.test_cli ‑ test_config_set_value[value2-True]
dask.tests.test_cli ‑ test_config_set_value[value3-False]
dask.tests.test_cli ‑ test_config_set_value[value3-True]
dask.tests.test_cli ‑ test_config_find
dask.tests.test_cli ‑ test_config_set_value[False-None-False-2]
dask.tests.test_cli ‑ test_config_set_value[False-None-False-333MiB]
dask.tests.test_cli ‑ test_config_set_value[False-None-False-None]
dask.tests.test_cli ‑ test_config_set_value[False-None-False-value2]
dask.tests.test_cli ‑ test_config_set_value[False-None-False-value3]
dask.tests.test_cli ‑ test_config_set_value[False-None-True-2]
dask.tests.test_cli ‑ test_config_set_value[False-None-True-333MiB]
dask.tests.test_cli ‑ test_config_set_value[False-None-True-None]
dask.tests.test_cli ‑ test_config_set_value[False-None-True-value2]
…

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Collaborator

@crusaderky crusaderky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor suggestions.

A tweak that I'd like to see, to prevent confusion from the output of dask config find, is to print out the value in the default files embedded in the packages, if any.
This however can be postponed to a follow-up PR.

milesgranger and others added 10 commits February 19, 2024 09:53
[skip ci]

Co-authored-by: crusaderky <crusaderky@gmail.com>
Co-authored-by: crusaderky <crusaderky@gmail.com>
Co-authored-by: crusaderky <crusaderky@gmail.com>
Co-authored-by: crusaderky <crusaderky@gmail.com>
Co-authored-by: crusaderky <crusaderky@gmail.com>
Co-authored-by: crusaderky <crusaderky@gmail.com>
Co-authored-by: crusaderky <crusaderky@gmail.com>
@milesgranger milesgranger force-pushed the milesgranger/9746-config-set-specific-file branch from def44ad to d2c19cd Compare February 19, 2024 08:53
@mrocklin
Copy link
Copy Markdown
Member

cc @ntabris

@crusaderky crusaderky merged commit 0e611de into dask:main Feb 19, 2024
@crusaderky
Copy link
Copy Markdown
Collaborator

Thank you!

@milesgranger milesgranger deleted the milesgranger/9746-config-set-specific-file branch February 20, 2024 08:19
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.

3 participants