Skip to content

Commit 9b6d9aa

Browse files
authored
Merge branch 'master' into dependabot/github_actions/actions/checkout-6
2 parents beea91f + c43062d commit 9b6d9aa

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

DEVELOPMENT.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ development command line options.
9090
- `DANDI_TESTS_NO_VCR` — When set, the use of vcrpy to playback captured HTTP
9191
requests during testing will be disabled
9292

93+
- `DANDI_TESTS_INSTANCE_NAME` -- Sets the instance name for the dandi-archive instance used for
94+
testing. Defaults to `"DANDI"`. Useful for testing dandi-cli against a dandi-archive instance with
95+
a particular vendor information.
96+
97+
- `DANDI_TESTS_INSTANCE_IDENTIFIER` -- Sets the instance identifier (RRID) for the dandi-archive
98+
instance used for testing. Defaults to `"RRID:ABC_123456"`. Useful for testing dandi-cli against
99+
a dandi-archive instance with a particular vendor information.
100+
101+
- `DANDI_TESTS_DOI_PREFIX` -- Sets the DOI API prefix for the dandi-archive instance used for
102+
testing. Defaults to `"10.80507"`. Useful for testing dandi-cli against a dandi-archive instance
103+
with a particular vendor information.
104+
93105
- `DANDI_DEVEL_INSTRUMENT_REQUESTS_SUPERLEN` -- When set, the `upload()`
94106
function will patch `requests` to log the results of calls to
95107
`requests.utils.super_len()`

dandi/dandiset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def _get_identifier(metadata: dict) -> str | None:
139139
id_ = str(id_.get("value", ""))
140140
elif id_ is not None:
141141
assert isinstance(id_, str)
142-
if id_.startswith("DANDI:"):
143-
# result of https://github.com/dandi/dandi-cli/pull/348 which
144-
id_ = id_[len("DANDI:") :]
142+
# result of https://github.com/dandi/dandi-cli/pull/348 which ???
143+
# TODO: RF to avoid this evil!!!
144+
id_ = id_.split(":", maxsplit=1)[-1]
145145

146146
assert id_ is None or isinstance(id_, str)
147147
return id_

dandi/tests/data/dandiarchive-docker/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ services:
3636
DJANGO_DANDI_WEB_APP_URL: http://localhost:8085
3737
DJANGO_DANDI_API_URL: http://localhost:8000
3838
DJANGO_DANDI_JUPYTERHUB_URL: https://hub.dandiarchive.org
39-
DJANGO_DANDI_INSTANCE_NAME: DANDI
40-
DJANGO_DANDI_INSTANCE_IDENTIFIER: RRID:ABC_123456
41-
DJANGO_DANDI_DOI_API_PREFIX: "10.80507"
39+
DJANGO_DANDI_INSTANCE_NAME: ${DANDI_TESTS_INSTANCE_NAME:-DANDI}
40+
DJANGO_DANDI_INSTANCE_IDENTIFIER: ${DANDI_TESTS_INSTANCE_IDENTIFIER:-RRID:ABC_123456}
41+
DJANGO_DANDI_DOI_API_PREFIX: ${DANDI_TESTS_DOI_PREFIX:-10.80507}
4242
ports:
4343
- "127.0.0.1:8000:8000"
4444

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies = [
4949
# >=8.2.0: https://github.com/pallets/click/issues/2911
5050
"click >= 7.1, <8.2.0",
5151
"click-didyoumean",
52-
"dandischema >= 0.11.1, < 0.12.0",
52+
"dandischema ~= 0.12.0",
5353
"etelemetry >= 0.2.2",
5454
# For pydantic to be able to use type annotations like `X | None`
5555
"eval_type_backport; python_version < '3.10'",

0 commit comments

Comments
 (0)