11import errno
2- import logging
3- import re
42import glob
3+ import logging
54import os
5+ import re
66
7- from genomespaceclient import storage_handlers
87from genomespaceclient import gs_glob
8+ from genomespaceclient import storage_handlers
99from genomespaceclient .exceptions import GSClientException
1010
1111import requests
@@ -462,9 +462,9 @@ def copy(self, source, destination, recurse=False):
462462 Copies a file to/from/within GenomeSpace.
463463
464464 E.g.
465-
466- client.copy("/tmp/local_file.txt",
467- "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt")
465+ .. code-block:: python
466+ client.copy("/tmp/local_file.txt",
467+ "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt")
468468
469469 :type source: :class:`str`
470470 :param source: Local filename or GenomeSpace URL of source file.
@@ -495,9 +495,9 @@ def move(self, source, destination):
495495 Moves a file within GenomeSpace.
496496
497497 E.g.
498-
499- client.move("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt",
500- "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
498+ .. code-block:: python
499+ client.move("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt",
500+ "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
501501
502502 :type source: :str:
503503 :param source: GenomeSpace URL of source file. Cannot be a local file.
@@ -521,8 +521,8 @@ def list(self, genomespace_url):
521521 Returns a list of files within a GenomeSpace folder.
522522
523523 E.g.
524-
525- client.list("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/")
524+ .. code-block:: python
525+ client.list("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/")
526526
527527 :type genomespace_url: :class:`str`
528528 :param genomespace_url: GenomeSpace URL of folder to list.
@@ -540,8 +540,8 @@ def delete(self, genomespace_url, recurse=False):
540540 Deletes a file within a GenomeSpace folder.
541541
542542 E.g.
543-
544- client.delete("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
543+ .. code-block:: python
544+ client.delete("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
545545
546546 :type genomespace_url: :class:`str`
547547 :param genomespace_url: GenomeSpace URL of file to delete.
@@ -592,7 +592,8 @@ def mkdir(self, genomespace_url, create_path=True):
592592 Creates a folder at a given location.
593593
594594 E.g.
595- client.mkdir("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/Folder1")
595+ .. code-block:: python
596+ client.mkdir("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/Folder1")
596597
597598 :type genomespace_url: :class:`str`
598599 :param genomespace_url: GenomeSpace URL of file to delete.
@@ -618,7 +619,9 @@ def get_metadata(self, genomespace_url):
618619
619620 E.g.
620621
621- client.get_metadata("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
622+ .. code-block:: python
623+
624+ client.get_metadata("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
622625
623626 :type genomespace_url: :class:`str`
624627 :param genomespace_url: GenomeSpace URL of file to delete.
@@ -639,14 +642,16 @@ def get_remaining_token_time(self, genomespace_url):
639642 If you don't have one, will return 0, as the non existent token has
640643 no time left to live. See:
641644 http://www.genomespace.org/support/api/restful-access-to-identity-server#get_token_time
642-
643- E.g.
644-
645- client.get_remaining_token_time('https://genomespace.genome.edu.au/')
646-
645+
646+ E.g.
647+
648+ .. code-block:: python
649+
650+ client.get_remaining_token_time('https://genomespace.genome.edu.au/')
651+
647652 :type genomespace_url: :class:`str`
648653 :param genomespace_url: GenomeSpace URL.
649-
654+
650655 :rtype: :class:`int`
651656 :return: the time the token has left to live in milliseconds.
652657 """
0 commit comments