Skip to content

Commit 681558c

Browse files
Reworked this paragraph to remove the parenthesis from this phrase:
"...project. (For example, see the CONTRIBUTING.md file for the core TensorFlow repo.) All code..." PiperOrigin-RevId: 430533775
1 parent 3a4ab49 commit 681558c

File tree

1 file changed

+68
-31
lines changed
  • site/en/community/contribute

1 file changed

+68
-31
lines changed

site/en/community/contribute/code.md

Lines changed: 68 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@ you get started. Thank you for work and interest in improving TensorFlow.
66

77
## Before you get started
88

9-
Before you contribute source code to a TensorFlow project, please review the `CONTRIBUTING.md` file in the GitHub repo of the project. (For example, see the
10-
[CONTRIBUTING.md file for the core TensorFlow repo](https://github.com/tensorflow/tensorflow/blob/master/CONTRIBUTING.md).) All code contributors are required to sign a [Contributor License Agreement](https://cla.developers.google.com/clas) (CLA).
11-
12-
To avoid duplicating work, please review [current](https://github.com/tensorflow/community/tree/master/rfcs) or [proposed](https://github.com/tensorflow/community/labels/RFC%3A%20Proposed) RFCs and contact the developers on the TensorFlow forums ([[email protected]](https://groups.google.com/u/1/a/tensorflow.org/g/developers)) before you start work on a non-trivial feature. We are somewhat selective when deciding to add new functionality, and the best way to contribute and help the project is to work on known issues.
9+
Before you contribute source code to a TensorFlow project, please review the
10+
`CONTRIBUTING.md` file in the GitHub repo of the project. For example, see the
11+
[CONTRIBUTING.md](https://github.com/tensorflow/tensorflow/blob/master/CONTRIBUTING.md)
12+
file in the core TensorFlow repo. All code contributors are required to sign a
13+
[Contributor License Agreement](https://cla.developers.google.com/clas) (CLA).
14+
15+
To avoid duplicating work, please review
16+
[current](https://github.com/tensorflow/community/tree/master/rfcs) or
17+
[proposed](https://github.com/tensorflow/community/labels/RFC%3A%20Proposed)
18+
RFCs and contact the developers on the TensorFlow forums
19+
([[email protected]](https://groups.google.com/u/1/a/tensorflow.org/g/developers))
20+
before you start work on a non-trivial feature. We are somewhat selective when
21+
deciding to add new functionality, and the best way to contribute and help the
22+
project is to work on known issues.
1323

1424
## Issues for new contributors
1525

@@ -22,14 +32,20 @@ workflow, and for the core devs to become acquainted with the contributor.
2232
- [good first issue](https://github.com/tensorflow/tensorflow/labels/good%20first%20issue)
2333
- [contributions welcome](https://github.com/tensorflow/tensorflow/labels/stat%3Acontributions%20welcome)
2434

25-
If you are interested in recruiting a team to help tackle a large-scale problem or a new feature, please email the [developers@ group](https://groups.google.com/a/tensorflow.org/forum/#!forum/developers) and review our current list of RFCs.
26-
35+
If you are interested in recruiting a team to help tackle a large-scale problem
36+
or a new feature, please email the
37+
[developers@ group](https://groups.google.com/a/tensorflow.org/forum/#!forum/developers)
38+
and review our current list of RFCs.
2739

2840
## Code review
2941

30-
New features, bug fixes, and any other changes to the code base are subject to code review.
42+
New features, bug fixes, and any other changes to the code base are subject to
43+
code review.
3144

32-
Reviewing code contributed to the project as pull requests is a crucial component of TensorFlow development. We encourage anyone to start reviewing code submitted by other developers, especially if the feature is something that you are likely to use.
45+
Reviewing code contributed to the project as pull requests is a crucial
46+
component of TensorFlow development. We encourage anyone to start reviewing code
47+
submitted by other developers, especially if the feature is something that you
48+
are likely to use.
3349

3450
Here are some questions to keep in mind during the code review process:
3551

@@ -44,36 +60,47 @@ Here are some questions to keep in mind during the code review process:
4460

4561
## Test and improve test coverage
4662

47-
High-quality unit testing is a corner-stone of the TensorFlow development process. For this purpose, we use Docker images. The test functions are appropriately named, and are responsible for checking the validity of algorithms as well as different options of the code.
63+
High-quality unit testing is a corner-stone of the TensorFlow development
64+
process. For this purpose, we use Docker images. The test functions are
65+
appropriately named, and are responsible for checking the validity of algorithms
66+
as well as different options of the code.
4867

49-
All new features and bug fixes *must* include adequate test coverage. We also welcome contributions of new test cases or improvements to existing tests. If you discover that our existing tests are not complete — even if that is not currently causing a bug — please file an issue and, if possible, a pull request.
68+
All new features and bug fixes *must* include adequate test coverage. We also
69+
welcome contributions of new test cases or improvements to existing tests. If
70+
you discover that our existing tests are not complete — even if that is not
71+
currently causing a bug — please file an issue and, if possible, a pull request.
5072

51-
For the specific details of testing procedures in each TensorFlow project, see the `README.md` and `CONTRIBUTING.md` files in the project repo on GitHub.
73+
For the specific details of testing procedures in each TensorFlow project, see
74+
the `README.md` and `CONTRIBUTING.md` files in the project repo on GitHub.
5275

5376
Of particular concerns in *adequate testing*:
5477

55-
* Is *every public function and class* tested?
56-
* Are a *reasonable set of parameters*, their values, value types, and combinations tested?
57-
* Do the tests validate that the *code is correct*, and that it is *doing what the documentation says* the code is intended to do?
78+
* Is *every public function and class* tested?
79+
* Are a *reasonable set of parameters*, their values, value types, and
80+
combinations tested?
81+
* Do the tests validate that the *code is correct*, and that it is *doing what
82+
the documentation says* the code is intended to do?
5883
* If the change is a bug fix, is a *non-regression test* included?
5984
* Do the tests *pass the continuous integration* build?
60-
* Do the tests *cover every line of code?* If not, are the exceptions reasonable and explicit?
61-
62-
If you find any problems, please consider helping the contributor understand those problems and resolve them.
85+
* Do the tests *cover every line of code?* If not, are the exceptions
86+
reasonable and explicit?
6387

88+
If you find any problems, please consider helping the contributor understand
89+
those problems and resolve them.
6490

6591
## Improve error messages or logs
6692

67-
We welcome contributions that improve error messages and logging.
68-
93+
We welcome contributions that improve error messages and logging.
6994

7095
## Contribution workflow
7196

72-
Code contributions—bug fixes, new development, test improvement—all follow a GitHub-centered workflow. To participate in TensorFlow development, set up a GitHub account. Then:
97+
Code contributions—bug fixes, new development, test improvement—all follow a
98+
GitHub-centered workflow. To participate in TensorFlow development, set up a
99+
GitHub account. Then:
73100

74-
1. Fork the repo you plan to work on.
75-
Go to the project repo page and use the *Fork* button. This will create a copy of the
76-
repo, under your username. (For more details on how to fork a repository see
101+
1. Fork the repo you plan to work on. Go to the project repo page and use the
102+
*Fork* button. This will create a copy of the repo, under your username.
103+
(For more details on how to fork a repository see
77104
[this guide](https://help.github.com/articles/fork-a-repo/).)
78105

79106
2. Clone down the repo to your local system.
@@ -96,29 +123,39 @@ Code contributions—bug fixes, new development, test improvement—all follow a
96123

97124
`$ git push origin branch-name`
98125

99-
7. Open a *Pull Request* (PR). Go to the original project repo on GitHub. There will be a message about your recently pushed branch, asking if you would like to open a pull request. Follow the prompts, *compare across repositories*, and submit the PR. This will send an email to the committers. You may want to consider sending an email to the mailing list for more visibility. (For more details, see the [GitHub guide on PRs](https://help.github.com/articles/creating-a-pull-request-from-a-fork).
126+
7. Open a *Pull Request* (PR). Go to the original project repo on GitHub. There
127+
will be a message about your recently pushed branch, asking if you would
128+
like to open a pull request. Follow the prompts, *compare across
129+
repositories*, and submit the PR. This will send an email to the committers.
130+
You may want to consider sending an email to the mailing list for more
131+
visibility. (For more details, see the
132+
[GitHub guide on PRs](https://help.github.com/articles/creating-a-pull-request-from-a-fork).
100133

101-
8. Maintainers and other contributors will *review your PR*. Please participate in the conversation, and try to *make any requested changes*. Once the PR is approved, the code will be merged.
134+
8. Maintainers and other contributors will *review your PR*. Please participate
135+
in the conversation, and try to *make any requested changes*. Once the PR is
136+
approved, the code will be merged.
102137

103-
*Before working on your next contribution*, make sure your local repository is up to date.
138+
*Before working on your next contribution*, make sure your local repository is
139+
up to date.
104140

105-
1. Set the upstream remote. (You only have to do this once per project, not every time.)
141+
1. Set the upstream remote. (You only have to do this once per project, not
142+
every time.)
106143

107144
`$ git remote add upstream [email protected]:tensorflow/project-repo-name`
108145

109-
2. Switch to the local master branch.
146+
2. Switch to the local master branch.
110147

111148
`$ git checkout master`
112149

113-
3. Pull down the changes from upstream.
150+
3. Pull down the changes from upstream.
114151

115152
`$ git pull upstream master`
116153

117-
4. Push the changes to your GitHub account. (Optional, but a good practice.)
154+
4. Push the changes to your GitHub account. (Optional, but a good practice.)
118155

119156
`$ git push origin master`
120157

121-
5. Create a new branch if you are starting new work.
158+
5. Create a new branch if you are starting new work.
122159

123160
`$ git checkout -b branch-name`
124161

0 commit comments

Comments
 (0)