Skip to content

Commit

Permalink
rename rerender to render
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Jul 23, 2024
1 parent 3539e8c commit f2f735b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions integration/tests/posit/connect/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_restart(self):
CONNECT_VERSION <= version.parse("2023.01.1"),
reason="Quarto not available",
)
def test_rerender(self):
def test_render(self):
# create content
content = self.client.content.create(name="example-quarto-minimal")
# create bundle
Expand All @@ -78,8 +78,8 @@ def test_rerender(self):
# deploy bundle
task = bundle.deploy()
task.wait_for()
# rerender
task = content.rerender()
# render
task = content.render()
task.wait_for()
# delete content
content.delete()
10 changes: 5 additions & 5 deletions src/posit/connect/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,18 @@ def deploy(self) -> tasks.Task:
ts = tasks.Tasks(self.config, self.session)
return ts.get(result["task_id"])

def rerender(self) -> Task:
"""Rerender the content.
def render(self) -> Task:
"""Render the content.
Submit a render request to the server for the content. After submission, the server executes an asynchronous process to rerender the content. This is useful when content is dependent on external information, such as a dataset.
Submit a render request to the server for the content. After submission, the server executes an asynchronous process to render the content. This is useful when content is dependent on external information, such as a dataset.
See Also
--------
restart
Examples
--------
>>> rerender()
>>> render()
"""
self.update()

Expand Down Expand Up @@ -210,7 +210,7 @@ def restart(self) -> None:
See Also
--------
rerender
render
Examples
--------
Expand Down
8 changes: 4 additions & 4 deletions tests/posit/connect/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def test(self):
assert count == 3


class TestRerender:
class TestRender:
@responses.activate
def test(self):
# data
Expand Down Expand Up @@ -559,7 +559,7 @@ def test(self):
content = c.content.get(guid)

# invoke
task = content.rerender()
task = content.render()

# assert
assert task is not None
Expand Down Expand Up @@ -592,7 +592,7 @@ def test_app_mode_is_other(self):

# invoke
with pytest.raises(ValueError):
content.rerender()
content.render()

@responses.activate
def test_missing_default(self):
Expand All @@ -618,7 +618,7 @@ def test_missing_default(self):
c = Client("https://connect.example.com", "12345")
content = c.content.get("f2f37341-e21d-3d80-c698-a935ad614066")
with pytest.raises(RuntimeError):
content.rerender()
content.render()


class TestRestart:
Expand Down

0 comments on commit f2f735b

Please sign in to comment.