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

Shell Plugin Prototypes #12721

Open
wants to merge 20 commits into
base: shell-plugins
Choose a base branch
from
Open

Conversation

kalawac
Copy link
Contributor

@kalawac kalawac commented May 26, 2023

Description

Prototype plugins for spike issue #12621. The prototypes demonstrate three proposed architectural methods for plugins that handle, at minimum, conda's activate, deactivate and reactivate processes. See also the related gist with discussion points and architectural considerations for each prototype scenario.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 26, 2023
@beeankha beeankha added the source::anaconda created by members of Anaconda, Inc. label May 26, 2023
kalawac added 10 commits May 31, 2023 06:45
Updated CLI argument parsing:
* Refactored original parsing logic to make `activate`, `deactivate` and `reactivate` sub-parsers
* created new _parse_and_set_args method that will override method in parent class
* updated conda shell forwarding function for POSIX shells to handle evaluation of statements from plugin that uses current conda logic to carry out activation/deactivation processes
---------

Signed-off-by: Katherine Abrikian <kalawac@users.noreply.github.com>
Final commit was missing from previous pull request.

Signed-off-by: Katherine Abrikian <kalawac@users.noreply.github.com>
Updated CLI argument parsing:
* Refactored original parsing logic to make `activate`, `deactivate` and `reactivate` sub-parsers
* created new _parse_and_set_args method that will override method in parent class
* updated conda shell forwarding function for POSIX shells to handle evaluation of statements from plugin that uses current conda logic to carry out activation/deactivation processes
---------

Signed-off-by: Katherine Abrikian <kalawac@users.noreply.github.com>
Final commit was missing from previous pull request.

Signed-off-by: Katherine Abrikian <kalawac@users.noreply.github.com>
@kalawac kalawac marked this pull request as ready for review June 7, 2023 02:32
@kalawac kalawac requested a review from a team as a code owner June 7, 2023 02:32
conda/plugins/manager.py Outdated Show resolved Hide resolved
conda/plugins/shells/posix/posix_activate.py Outdated Show resolved Hide resolved
Comment on lines 218 to 224
@hookimpl
def conda_shell_plugins():
yield CondaShellPlugins(
name="posix_plugin_current_logic",
summary="Plugin for POSIX shells: handles conda activate, deactivate, and reactivate",
activator=PosixPluginActivator,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

these plugins for the conda_shell_plugins hook aren't used anywhere (yet)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the gist indicates that the hook is just a placeholder for the moment. Eventually, there'll be some logic specific to the shell plugins there. I thought it was important to indicate that there probably would be a hook of some kind.

conda/plugins/shells/posix/posix_activate.py Show resolved Hide resolved
conda/plugins/shells/posix/posix_os_exec_shell.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA source::anaconda created by members of Anaconda, Inc.
Projects
Status: 🏗️ In Progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants