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 better integration of settings plugin hook into conda config #13661

Open
2 tasks done
travishathaway opened this issue Mar 6, 2024 · 3 comments
Open
2 tasks done
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release source::anaconda created by members of Anaconda, Inc. spike issue is for doing research work or prototyping; outcome is optional and not required type::feature request for a new feature or capability

Comments

@travishathaway
Copy link
Contributor

travishathaway commented Mar 6, 2024

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

The newly created settings plugin hook allows plugin authors to create their own settings which will then appear alongside other conda settings on the context object under "plugins" (e.g. conda.plugins.conda_plugin_setting).

On the initial implementation, integration into conda config was overlooked. See:

for more information.

Why is this needed?

In order to provide a better user experience, we want it to be possible to set and display settings via the conda config command.

What should happen?

Scenario one: read configuration

If I have the following defined as settings:

plugins:
  conda_plugin_setting: "some value"

I want to be able to run:

conda config --show

and this value in the output

Scenario two: write a setting

If a plugin has defined the setting conda_plugin_setting as a string parameter, I should be able to run the following command to set it:

conda config --set plugins_conda_plugin_setting "some value"

If a plugin has defined the setting conda_plugin_setting as a list of strings, I should be able to run the following command to set it:

conda config --set plugins_conda_plugin_setting "item_one,item_two,item_three"

Scenario three: retrieving the description

If a plugin has defined the setting conda_plugin_setting and has added a description for it, I should be able to read it by running the following command:

conda config --describe plugins_conda_plugin_setting

If a plugin has defined the setting conda_plugin_setting and has added a description for it, I should be able to see it listed when I run:

conda config --describe
@travishathaway travishathaway added type::feature request for a new feature or capability source::anaconda created by members of Anaconda, Inc. labels Mar 6, 2024
@jezdez
Copy link
Member

jezdez commented Mar 6, 2024

I would add that there is also the discussion we had about a dedicated conda plugins subcommand that might be better suited for the plugin sepcific settings, e.g. conda plugins config --set spam eggs

@jezdez
Copy link
Member

jezdez commented Mar 6, 2024

See #11786 (comment) for the mention, I think we have a user story in one of the Google docs as well

@kenodegard
Copy link
Contributor

Beware the history of conda env when thinking about conda plugins

@kenodegard kenodegard added backlog issue has been triaged but has not been earmarked for any upcoming release spike issue is for doing research work or prototyping; outcome is optional and not required labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release source::anaconda created by members of Anaconda, Inc. spike issue is for doing research work or prototyping; outcome is optional and not required type::feature request for a new feature or capability
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants