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

Better warning if po(<id>) does not work, but ppl(<id>) exists #717

Open
sebffischer opened this issue Mar 27, 2023 · 3 comments · May be fixed by #837
Open

Better warning if po(<id>) does not work, but ppl(<id>) exists #717

sebffischer opened this issue Mar 27, 2023 · 3 comments · May be fixed by #837
Assignees

Comments

@sebffischer
Copy link
Member

Inspired by this SO post: https://stackoverflow.com/users/17945841/programming-noob

@mb706
Copy link
Collaborator

mb706 commented May 22, 2023

Link is appears broken to me.

Since our dictionaries all inherit from the same base class, we could also think of having a central registry of all dictionaries in mlr3misc, where did_you_mean looks for similar names. So if someone wants a pipeop but uses lrn(), or wants a filter but uses po() etc., one would get a fitting hint.

@mb706
Copy link
Collaborator

mb706 commented Sep 17, 2024

maybe extend dictionary_sugar_get by an optional argument with alternative dicts that the user could have meant. Need to think about how the error message should look like: e.g. "Element with key 'xx' not found in DictionaryGraph! Did you mean 'xy'?\nSimilar entries in other dictionary ppl(): 'xx', 'xz'"? I.e. string similarity in same dict as before, then loop through alternative dicts and see if there are exact or near misses; if there are multiple other dicts, maybe take care direct hits are on top.

@mb706
Copy link
Collaborator

mb706 commented Sep 17, 2024

optoinal args of dictionary_sugar_get should have . prefix

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

Successfully merging a pull request may close this issue.

3 participants