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

Add label: str to allowed parameter attributes #1100

Open
nikhilwoodruff opened this issue Jan 4, 2022 · 1 comment
Open

Add label: str to allowed parameter attributes #1100

nikhilwoodruff opened this issue Jan 4, 2022 · 1 comment

Comments

@nikhilwoodruff
Copy link
Contributor

nikhilwoodruff commented Jan 4, 2022

This would serve the UK and US systems, since we're currently providing it via a metadata attribute, but as previously pointed out, it might be more optimal for consistency to add it as a main attribute (since label is an attribute of Variable). Happy to make the change if this is not objectionable?

cc. @benjello @sandcha

For context, here's how we're using metadata.

@nikhilwoodruff nikhilwoodruff changed the title Add label: str to allowed parameter attributions Add label: str to allowed parameter attributes Jan 4, 2022
@sandcha
Copy link
Collaborator

sandcha commented Feb 9, 2022

A main attribute to describe briefly a parameter?

We already have such an attribute 🤔: description is the attribute that describes a parameter in 1 line; it's length is not limited.

"description" or "label"?

Thank you for suggesting the label attribute! I agree that it would be more optimal for consistency to rename it into label in the future to have the same name in the model parameters/variables. This was also asked by openfisca-france community (vote).

It could be managed in a PR (with a thought about the migration process) but it could also be linked to other parameters improvements and need an RFC (request for comments) issue (see below).

What about short and long labels/descriptions?

In today's meeting we also discussed your use case and the fact that the policy engine uses the label as a short label (Basic rate for example) and another attribute for the longer description (documentation if I remember correctly).

This question was also raised by other user interfaces in France. We currently have a discussion on this and it leads the model to add new attributes to the metadata section like the short_label (discussed here 🇫🇷 ) and a constraint on the description length (less than 100 characters according to what already exists, so more likely 420 characters 😅).

Here is an example on a parameter node (with a description in English).
Setting short labels might imply that the parameter (the leaf of the parameters tree) describes only the leaf and that the nodes before it contain short labels reduced to every node meaning (thus, concatenating the short labels from the root to the parameter leaf gives the full description).

Would all this also work for you @nikhilwoodruff?

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

No branches or pull requests

2 participants