From 8c639b7c09f67f70e0755e742a46a4e070f0efff Mon Sep 17 00:00:00 2001 From: luiz Date: Tue, 12 Dec 2023 10:54:06 +0100 Subject: [PATCH 1/2] dandi authenticate --- nwbwidgets/panel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nwbwidgets/panel.py b/nwbwidgets/panel.py index 10b8d365..ae7122a6 100644 --- a/nwbwidgets/panel.py +++ b/nwbwidgets/panel.py @@ -1,7 +1,7 @@ import concurrent.futures import warnings from pathlib import Path - +import os import fsspec import h5py import ipywidgets as widgets @@ -292,6 +292,9 @@ def process_dandiset(self, dandiset): def get_all_dandisets_metadata(self): with DandiAPIClient() as client: + api_key = os.environ.get("DANDI_API_KEY", None) + if api_key: + client.dandi_authenticate() all_metadata = [] dandisets = list(client.get_dandisets()) total_dandisets = len(dandisets) From 58c0daed52b987d271ef13623d6156a1f677dc05 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:56:01 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- nwbwidgets/panel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nwbwidgets/panel.py b/nwbwidgets/panel.py index ae7122a6..6ccd0195 100644 --- a/nwbwidgets/panel.py +++ b/nwbwidgets/panel.py @@ -1,7 +1,8 @@ import concurrent.futures +import os import warnings from pathlib import Path -import os + import fsspec import h5py import ipywidgets as widgets