Skip to content

OpenADAS DEFAULT_REPOSITORY_PATH from environment variable #416

@Mateasek

Description

@Mateasek

Hi,

I think it would be great if we could pull the default repository path for OpenADAS repository from environment variable (e.g. CHERAB_OPENADAS_DEFAULT_REPOSITORY_PATH).

The change I propose would be quite simple:

try:
    DEFAULT_REPOSITORY_PATH = os.environ["CHERAB_OPENADAS_DEFAULT_REPOSITORY_PATH"]
except KeyError:
    DEFAULT_REPOSITORY_PATH = os.path.expanduser('~/.cherab/openadas/repository')

This would allow simpler handling of system-wide installation of default repository and working with modules in linux without the need to change the code. Going back to the default path when the variable is not set keeps the backwards compatibility.

What do you think?

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