Skip to content

Conversation

@tdstein
Copy link
Collaborator

@tdstein tdstein commented Dec 12, 2024

Adds environment support.

Adds environment support using base implementations at runtime and implicit type-checking for static typing.

Closes #307

@github-actions
Copy link

github-actions bot commented Dec 12, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2170 2020 93% 0% 🟢

New Files

File Coverage Status
src/posit/connect/environments.py 0% 🟢
TOTAL 0% 🟢

Modified Files

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

updated for commit: f6c756a by action🐍

@tdstein tdstein changed the title feat: adds environments feat: add environments Dec 12, 2024
Comment on lines +308 to +311
@property
@requires(version="2023.05.0")
def environments(self) -> Environments:
return _ResourceSequence(self._ctx, "v1/environments")
Copy link
Collaborator Author

@tdstein tdstein Dec 12, 2024

Choose a reason for hiding this comment

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

This is where the implicit type-checking occurs. The method signature returns the Environments protocol while the implementation returns _ResourceSequence.

@tdstein tdstein mentioned this pull request Dec 12, 2024
@tdstein tdstein marked this pull request as ready for review December 12, 2024 18:49
@tdstein tdstein merged commit 7efac29 into main Dec 13, 2024
34 checks passed
@tdstein tdstein deleted the tdstein/307-environments-with-protocols branch December 13, 2024 16:00
@tdstein tdstein mentioned this pull request Dec 13, 2024
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.

Add Environments API endpoint bindings

3 participants