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

Provide user access to dataset dictionary in audbcards.Datacard #40

Open
hagenw opened this issue Oct 12, 2023 · 0 comments
Open

Provide user access to dataset dictionary in audbcards.Datacard #40

hagenw opened this issue Oct 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@hagenw
Copy link
Member

hagenw commented Oct 12, 2023

Currently, the RST page of an data card is rendered by audbcards.Datacard._render_template(), which calls content = template.render(dataset), where dataset is a dictionary in the form of {'name': 'database-name', ...}, whereby the keys are used in the templates to specify what should be displayed on the RST page.

If a user would have access to dataset, e.g. in the form of audbcards.Datacard.dataset it would be very easy to extend a datacard by some special entries without the need to first update the audbcards package.
I also see two challenges we need to solve when adding this feature:

  • We cannot just add it during __init__() as the dictionary is only filled when _render_template() is called
  • The name dataset might not be the best choice as it is easy to be confused with an actual audbcards.Dataset object
@hagenw hagenw added the enhancement New feature or request label Oct 12, 2023
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

1 participant