File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,44 @@ Adding a new guide often involves lots of detailed reviews and we want to make s
35
35
When you're ready, start by using the [ notebook
36
36
template] ( ./quickstarts/Template.ipynb ) and following the guidance within.
37
37
38
+ Before submitting your notebook, it's recommended to run linting and formatting tools locally to ensure consistency and adherence to style guidelines.
39
+
40
+ 1 . Install Dependencies:
41
+
42
+ First, install the necessary packages using pip:
43
+
44
+ ``` bash
45
+ pip install -U tensorflow-docs
46
+ ```
47
+
48
+ 2 . Format the Notebook:
49
+
50
+ Use the nbfmt tool from tensorflow-docs to automatically format your notebook:
51
+
52
+ ```
53
+ python -m tensorflow_docs.tools.nbfmt path/to/notebook
54
+ ```
55
+
56
+ Replace ` path/to/notebook ` with the actual path to your notebook file.
57
+
58
+ 3 . Lint the Notebook:
59
+
60
+ Use the nblint tool to check for style and consistency issues:
61
+
62
+ ```
63
+ python -m tensorflow_docs.tools.nblint \
64
+ --styles=google,tensorflow \
65
+ --arg=repo:google-gemini/cookbook \
66
+ --arg=branch:main \
67
+ --exclude_lint=tensorflow::button_download \
68
+ --exclude_lint=tensorflow::button_website \
69
+ --arg=base_url:https://ai.google.dev/ \
70
+ --exclude_lint=tensorflow::button_github \
71
+ path/to/notebook
72
+ ```
73
+
74
+ Replace ` path/to/notebook ` with the actual path to your notebook file.
75
+
38
76
## Things we consider
39
77
40
78
When accepting a new guide, we want to balance a few aspects.
You can’t perform that action at this time.
0 commit comments