Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readability of configuration #80

Open
hagenw opened this issue Apr 24, 2024 · 1 comment
Open

Improve readability of configuration #80

hagenw opened this issue Apr 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@hagenw
Copy link
Member

hagenw commented Apr 24, 2024

At the moment, the configuration is specified in a list of complicated tuples, e.g.

audbcards_datasets = [ 
    (   
        "data-public",
        "data-public",
        audb.Repository(
            name="data-public",
            host="https://audeering.jfrog.io/artifactory",
            backend="artifactory",
        ),
        True,
    ),  
]

This has the disadvantage that it is hard to understand. Usually, I add some comments to mitigate this:

audbcards_datasets = [ 
    (   
        "data-public",  # folder name
        "data-public",  # datasets overview page header
        audb.Repository(
            name="data-public",
            host="https://audeering.jfrog.io/artifactory",
            backend="artifactory",
        ),  # repositories
        True,  # include audio examples?
    ),  
]

Should we maybe switch from a tuple to a dictionary to make it more obvious?
Another solution might be to switch to a config file, and provide the path to the config file here in docs/conf.py?

/cc @ChristianGeng

@hagenw hagenw added the enhancement New feature or request label Apr 24, 2024
@ChristianGeng
Copy link
Member

Yes, I think that this would make sense in order to get it more tidy.
As this is configuration, one could even go a step further and separate the audbcards_datasets into a config file.

With regard to the how: not that I have a strong oppinion, but you suggests to leave audbcards_datasets a list, and to transform an individual tuple into a dictionary - as opposed to audbcards_datasets itself becoming a dictionary too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants