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

Migrate anaconda-client to become a plugin of anaconda-cli-base #715

Closed

Conversation

mattkram
Copy link
Collaborator

@mattkram mattkram commented Aug 5, 2024

Summary

As part of extending our CLI, we have been migrating to a plugin-based system. This PR removes the anaconda entrypoint from anaconda-client, which will be located instead in anaconda-cli-base. In order to maintain backwards compatibility for all subcommands, we include logic to mount all existing subcommands from anaconda-client as top-level subcommands. We also include all subcommands under the namespace anaconda org, e.g. anaconda org upload.

It should be noted that this backwards-compatibility code has been copied from anaconda-cloud-cli. It was originally placed there to minimize changes to the anaconda-client codebase, but this PR moves it to the more appropriate place.

User Experience

When these changes are installed, we don't intend any breaking behavior for the user. The changes are generally dependent on the presence of other Anaconda CLI plugins.

In the case that another plugin is installed (like anaconda-cloud-auth), the following changes may be observed:

  • All existing anaconda-client subcommands are available
  • All existing anaconda-client subcommands are ALSO available with the org prefix, e.g. anaconda org upload. It is recommended to adopt this format, as it is more explicit.
  • The help text will be modified (i.e. type anaconda). Not all anaconda-client subcommands will be shown.
  • The anaconda notebooks subcommand will explicitly be listed as deprecated in the CLI help.

Caveats

When this PR is released, it must include a properly-pinned dependency on anaconda-cli-base such that we are sure the entrypoint is defined. Separately, there must be a run_constrained dependency in the recipe for anaconda-cli-base such that older versions of anaconda-client cannot be installed alongside new versions of anaconda-cli-base (since then both packages would define the same entrypoint.

@mattkram mattkram marked this pull request as ready for review August 26, 2024 21:52
@mattkram
Copy link
Collaborator Author

I believe the test failures are because anaconda-project does not support Python 3.12. We should be okay merging without those passing.

Since anaconda.org has deprecated support for projects, I suspect this dependency can be removed.

.github/workflows/check-master.yml Outdated Show resolved Hide resolved
.github/workflows/check-master.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
conda.recipe/meta.yaml Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
@mattkram mattkram force-pushed the feat/anaconda-cli-base-plugin branch from e4c33e9 to dd38533 Compare August 28, 2024 17:34
@mattkram mattkram force-pushed the feat/anaconda-cli-base-plugin branch from 756eb63 to dd38dd2 Compare August 28, 2024 18:29
setup.py Outdated Show resolved Hide resolved
@mattkram mattkram closed this Aug 28, 2024
@mattkram mattkram deleted the feat/anaconda-cli-base-plugin branch August 28, 2024 19:42
@mattkram mattkram restored the feat/anaconda-cli-base-plugin branch August 28, 2024 19:44
@mattkram mattkram deleted the feat/anaconda-cli-base-plugin branch August 28, 2024 19:46
@mattkram mattkram restored the feat/anaconda-cli-base-plugin branch August 28, 2024 19:46
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