Skip to content

consistent naming in model_builder.py #109

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

Closed
michaelraczycki opened this issue Feb 16, 2023 · 4 comments
Closed

consistent naming in model_builder.py #109

michaelraczycki opened this issue Feb 16, 2023 · 4 comments

Comments

@michaelraczycki
Copy link
Collaborator

I wanted to propose few minor changes to increase consistency in the code. What I noticed is that all the functions are named with verbs, as usual, but then there's 'id' function. In my opinion it would be better to stick with the rest of the convention and call it 'generate_id'. Second thing is that other functions have type hinting, and in case of id function even though the comment inside the function itself contains description of what type it returns, the hinting is not added. If you agree with those changes I'll create a pull request right away

@twiecki
Copy link
Member

twiecki commented Feb 16, 2023

Maybe we could turn id into a property?

@michaelraczycki
Copy link
Collaborator Author

If you mean @Property decorator, then it would also work as well, the only problem I have with those is that if the function is meant to be used also outside o this very file, it creates confusion. Not everyone will know that it's a a function, and from code perspective it will look like a variable.

@twiecki
Copy link
Member

twiecki commented Feb 17, 2023

yeah, @property but note that this is part of the internal API anyway.

@michaelraczycki
Copy link
Collaborator Author

In this case I'll create new PR to change it to @Property

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