-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RF: Consolidate code for deciding base endpoint into func
- Loading branch information
1 parent
c2e7077
commit a8dc9ce
Showing
3 changed files
with
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file contains definitions used as tools for the datalad_registry_client package. | ||
|
||
from datalad import cfg | ||
|
||
from . import DEFAULT_BASE_ENDPOINT | ||
|
||
|
||
def get_base_endpoint() -> str: | ||
""" | ||
:return: The value of the `datalad_registry.base_endpoint` option if set, | ||
or the value of `datalad_registry_client.DEFAULT_BASE_ENDPOINT` otherwise. | ||
""" | ||
return cfg.get("datalad_registry.base_endpoint", DEFAULT_BASE_ENDPOINT) |