Skip to content

Commit

Permalink
Support LINC staging and production APIs in dandi-cli tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Nov 5, 2024
1 parent 6aa414c commit 6d23a4b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dandi/cli/tests/test_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ def test_cmd_instances(monkeypatch):
f" gui: http://{instancehost}:8085\n"
"dandi-staging:\n"
" api: https://api-staging.dandiarchive.org/api\n"
" gui: https://gui-staging.dandiarchive.org\n"
" gui: https://gui-staging.dandiarchive.org\n",
"linc:\n"
" api: https://api.lincbrain.org/api\n"
" gui: https://lincbrain.org\n"
"linc-staging:\n"
" api: https://staging-api.lincbrain.org/api\n"
" gui: https://staging.lincbrain.org\n"
)
13 changes: 13 additions & 0 deletions dandi/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class DandiInstance:
name: str
gui: str | None
api: str
is_private: bool = False

@property
def redirector(self) -> None:
Expand Down Expand Up @@ -132,6 +133,18 @@ def urls(self) -> Iterator[str]:
f"http://{instancehost}:8085",
f"http://{instancehost}:8000/api",
),
"linc": DandiInstance(
"linc",
"https://lincbrain.org",
"https://api.lincbrain.org/api",
is_private=True
),
"linc-staging": DandiInstance(
"linc",
"https://staging.lincbrain.org",
"https://staging-api.lincbrain.org/api",
is_private=True
)
}
# to map back url: name
known_instances_rev = {
Expand Down
6 changes: 6 additions & 0 deletions docs/source/cmdline/instances.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ Example output:
dandi-staging:
api: https://api-staging.dandiarchive.org/api
gui: https://gui-staging.dandiarchive.org
linc-staging:
api: https://staging-api.lincbrain.org/api
gui: https://staging.lincbrain.org
linc:
api: https://api.lincbrain.org/api
gui: https://lincbrain.org

0 comments on commit 6d23a4b

Please sign in to comment.