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

Draft: Added Credentials Manager #433

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

oboforty
Copy link
Contributor

@oboforty oboforty commented Jun 14, 2023

  • Added a class that handles finding credentials. This is only used for unit tests, but my intention for the future is to use it for solvebio cli, solvebio.main.py, and for solvebio.SolveClient, solvebio.login in case someone uses this as an SDK.

Credentials are discovered in the following priority:

  1. Direct parameters (when using solvebio.SolveClient() or solvebio.login() from the SDK)

    This way is naturally NOT supported for the following setups:

    • Solvebio python entry point (solvebio as a global command)
    • Running solvebio as package (main.py)
    • Solvebio unit tests
  2. Environment variables

    • SOLVEBIO_API_HOST
    • SOLVEBIO_ACCESS_TOKEN
    • SOLVEBIO_API_KEY
  3. System credentials file - can be found in:

    • Nix: ~/.solvebio/credentials
    • Windows: %USERPROFILE%/_solvebio/credentials

@oboforty oboforty force-pushed the EDPDEV-567-fix-unit-tests branch 2 times, most recently from b76d0ad to 1df977f Compare June 15, 2023 14:26
@oboforty oboforty closed this Jun 19, 2023
@oboforty oboforty reopened this Jun 19, 2023
@oboforty oboforty changed the title Removed nosetests dependency and added new credential flow Draft: Added Credentials Manager Jun 19, 2023
@oboforty
Copy link
Contributor Author

Let's leave this PR hanging for the time being and return to it after the backend tech debts have been dealt with.

This PR will be dedicated for the Creds manager, that follows a similar flow to boto3 in finding the credentials (which was probably the intention already originally for solvebio client). The nosetest & py3.10 fix is added to a separate PR.

@davecap
Copy link
Member

davecap commented Jul 4, 2023

FYI we have a new way of handling credentials in the new beta R client, so we can revisit this and re-align it to that new convention.

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