Exemple #1
0
 def testGetDirectory(self):
     dir = io_util.get_directory(IOUtilTest.io_test_dir)
     self.assertTrue(dir)
     Path.rmdir(Path(IOUtilTest.io_test_dir))
     self.assertFalse(os.path.exists(IOUtilTest.io_test_dir))
     io_util.get_directory(IOUtilTest.io_test_dir)
     self.assertTrue(os.path.exists(IOUtilTest.io_test_dir))
Exemple #2
0
def get_arkouda_client_directory() -> str:
    """
    A platform-independent means of finding path to
    the current user's .arkouda directory where artifacts
    such as server access tokens are stored. 

    The default implementation is to place the .arkouda 
    directory in the current user's home directory. The
    default can be overridden by seting the ARKOUDA_HOME
    environment variable.

    :return: string corresponding to .arkouda directory path
    :rtype: str
    """
    arkouda_parent_dir = os.getenv('ARKOUDA_CLIENT_DIRECTORY')
    if not arkouda_parent_dir:
        arkouda_parent_dir = get_home_directory()
    return io_util.get_directory('{}{}.arkouda'.\
                format(arkouda_parent_dir,os.sep)).absolute()
Exemple #3
0
def get_arkouda_client_directory() -> Path:
    """
    A platform-independent means of finding path to
    the current user's .arkouda directory where artifacts
    such as server access tokens are stored. 

    Returns
    -------
    Path
        Path corresponding to the user's .arkouda directory path

    Notes
    -----
    The default implementation is to place the .arkouda 
    directory in the current user's home directory. The
    default can be overridden by setting the ARKOUDA_CLIENT_DIRECTORY
    environment variable.  It is important this is not the same location
    as the server's token directory as the file format is different.
    """
    arkouda_parent_dir = os.getenv('ARKOUDA_CLIENT_DIRECTORY')
    if not arkouda_parent_dir:
        arkouda_parent_dir = get_home_directory()
    return io_util.get_directory('{}{}.arkouda'.\
                format(arkouda_parent_dir,os.sep)).absolute()
Exemple #4
0
 def setUpClass(cls):
     super(IOTest, cls).setUpClass()
     IOTest.io_test_dir = '{}/io_test'.format(os.getcwd())
     io_util.get_directory(IOTest.io_test_dir)
 def setUpClass(cls):
     super(CategoricalTest, cls).setUpClass()
     CategoricalTest.cat_test_base_tmp = '{}/categorical_test'.format(
         os.getcwd())
     io_util.get_directory(CategoricalTest.cat_test_base_tmp)