Skip to content

Conversation

@cgraham-rs
Copy link
Collaborator

Adds include param support for content.get()

  • Add the param support, opting to hardcode it so it is always used
  • Add unit test
  • Add integration test
  • Also manually verified by testing locally against a live Connect instance

Replaces previous fork PR: #416

@github-actions
Copy link

github-actions bot commented Jul 8, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1901 1792 94% 0% 🟢

New Files

No new covered files...

Modified Files

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

updated for commit: c62ad32 by action🐍

@cgraham-rs cgraham-rs changed the title Extend content.get() to automatically use include param feat: extend content.get() to automatically use include param Jul 8, 2025
Copy link
Collaborator

@tdstein tdstein left a comment

Choose a reason for hiding this comment

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

Looks like the integration test is failing for some older versions of Connect.

Comment on lines 34 to 36
assert "owner" in item
assert "tags" not in item
assert "vanity_url" not in item
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, looks like this was introduced in 2024.06.0. You can key these tests off of https://github.com/posit-dev/posit-sdk-py/blob/main/integration/tests/posit/connect/__init__.py#L8

Copy link
Collaborator

Choose a reason for hiding this comment

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

Something like...

if CONNECT_VERSION >= version.parse("2024.06.0"):
        assert "owner" in item
        assert "tags" not in item
        assert "vanity_url" not in item

@cgraham-rs cgraham-rs requested a review from tdstein July 8, 2025 16:15
@cgraham-rs cgraham-rs merged commit 7a10e0d into main Jul 8, 2025
42 checks passed
@cgraham-rs cgraham-rs deleted the cgraham/extend-content-get branch July 8, 2025 17:03
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