dandi / dandi/dandi-cli

Add configuration system

Open
#1,521 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
28
Forks
37
Avg merge
1d 17h
Merged PRs (30d)
9

Description

ATM we only rely on some env vars defined in `DEVELOPMENT.md`

```shell
❯ grep DANDI_ DEVELOPMENT.md
`DANDI_DEVEL` environment variable, which is needed in order to expose the
- `DANDI_DEVEL` -- enables otherwise hidden command line options, such as
- `DANDI_API_KEY` -- avoids using keyrings, thus making it possible to
- `DANDI_LOG_LEVEL` -- set log level. By default `INFO`, should be an int (`10` - `DEBUG`).
- `DANDI_CACHE` -- clear persistent cache handling. Known values
- `DANDI_INSTANCEHOST` -- defaults to `localhost`. Point to host/IP which hosts
- `DANDI_TESTS_PERSIST_DOCKER_COMPOSE` -- When set, the tests will reuse the
- `DANDI_TESTS_PULL_DOCKER_COMPOSE` -- When set to an empty string or `0`, the
- `DANDI_TESTS_NO_VCR` — When set, the use of vcrpy to playback captured HTTP
- `DANDI_DEVEL_INSTRUMENT_REQUESTS_SUPERLEN` -- When set, the `upload()`
- `DANDI_DOWNLOAD_AGGRESSIVE_RETRY` -- When set, would make `download()` retry
```

and a set of options to individual commands which in principle could have their defaults overwritten "account wide", e.g. to modify default `instance` to use etc. Some additional considerations

- Should likely follow similar to git and datalad logic of going through ways to overload: system config, user config, local dandiset config, env variable, CLI option.
- to accommodate more of instances (e.g. as now for LINC), we might allow to define those, so configuration should allow (likely similar to how git does it in git config) to define new instances.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.