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

feat!: accept positional arguments when creating client #231

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Jul 1, 2024

Modifies the Client initialization definition to optional accept the URL and API key as position arguments.

BREAKING CHANGE: Swaps the api_key and url argument positions in Client init.

Copy link

github-actions bot commented Jul 1, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1116 1047 94% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/client.py 99% 🟢
TOTAL 99% 🟢

updated for commit: 0551a3d by action🐍

@tdstein
Copy link
Collaborator Author

tdstein commented Jul 10, 2024

This change simplifies workflows in which CONNECT_API_KEY is provided via an environment variable, but the server URL is hardcoded. I believe this is the most common use case since most users do not have multiple Connect servers.

Copy link
Collaborator

@nealrichardson nealrichardson left a comment

Choose a reason for hiding this comment

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

Makes sense to me that server would be the first arg and api key after.

Copy link
Collaborator

@toph-allen toph-allen left a comment

Choose a reason for hiding this comment

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

Yep

src/posit/connect/client.py Outdated Show resolved Hide resolved
src/posit/connect/client.py Outdated Show resolved Hide resolved
@tdstein tdstein merged commit 114ecb7 into main Jul 10, 2024
29 checks passed
@tdstein tdstein deleted the tdstein/better-credentials-flow branch July 10, 2024 18:41
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.

3 participants