Task #3898
closed(All projects) Write documentation for code contribution
60%
Description
All projects should include CONTRIBUTING.md file in the root directory. This file should explain contributing workflow, reference code of conduct (e.g., based on http://contributor-covenant.org/version/1/4/), describe/reference code style, how to write tests, how to submit patches, etc.
There is a bunch of examples for this that this can be based on:
- atom project
- gnome projects, https://wiki.gnome.org/Newcomers/
- other, see more here
In addition to CONTRIBUTING.md file, we will also need to create a relevant section on named-data.net website, but this can be done afterwards.
Files
Updated by Davide Pesavento about 8 years ago
- Subject changed from (All projects) Write documenation for code contribution to (All projects) Write documentation for code contribution
Updated by Nicholas Gordon almost 8 years ago
I have been working on this for the past two days, and I've got maybe 60% of it done at this point. I have a few questions:
- What email should I put into the code of conduct as a contact to report abuse?
- Who exactly should this be aimed at? I have been writing this to be as comprehensive as I can. Specifically, I have been writing this as though someone who conceptually understands programming but not any of the ins-and-outs of git, Gerrit, Redmine, etc.
- How verbose should I be? At some point it stops being a "how to contribute" and a "how-to" and I'd like to know where we want that distinction to be.
I'll post a draft of what I have at the end of the day so we can start ripping it apart discussing it.
Updated by Alex Afanasyev almost 8 years ago
Nicholas Gordon wrote:
I have been working on this for the past two days, and I've got maybe 60% of it done at this point. I have a few questions:
- What email should I put into the code of conduct as a contact to report abuse?
Lixia's, Beichuan's, and mine
- Who exactly should this be aimed at? I have been writing this to be as comprehensive as I can. Specifically, I have been writing this as though someone who conceptually understands programming but not any of the ins-and-outs of git, Gerrit, Redmine, etc.
That's correct. This for people who wants to contribute patches (so, they can code :-D)
- How verbose should I be? At some point it stops being a "how to contribute" and a "how-to" and I'd like to know where we want that distinction to be.
For things like gerrit this should be as verbose as possible. If too verbose, this can be part of subsection.
Updated by Nicholas Gordon almost 8 years ago
- File CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md added
- File CONTRIBUTING.md CONTRIBUTING.md added
I have uploaded the first draft of the document. I've worked in Alex's comments on note-4, and I have a couple more questions:
- We have a few projects that are not written in C++. Do we have styleguides for them? (Python and JavaScript, if I recall)
- At what point should tests be written? What is the "official" decision about when a segment of code needs a test?
Updated by Alex Afanasyev almost 8 years ago
Nicholas Gordon wrote:
I have uploaded the first draft of the document. I've worked in Alex's comments on note-4, and I have a couple more questions:
- We have a few projects that are not written in C++. Do we have styleguides for them? (Python and JavaScript, if I recall)
We have https://redmine.named-data.net/projects/nfd/wiki/CodeStyle. Beyond this, we haven't defined anything (yet?).
- At what point should tests be written? What is the "official" decision about when a segment of code needs a test?
I found that this article https://blog.nelhage.com/2016/12/how-i-test/ pretty much aligns how I work.
Updated by Junxiao Shi almost 8 years ago
I have been working on this for the past two days, and I've got maybe 60% of it done at this point.
This exact statement demonstrates that you are unaware of the progress reporting feature of Redmine:
- When you start working on an issue, change "Status" field to "In Progress".
- When you make progress, update "% Done" field.
- When you upload the final Change onto Gerrit, change "Status" field to "Code Review"; otherwise, it stays in "In Progress".
If those boxes aren't visible to you, email the project administrators found on "Overview" page.
I have uploaded the first draft of the document.
Markdown is a text-based format, so it would be much easier to review when you upload a Change to Gerrit. After uploading a Change, post the link on Redmine so that it's easier to find. A link looks like https://gerrit.named-data.net/3451 and should not contain the patchset number, so that it always navigates to the latest patchset.
Updated by susmit shannigrahi almost 8 years ago
- What email should I put into the code of conduct as a contact to report abuse?
Lixia's, Beichuan's, and mine
Do you want a role-based email address for this? Something like abuse@named-data.net?
Updated by Alex Afanasyev almost 8 years ago
I would use personal emails for this
Updated by Alex Afanasyev almost 8 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 60
Junxiao Shi wrote:
This exact statement demonstrates that you are unable of the progress reporting feature of Redmine:
- When you start working on an issue, change "Status" field to "In Progress".
- When you make progress, update "% Done" field.
- When you upload the final Change onto Gerrit, change "Status" field to "Code Review"; otherwise, it stays in "In Progress".
If those boxes aren't visible to you, email the project administrators found on "Overview" page.
Junxiao, these are not requirements, but some formality that could be helpful. Ultimately, the comment is the progress on the issues. The above list may appear as a recommendation, but by no means are cast in stone instructions. Anybody can help and update the formal status of the issue.
Updated by Alex Afanasyev almost 8 years ago
Junxiao Shi wrote:
I have uploaded the first draft of the document.
Markdown is a text-based format, so it would be much easier to review when you upload a Change to Gerrit. After uploading a Change, post the link on Redmine so that it's easier to find. A link looks like
https://gerrit.named-data.net/3451
and should not contain the patchset number, so that it always navigates to the latest patchset.
Gerrit would be ideal (for me). But you can simply use gist or any github repo. Much easier to read there.
Updated by Nicholas Gordon almost 8 years ago
I have uploaded the two files to gerrit as a change on NFD, located here: https://gerrit.named-data.net#/c/3553/
I've incorporated Junxiao's suggestion about progress percentage (note-7), as well as the styleguide for Python (note-6).
Updated by Nicholas Gordon almost 8 years ago
I am also publishing the .md file as a gist so that we can see the rendered view. I'll be updating this each time I push a change to gerrit so that it remains synced.
https://gist.github.com/gorgonical/d484280cd2597a5337658e9981b38f42
Updated by Nicholas Gordon almost 8 years ago
The draft has been on gerrit for quite a while, and no one has reviewed for some time. Of course the file should be improved over time, but when should we call it "good enough" and merge it?
Updated by Nicholas Gordon over 7 years ago
- Status changed from In Progress to Code review
Updated by Nicholas Gordon over 7 years ago
- Status changed from Code review to Closed
Since we have merged the guide, this will be changed to closed.