-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add internal util for checking if remote or local * Changing default DO status based on internal or remote * updating scheduled_at or queued_at based on if it's internal * change util to use method that combines all 3 service checks into one * remove is internal service method since it's not used in OSS * update unit tests * update tests * reverse scheduled and queued * update comment * fix merge issues * fix merge * [skip ci] add test for is remote * fix test --------- Co-authored-by: Stuart Wheaton <stuart@voxel51.com>
- Loading branch information
1 parent
8feb0c9
commit 7a7dfdd
Showing
6 changed files
with
68 additions
and
9 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
""" | ||
|
||
from .secrets import * | ||
from .util import is_remote_service |
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,34 @@ | ||
""" | ||
FiftyOne internal utilities. | ||
| Copyright 2017-2024, Voxel51, Inc. | ||
| `voxel51.com <https://voxel51.com/>`_ | ||
| | ||
""" | ||
|
||
|
||
def is_remote_service(): | ||
"""Whether the SDK is running in a remote service context. | ||
Returns: | ||
True/False | ||
""" | ||
return has_encryption_key() and has_api_key() | ||
|
||
|
||
def has_encryption_key(): | ||
"""Whether the current environment has an encryption key. | ||
Returns: | ||
True/False | ||
""" | ||
return False | ||
|
||
|
||
def has_api_key(): | ||
"""Whether the current environment has an API key. | ||
Returns: | ||
True/False | ||
""" | ||
return False |
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