From 3907a9166b360e483927f2fb0d77527d2a2245b5 Mon Sep 17 00:00:00 2001 From: Isabel Zimmerman <54685329+isabelizimm@users.noreply.github.com> Date: Tue, 27 Sep 2022 12:31:28 -0400 Subject: [PATCH] feat: cloud board_deparse (#157) --- pins/constructors.py | 6 ++++++ pins/tests/test_constructors.py | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pins/constructors.py b/pins/constructors.py index e0d24229..f06c2390 100644 --- a/pins/constructors.py +++ b/pins/constructors.py @@ -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}" diff --git a/pins/tests/test_constructors.py b/pins/tests/test_constructors.py index 9706b293..c4593e22 100644 --- a/pins/tests/test_constructors.py +++ b/pins/tests/test_constructors.py @@ -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":