Skip to content

Commit

Permalink
feat: cloud board_deparse (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelizimm authored Sep 27, 2022
1 parent d627844 commit 3907a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions pins/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def board_deparse(board: BaseBoard):
return f"board_rsconnect(server_url={repr(url)}{allow_pickle})"
elif prot == "file":
return f"board_folder({repr(board.board)}{allow_pickle})"
elif prot == ["s3", "s3a"]:
return f"board_s3({repr(board.board)}{allow_pickle})"
elif prot == "abfs":
return f"board_azure({repr(board.board)}{allow_pickle})"
elif prot == ("gcs", "gs"):
return f"board_gcs({repr(board.board)}{allow_pickle})"
else:
raise NotImplementedError(
f"board deparsing currently not supported for protocol: {prot}"
Expand Down
3 changes: 0 additions & 3 deletions pins/tests/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,6 @@ def test_board_constructor_folder(tmp_dir2, df):

def test_board_deparse(board):
prot = board.fs.protocol
if prot not in ["rsc", "file"]:
# not implemented for other boards
pytest.xfail()

with rm_env("CONNECT_API_KEY"):
if prot == "rsc":
Expand Down

0 comments on commit 3907a91

Please sign in to comment.