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

Migrating to Keyword Only arguments (PEP 3102) #3029

Open
Tracked by #3095
skoudoro opened this issue Jan 5, 2024 · 3 comments
Open
Tracked by #3095

Migrating to Keyword Only arguments (PEP 3102) #3029

skoudoro opened this issue Jan 5, 2024 · 3 comments

Comments

@skoudoro
Copy link
Member

skoudoro commented Jan 5, 2024

Description

Hi all,

To simplify maintenance and avoid to messing around with function arguments order (it happens many times already), it would be great if we could switch our codebase to keyword-only arguments (see pep 3102).

To do a smooth transition, we might need to create a decorator that will warn the user about this feature. The decorator should stay in place for 3-4 releases (all this year (2024 and we remove it in 2025).

Please, Let me know what you think about this new feature or if you are against.

I would like to start this work earliest as possible.

ps: if we agree, all new function in DIPY codebase should follow this rules.

Thank for the feedback.

@pjsjongsung
Copy link
Contributor

Sounds reasonable! I had some related troubles during a PR last time, especially when using/changing functions written by another contributor, and this could really help.

@samcoveney
Copy link
Contributor

Do you know of a way to check this using some tool? Would make the transition easier

@skoudoro
Copy link
Member Author

skoudoro commented Mar 6, 2024

For now, no, I do not know any tool. With might do like scikit-learn, create a decorator to warn user of this change, and apply this decorator in every single function in the codebase....

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

No branches or pull requests

3 participants