Skip to content

Commit

Permalink
maint: change user facing language from RStudio to Posit (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelizimm authored Dec 16, 2024
1 parent 59eb08c commit 0ae055e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AZURE_STORAGE_ACCOUNT_KEY=
# default auth setting, which requires authenticating
# via the gcloud cli.

# Rstudio Connect license ----
# Posit Connect license ----
RSC_LICENSE=

# Uncomment and change the variables below to specify the bucket (directory) the buckets
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Tests can be run using pytest:
```shell
pytest pins

# run all tests except those for Rstudio Connect
# run all tests except those for Posit Connect
pytest pins -m 'not fs_rsc'

# run only local filesystem backend tests
Expand All @@ -60,7 +60,7 @@ pytest pins -m 'not skip_on_github' -k 'not pins.boards.BoardManual'

There are two important details to note for testing:

* **Backends**. pins can write to backends like s3, azure, and RStudio Connect, so you
* **Backends**. pins can write to backends like s3, azure, and Posit Connect, so you
will need to set credentials to test against them.
* **Pytest Marks**. You can disable tests over a specific backend through pytest's
`-m` flag. For example...
Expand All @@ -74,7 +74,7 @@ There are two important details to note for testing:
* Modify `.env` to file in environment variables (e.g. AWS_ACCESS_KEY_ID)
* Be careful not to put any sensitive information in `.env.dev`!

### Setting up RStudio Connect tests
### Setting up Posit Connect tests

```
# Be sure to set RSC_LICENSE in .env
Expand Down
8 changes: 4 additions & 4 deletions pins/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ class BoardRsConnect(BaseBoard):

@ExtendMethodDoc
def pin_list(self):
# lists all pin content on RStudio Connect server
# lists all pin content on Posit Connect server
# we can't use fs.ls, because it will list *all content*
paged_res = self.fs.api.misc_get_applications("content_type:pin")
results = paged_res.results
Expand Down Expand Up @@ -1128,14 +1128,14 @@ def pin_version_delete(self, *args, **kwargs):
if e.args[0]["code"] != 75:
raise e

raise PinsError("RStudio Connect cannot delete the latest pin version.")
raise PinsError("Posit Connect cannot delete the latest pin version.")

@ExtendMethodDoc
def pin_versions_prune(self, *args, **kwargs):
sig = inspect.signature(super().pin_versions_prune)
if sig.bind(*args, **kwargs).arguments.get("days") is not None:
raise NotImplementedError(
"RStudio Connect board cannot prune versions using days."
"Posit Connect board cannot prune versions using days."
)
super().pin_versions_prune(*args, **kwargs)

Expand All @@ -1162,7 +1162,7 @@ def validate_pin_name(self, name) -> None:
if not get_allow_rsc_short_name() and name.count("/") != 1:
raise ValueError(
f"Invalid pin name: {name}"
"\nRStudio Connect pin names must include user name. E.g. "
"\nPosit Connect pin names must include user name. E.g. "
"\nsome_user/mtcars, for the user some_user."
)

Expand Down
2 changes: 1 addition & 1 deletion pins/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Meta:
A dictionary of additional metadata that may be specified by the user.
local:
A dictionary of additional metadata that may be added by the board, depending
on the backend used. E.g. RStudio Connect content id, url, etc..
on the backend used. E.g. Posit Connect content id, url, etc..
"""

Expand Down
2 changes: 1 addition & 1 deletion pins/rsconnect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ class _HackyConnect(RsConnectApi):
"""Handles logging in to connect, rather than using an API key.
This class allows you to create users and generate API keys on a fresh
RStudio Connect service.
Posit Connect service.
"""

def login(self, user, password):
Expand Down
8 changes: 4 additions & 4 deletions pins/rsconnect/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self, server_url, **kwargs):
self._content_name_cache = {}

def ls(self, path, details=False, **kwargs) -> Sequence[BaseEntity] | Sequence[str]:
"""List contents of Rstudio Connect Server.
"""List contents of Posit Connect Server.
Parameters
----------
Expand Down Expand Up @@ -166,7 +166,7 @@ def put(
cls_manifest=PinBundleManifest,
**kwargs,
) -> None:
"""Put a bundle onto Rstudio Connect.
"""Put a bundle onto Posit Connect.
Parameters
----------
Expand Down Expand Up @@ -227,7 +227,7 @@ def put(
return f"{rpath}/{bundle['id']}"

def open(self, path: str, mode: str = "rb", *args, **kwargs):
"""Open a file inside an RStudio Connect bundle."""
"""Open a file inside an Posit Connect bundle."""

if mode != "rb":
raise NotImplementedError()
Expand Down Expand Up @@ -256,7 +256,7 @@ def open(self, path: str, mode: str = "rb", *args, **kwargs):
return f

def get(self, rpath, lpath, recursive=False, *args, **kwargs) -> None:
"""Fetch a bundle or file from RStudio Connect."""
"""Fetch a bundle or file from Posit Connect."""
parsed = self.parse_path(rpath)

if recursive:
Expand Down
6 changes: 3 additions & 3 deletions pins/tests/test_boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def test_board_pin_versions_prune_n(board, pin_prune, pin_name, n):

@pytest.mark.parametrize("days", [1, 2])
def test_board_pin_versions_prune_days(board, pin_prune, pin_name, days):
# RStudio cannot handle days, since it involves pulling metadata
# Posit cannot handle days, since it involves pulling metadata
if board.fs.protocol == "rsc":
with pytest.raises(NotImplementedError):
board.pin_versions_prune(pin_name, days=days)
Expand All @@ -538,7 +538,7 @@ def test_board_pin_versions_prune_days(board, pin_prune, pin_name, days):

def test_board_pin_versions_prune_days_protect_most_recent(board, pin_name):
"""To address https://github.com/rstudio/pins-python/issues/297"""
# RStudio cannot handle days, since it involves pulling metadata
# Posit cannot handle days, since it involves pulling metadata
if board.fs.protocol == "rsc":
with pytest.raises(NotImplementedError):
board.pin_versions_prune(pin_name, days=5)
Expand Down Expand Up @@ -628,7 +628,7 @@ def test_board_base_pin_meta_cache_touch(tmp_path: Path, df):
assert orig_access < new_access


# RStudio Connect specific ====================================================
# Posit Connect specific ====================================================

# import fixture that builds / tearsdown user "susan"
from pins.tests.test_rsconnect_api import ( # noqa
Expand Down

0 comments on commit 0ae055e

Please sign in to comment.