Please describe the feature
All options specified in the config file should be possible to set as flags, making the config file optional.
At the same time it should be possible to include all required fields in the config file, also note the updated format from auth service:
access_token = eyJraWQ...
url = download.example.org
public_key = base64enc.string
dataset_id = some-identifier (possibly)
Adding viper for config parsing in sda-cli would make it easy to populate configuration for the subcommand before invoking it, similar to how it's done in sensitive-data-archive.
sda-cli --config myconfig download --some-option
Strive for consistency:
cli: --config-option
config-file: config_option
env: CONFIG_OPTION
Acceptance criteria
Additional context
For download it's currently only the access-token that is not possible to specify without config file. Add --access-token and/or through an ENV ACCESS_TOKEN.
Estimation of size
medium
Estimation of priority
medium
Please describe the feature
All options specified in the config file should be possible to set as flags, making the config file optional.
At the same time it should be possible to include all required fields in the config file, also note the updated format from auth service:
Adding viper for config parsing in sda-cli would make it easy to populate configuration for the subcommand before invoking it, similar to how it's done in
sensitive-data-archive.Strive for consistency:
Acceptance criteria
sda-clishould work with both old and new format of config file. sda-cli should just silently ignore options it does not recognize (for examplehost_baseshould be ignored).Additional context
For download it's currently only the access-token that is not possible to specify without config file. Add
--access-tokenand/or through an ENVACCESS_TOKEN.Estimation of size
medium
Estimation of priority
medium