-
Notifications
You must be signed in to change notification settings - Fork 4
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
Create text file to document contribution guidelines #34
Comments
I can share things that I have seen are effective at "herding cats" when working with teams having between two and two dozen engineers of diverse skill levels.
We conduct a code review during the PR process to assess two things:
The easy-to-run The author likely believes that anyone in the team could fix a bug or add a feature to the code they just wrote. But only another teammate could give an answer of, "yes! I think I grok this new code and could maintain it." That's why we do reviews, to helpfully reveal blind spots in the author's thinking. What is obvious to the author won't be universally obvious, so we give other folks an opportunity to chime in, before they're stuck with supporting that code. We desire that functions should compose, so each author takes care to spell out a new function's contract. Sometimes the pre- and post- conditions are clear from the signature. If not, we need at least a one-sentence docstring. A reviewer should be able to articulate what the contract is. Imagine there is no unit test. By examining the function's signature and contract (but not its source code), a reviewer should be able to write meaningful unit tests. If not, it is appropriate to push back, to suggest improvements to the PR prior to merging down to |
Those all sound solid to me, I imagine this document would be 70-80% standard python practices with just a little bit of our own preferences for communication and workflow. |
@skyfenton would you like to take a crack at it? There's probably templates you can use to get started. |
Sure, I'll draft something up. I'll def want to review it next week with everyone to make sure there aren't any important gaps. |
Awesome, sg |
Let's document:
And much much more! |
Possibly https://github.com/noisebridge/MediaBridge/blob/main/doc/review-procedure.md closes out these concerns? Or possibly we wish a companion document in that directory? And also I'm willing to believe that in recent months perhaps "John did X" but "we were hoping for X + Y", which might motivate creating a document that makes suggestions about Y. That is, I welcome with open arms any critiques of "John made this SHA1 commit", and "the commit would have been better if we followed policy Y instead". I think I make mistakes all the time, and that we can always learn from them and strive to do better. In any event, I would like to see some resolution to Issue 34 during the month of March, something constructive that comes from it. Sooo, setting a timer for 31st March on this.
Excellent! Since October, the project config has changed. It now specifies that new PR submissions shall be "squashed", which seems a good way to make |
I think the
As far as mergining instead of rebasing, I was actually refering to a specific set of issues that came up early in the project, where folks were rebasing main onto their PR branches, which led to lots of badly resolved conflicts and confusion with having to resolve the same conflicts multiple times (in the case of a new rebase). |
As we keep deciding on how tests should be constructed, naming schemes, formatting tools, docstrings, etc. we should have a markdown text file (a "CONTRIBUTING.md") to define our guidelines for writing code, submitting PRs, etc. that we can refer newcomers to and use to remind ourselves.
This way we also have a list of conventions to double check for in PR reviews to maintain consistency and confidence a PR has checked all the boxes.
The text was updated successfully, but these errors were encountered: