-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored client and file classes (#6)
* added fetch_file method, retrieves bytes not file * refactored get_file and put_file * changed Client.vendor to Client.name * work in progress * refactored clients with file_stream * added FileInfo class and refactored File class * changed positional args to kw in test_connect.py * updated variable names and docstrings * added error classes, fixed file_exists checks * fixed timezone aware date issue in list_file_info * changed vendor_config function in utils.py * fixed utils tests and tzinfo issue in conftest * moved debug logging to Client class * removed list arg from get_file and put_file * changed logging levels and messages * fixed Client tests * added datetime.timedelta as type for time_delta * updated docstrings in file.py, utils.py * updated docstrings in connect.py, errors.py * updated _clients.py docstrings, and fixed tests * fixed tests, added new tests, updated docstrings * fixed logging issue in `Client.file_exists` method
- Loading branch information
1 parent
186e681
commit 1ec1cf4
Showing
10 changed files
with
1,318 additions
and
887 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""This module contains custom exceptions for the file_retriever package.""" | ||
|
||
|
||
class FileRetrieverError(Exception): | ||
"""Base class for exceptions in the file_retriever package.""" | ||
|
||
pass | ||
|
||
|
||
class RetrieverAuthenticationError(FileRetrieverError): | ||
"""Exception raised for errors in authenticating to a server.""" | ||
|
||
pass | ||
|
||
|
||
class RetrieverConnectionError(FileRetrieverError): | ||
"""Exception raised for errors in connecting to the file server.""" | ||
|
||
pass | ||
|
||
|
||
class RetrieverFileError(FileRetrieverError): | ||
"""Exception raised for errors in finding or accessing a requested file.""" | ||
|
||
pass |
Oops, something went wrong.