Skip to content

Commit

Permalink
RF: Obtain path for dataset URLs from DL-Registry package instead
Browse files Browse the repository at this point in the history
  • Loading branch information
candleindark committed Mar 26, 2024
1 parent 8c7b160 commit c2e7077
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions datalad_registry_client/get_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
import requests
from yarl import URL

from . import DEFAULT_BASE_ENDPOINT
from datalad_registry.blueprints.api import DATASET_URLS_PATH

# The path of the dataset URLs resource on the DataLad Registry instance relative to
# the base API endpoint of the instance.
_DATASET_URLS_PATH = "dataset-urls"
from . import DEFAULT_BASE_ENDPOINT

lgr = logging.getLogger("datalad.registry.get_urls")

Expand Down Expand Up @@ -72,7 +70,7 @@ def __call__(cache_path: Optional[str] = None, base_endpoint: Optional[str] = No
"datalad_registry.base_endpoint", DEFAULT_BASE_ENDPOINT
)

endpoint = URL(base_endpoint) / _DATASET_URLS_PATH
endpoint = URL(base_endpoint) / DATASET_URLS_PATH

target_url = (
endpoint.with_query(cache_path=cache_path)
Expand Down

0 comments on commit c2e7077

Please sign in to comment.