Project

General

Profile

Actions

Task #3898

closed

(All projects) Write documentation for code contribution

Added by Alex Afanasyev over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Docs
Target version:
Start date:
Due date:
% Done:

60%

Estimated time:

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:

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

CODE_OF_CONDUCT.md (3.32 KB) CODE_OF_CONDUCT.md Contributor Covenant adapted with the correct email addresses Nicholas Gordon, 01/04/2017 02:43 PM
CONTRIBUTING.md (13.6 KB) CONTRIBUTING.md Draft 1 of the contributing documentation Nicholas Gordon, 01/04/2017 02:43 PM
Actions #1

Updated by Alex Afanasyev over 7 years ago

  • Assignee set to Nicholas Gordon
Actions #2

Updated by Davide Pesavento over 7 years ago

  • Subject changed from (All projects) Write documenation for code contribution to (All projects) Write documentation for code contribution
Actions #3

Updated by Nicholas Gordon over 7 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:

  1. What email should I put into the code of conduct as a contact to report abuse?
  2. 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.
  3. 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.

Actions #4

Updated by Alex Afanasyev over 7 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:

  1. What email should I put into the code of conduct as a contact to report abuse?

Lixia's, Beichuan's, and mine

  1. 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)

  1. 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 over 7 years ago

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:

  1. We have a few projects that are not written in C++. Do we have styleguides for them? (Python and JavaScript, if I recall)
  2. At what point should tests be written? What is the "official" decision about when a segment of code needs a test?
Actions #6

Updated by Alex Afanasyev over 7 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:

  1. 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?).

  1. 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.

Actions #7

Updated by Junxiao Shi over 7 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:

  1. When you start working on an issue, change "Status" field to "In Progress".
  2. When you make progress, update "% Done" field.
  3. 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.

Actions #8

Updated by susmit shannigrahi over 7 years ago

  1. 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?

Actions #9

Updated by Alex Afanasyev over 7 years ago

I would use personal emails for this

Actions #10

Updated by Alex Afanasyev over 7 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:

  1. When you start working on an issue, change "Status" field to "In Progress".
  2. When you make progress, update "% Done" field.
  3. 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.

Actions #11

Updated by Alex Afanasyev over 7 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.

Actions #12

Updated by Nicholas Gordon over 7 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).

Actions #13

Updated by Nicholas Gordon over 7 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

Actions #14

Updated by Nicholas Gordon about 7 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?

Actions #15

Updated by Nicholas Gordon almost 7 years ago

  • Status changed from In Progress to Code review
Actions #16

Updated by Nicholas Gordon over 6 years ago

  • Status changed from Code review to Closed

Since we have merged the guide, this will be changed to closed.

Actions

Also available in: Atom PDF