-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Update CONTRIBUTING.rst #178
Conversation
remove .hook as in the documentation it is mentioned to use the hook file in the module's root directory. It should be "from hook" instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure ?
Done in my V16 env, on my 56 local OCA repos.
rgrep "from hook" ./ --include=*.py | wc -l
0
rgrep "from .hook" ./ --include=*.py | wc -l
124
@legalsylvain After the precommit command runs correctly, I must remove hooks.py file and remove the inherit line in init |
Which commit remove hook ? |
No commit, I remove hook before commit. I do it manually. I don't if there any command removes hook, but I had to remove hook as it raised errors while having odoo tests |
Oh. Could you readd the hook you need, and we'll check the error. thanks. |
@legalsylvain Generate addons README files from fragments..............................Failed
|
That error has nothing to do with this text. It just mean that the README generation has failed (or the README is rebuilt). The local import is totally correct for avoiding collapses with global Python libraries. Imagine you have a Python library called |
I understand now the reason for adding . but that's what happened, and to make the file be generated successfully with my name as a contributor, I hade to remove the . I am reporting now and you are the experts to fix errors if they are present. |
No, you are linking 2 unrelated events. The error is because the README is regenerated. Running the commit/pre-commit command again, you will see that there's no error. Take also into account that for adding you as contributor, you have to modify files inside |
I would have better be notified that running precommit for the first time cause error. As it is an error, people should be notified. I spent a lot of time trying to track the issue and asking people in the mailing list. I must report that if someone is trying to add contribution for the first time the will be lost and give up. It was not the only error, there was another one about pandoc library that I had to install manually. I hope the documentation guide us to avoid unnecessary waste of time. |
The hook is very clear with this: so the text you have passes is not the same one as this. The same happens with auto-formatting tools. If you think that something can be improved in the documentation, please point in which point it's not clear for improving it, but don't argue without even specifying what you have read or not, and leave that tone, or you won't receive more help. I can say as well that you are also "wasting" my time. |
Ok, I already intended to write about my experience to contribute in my blog. For wasting time issue, I think everybody should help to save their time and others time too. I made that pull request in order to avoid other new contributors a waste of time. And instead of making argue, the documentation should refer the that error as it is not critical and should not make the contributor give up. For me in person I apologise for wasting your time sir, forgive me. I am sorry. |
OK, no problem, just as said, point where do you think we should put that information, as the contribution guidelines don't talk about specific tools. Fow now, I have added a note here: |
It is very good. |
remove .hooks as in the documentation it is mentioned to use the hook file in the module's root directory.
It should be "from hooks" instead.