Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 764050f

Browse files
authored
Edit "API documentation guidelines" section.
Reference Swift API Design Guidelines: https://swift.org/documentation/api-design-guidelines/#write-doc-comment
1 parent 9af53e8 commit 764050f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,19 @@ Changes should conform to:
6868

6969
With the exception that 4-space indendation be used.
7070

71-
#### API documentation contribution guidelines
71+
#### API documentation guidelines
7272

73-
* For APIs ported from Python TensorFlow, adopt the API documentation from [tensorflow.org/api_docs](https://www.tensorflow.org/api_docs) as a starting point.
74-
- If required, replace variable names from Python docs to reflect the Swift code.
75-
For example: `y_true` and `y_predict` in TensorFlow 2.x API docs will become
76-
`expected` and `predicted` in Swift for TensorFlow, respectively.
73+
API documentation should follow guidelines from the
74+
["Write a documentation comment"](https://swift.org/documentation/api-design-guidelines/#write-doc-comment)
75+
section of the Swift API Design Guidelines:
76+
77+
> * Use Swift’s [dialect of Markdown](https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_markup_formatting_ref).
78+
> * **Begin with a summary** that describes the entity being declared. Often, an API can be completely understood from its declaration and its summary.
79+
> * **Optionally, continue** with one or more paragraphs and bullet items. Paragraphs are separated by blank lines and use complete sentences.
80+
81+
For APIs ported from Python TensorFlow, use the API documentation from
82+
[tensorflow.org/api_docs](https://www.tensorflow.org/api_docs) (e.g. function
83+
parameter descriptions) as a starting point.
7784

7885
## Community
7986

0 commit comments

Comments
 (0)