From 58347222a31c15e584f976c0cb2864c613015a1c Mon Sep 17 00:00:00 2001 From: Isaac To Date: Mon, 24 Nov 2025 23:25:21 -0800 Subject: [PATCH 1/3] test: make dandi-archive instance used for testing vendor configurable --- dandi/tests/data/dandiarchive-docker/docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dandi/tests/data/dandiarchive-docker/docker-compose.yml b/dandi/tests/data/dandiarchive-docker/docker-compose.yml index 1ce60fbb9..71463db20 100644 --- a/dandi/tests/data/dandiarchive-docker/docker-compose.yml +++ b/dandi/tests/data/dandiarchive-docker/docker-compose.yml @@ -36,9 +36,9 @@ services: DJANGO_DANDI_WEB_APP_URL: http://localhost:8085 DJANGO_DANDI_API_URL: http://localhost:8000 DJANGO_DANDI_JUPYTERHUB_URL: https://hub.dandiarchive.org - DJANGO_DANDI_INSTANCE_NAME: DANDI - DJANGO_DANDI_INSTANCE_IDENTIFIER: RRID:ABC_123456 - DJANGO_DANDI_DOI_API_PREFIX: "10.80507" + DJANGO_DANDI_INSTANCE_NAME: ${DANDI_TESTS_INSTANCE_NAME:-DANDI} + DJANGO_DANDI_INSTANCE_IDENTIFIER: ${DANDI_TESTS_INSTANCE_IDENTIFIER:-RRID:ABC_123456} + DJANGO_DANDI_DOI_API_PREFIX: ${DANDI_TESTS_DOI_PREFIX:-10.80507} ports: - "127.0.0.1:8000:8000" From 37a038a6a403a4f7c16e54d04d1fcbd84ecdf1ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 01:02:27 +0000 Subject: [PATCH 2/3] docs: Add new test environment variables to DEVELOPMENT.md Co-authored-by: candleindark <12135617+candleindark@users.noreply.github.com> --- DEVELOPMENT.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index cbaf7beab..d574ff704 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -90,6 +90,19 @@ development command line options. - `DANDI_TESTS_NO_VCR` — When set, the use of vcrpy to playback captured HTTP requests during testing will be disabled +- `DANDI_TESTS_INSTANCE_NAME` -- Sets the instance name for the Docker Compose + test environment (passed as `DJANGO_DANDI_INSTANCE_NAME`). Defaults to + `DANDI`. Useful for testing vendorized instances. + +- `DANDI_TESTS_INSTANCE_IDENTIFIER` -- Sets the instance identifier (RRID) for + the Docker Compose test environment (passed as + `DJANGO_DANDI_INSTANCE_IDENTIFIER`). Defaults to `RRID:ABC_123456`. Useful + for testing vendorized instances. + +- `DANDI_TESTS_DOI_PREFIX` -- Sets the DOI API prefix for the Docker Compose + test environment (passed as `DJANGO_DANDI_DOI_API_PREFIX`). Defaults to + `10.80507`. Useful for testing vendorized instances. + - `DANDI_DEVEL_INSTRUMENT_REQUESTS_SUPERLEN` -- When set, the `upload()` function will patch `requests` to log the results of calls to `requests.utils.super_len()` From 56c7bfae94d70d84d3f191d578308f56f0081724 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 01:51:33 +0000 Subject: [PATCH 3/3] docs: Update env var descriptions per review feedback Co-authored-by: candleindark <12135617+candleindark@users.noreply.github.com> --- DEVELOPMENT.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d574ff704..a5d36df0a 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -90,18 +90,17 @@ development command line options. - `DANDI_TESTS_NO_VCR` — When set, the use of vcrpy to playback captured HTTP requests during testing will be disabled -- `DANDI_TESTS_INSTANCE_NAME` -- Sets the instance name for the Docker Compose - test environment (passed as `DJANGO_DANDI_INSTANCE_NAME`). Defaults to - `DANDI`. Useful for testing vendorized instances. - -- `DANDI_TESTS_INSTANCE_IDENTIFIER` -- Sets the instance identifier (RRID) for - the Docker Compose test environment (passed as - `DJANGO_DANDI_INSTANCE_IDENTIFIER`). Defaults to `RRID:ABC_123456`. Useful - for testing vendorized instances. - -- `DANDI_TESTS_DOI_PREFIX` -- Sets the DOI API prefix for the Docker Compose - test environment (passed as `DJANGO_DANDI_DOI_API_PREFIX`). Defaults to - `10.80507`. Useful for testing vendorized instances. +- `DANDI_TESTS_INSTANCE_NAME` -- Sets the instance name for the dandi-archive instance used for + testing. Defaults to `"DANDI"`. Useful for testing dandi-cli against a dandi-archive instance with + a particular vendor information. + +- `DANDI_TESTS_INSTANCE_IDENTIFIER` -- Sets the instance identifier (RRID) for the dandi-archive + instance used for testing. Defaults to `"RRID:ABC_123456"`. Useful for testing dandi-cli against + a dandi-archive instance with a particular vendor information. + +- `DANDI_TESTS_DOI_PREFIX` -- Sets the DOI API prefix for the dandi-archive instance used for + testing. Defaults to `"10.80507"`. Useful for testing dandi-cli against a dandi-archive instance + with a particular vendor information. - `DANDI_DEVEL_INSTRUMENT_REQUESTS_SUPERLEN` -- When set, the `upload()` function will patch `requests` to log the results of calls to