Skip to content

Use environment variable instead of CLI argument for the Python configuration file #1230

@maximemulder

Description

@maximemulder

Currently, there is the directory of the Python configuration file in the $LORIS_CONFIG variable (set in the environment file), and then each Python (and Perl) script takes the name of the configuration file as a CLI argument. The full path of the configuration file is obviously the environment variable joined with the CLI argument.

What is we instead put the full path to the configuration file in the environment variable such as $LORIS_CONFIG_PYTHON (example name) ? This would allow to not specify the configuration file each time and makes the scripts easier to use for new users.

For instance, on the new import_dicom_study.py script (#1117), we go from:

import_dicom_study.py --insert --source=/path/to/dicom/study

to:

import_dicom_study.py --profile database_config.py --insert --source=/path/to/dicom/study

(in comparison, the current command to get the same result is this one 👀)

dicomTar.pl -profile prod -database -source=/path/to/dicom/study -target=/path/to/tarchive/dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions