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

[ENH] - Move end user python API interactions into the package #853

Open
kcpevey opened this issue Jul 19, 2024 · 3 comments
Open

[ENH] - Move end user python API interactions into the package #853

kcpevey opened this issue Jul 19, 2024 · 3 comments
Labels

Comments

@kcpevey
Copy link
Contributor

kcpevey commented Jul 19, 2024

Feature description

I've gotten many requests for interacting with conda-store on Nebari via an API. I think everything that I'd find useful is contained inside of https://github.com/conda-incubator/conda-store/blob/524a1cc7313f3eca0d63d096ffc478df344b88ea/conda-store-server/tests/user_journeys/utils/api_utils.py . However, since its not part of the package, I can't use it directly.

I propose to move this little API into the package itself so that end users can make use of it.

Value and/or benefit

This would add the ability to programmatically interact with conda-store without rewrite REST interactions all the time.

Anything else?

No response

@trallard
Copy link
Collaborator

This is part of a broader discussion about providing complete symmetry between conda-store variants, API, CLI, etc. Of course that would be a larger lift/effort, but it is the only way to address also feedback raised through the user research studies. And I would certainly prefer this over ad hoc addition of methods.

I think everything that I'd find useful is contained inside of 524a1cc/conda-store-server/tests/user_journeys/utils/api_utils.py

Can you provide more concrete examples of what this programmatic access means/would look like?

@trallard trallard added the needs: discussion 💬 This item needs team-level discussion before scoping label Jul 23, 2024
@kcpevey
Copy link
Contributor Author

kcpevey commented Jul 23, 2024

I was pointed to the api_utils.py when I asked about a python api, but I didn't realize that a python api already existed - https://github.com/conda-incubator/conda-store/blob/main/conda-store/conda_store/api.py . I understand that we don't encourage usage of this api until the api/cli symmetry effort is complete. That feels like a separate issue, and its fine to close this in favor of another, more appropriate issue.

To answer your question:

Can you provide more concrete examples of what this programmatic access means/would look like?

As a software engineer who maintains many environments for other team members (on nebari), I often have to push updates to all my environments. While conda-store has its own "version history", software projects generally keep their history in git repositories. Typical usecases of conda-store for me are to have a git repo which holds an environment file (which is used to run ci tests). Any changes to my environment file in the repo then have to be hand-copied over to conda-store through the UI and rebuilt. I'd love to build up some code which could do this process for me.

For the conda-store bit, this covers the vast majority:

api = API(base_url=base_url, token=token)
# create environment 
api.create_environment(namespace, specification_path)

If there is a current, recommended approach to this, I'd love to learn about it.

@peytondmurray peytondmurray removed the needs: discussion 💬 This item needs team-level discussion before scoping label Oct 25, 2024
@peytondmurray
Copy link
Contributor

Currently we are working on a number of user workflows. The REST API and python API will change to meet these user needs moving. Let's revisit this once this effort starts getting pushed forward.

@peytondmurray peytondmurray moved this from New 🚦 to Follow up 📤 in conda-store 🐍 Oct 25, 2024
@kcpevey kcpevey changed the title [ENH] - Move end user API interactions into the package [ENH] - Move end user python API interactions into the package Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Follow up 📤
Development

No branches or pull requests

3 participants