@@ -17,7 +17,7 @@ maintainable documentation.
17
17
Use ` pip ` to install the latest ` tensorflow-docs ` package directly from the
18
18
[ tensorflow/docs] ( https://github.com/tensorflow/docs ) GitHub repository:
19
19
20
- ```
20
+ ``` shell
21
21
$ python3 -m pip install -U --user git+https://github.com/tensorflow/docs
22
22
```
23
23
@@ -31,7 +31,7 @@ uses opinionated defaults with a preference for the TensorFlow docs Colab
31
31
workflow. To format a notebook, install the ` tensorflow-docs ` package and run
32
32
the ` nbfmt ` tool:
33
33
34
- ```
34
+ ``` shell
35
35
$ python3 -m tensorflow_docs.tools.nbfmt [options] notebook.ipynb [...]
36
36
37
37
$ python3 -m tensorflow_docs.tools.nbfmt --help
@@ -70,12 +70,12 @@ repos:
70
70
71
71
Someone who clones that repo for development would then install the hook with:
72
72
73
- ```
73
+ ``` shell
74
74
# Install pre-commit framework
75
- pip3 install pre-commit
75
+ $ pip3 install pre-commit
76
76
77
77
# Install hooks
78
- pre-commit install
78
+ $ pre-commit install
79
79
```
80
80
81
81
## nblint
@@ -84,7 +84,7 @@ A notebook linting tool that checks documentation style rules. Used to catch
84
84
common errors and useful for CI tests. To lint a notebook, install the
85
85
` tensorflow-docs ` package and run the ` nblint ` tool:
86
86
87
- ```
87
+ ``` shell
88
88
$ python3 -m tensorflow_docs.tools.nblint [options] notebook.ipynb [...]
89
89
90
90
$ python3 -m tensorflow_docs.tools.nblint --fix [options] notebook.ipynb [...]
@@ -95,7 +95,7 @@ $ python3 -m tensorflow_docs.tools.nblint --help
95
95
Some styles require a user-defined argument passed at the command-line. For
96
96
example, the ` tensorflow ` style (default) uses the ` repo ` argument to check links:
97
97
98
- ```
98
+ ``` shell
99
99
$ python3 -m tensorflow_docs.tools.nblint --arg=repo:tensorflow/docs notebook.ipynb
100
100
```
101
101
@@ -105,7 +105,7 @@ are collected into
105
105
` nblint ` tests the ` google ` and ` tensorflow ` styles by default, and different
106
106
styles can be set with the ` --styles ` option:
107
107
108
- ```
108
+ ``` shell
109
109
$ python3 -m tensorflow_docs.tools.nblint \
110
110
--styles=tensorflow,tensorflow_docs_l10n --arg=repo:tensorflow/docs-1l0n \
111
111
notebook.ipynb
@@ -114,7 +114,7 @@ $ python3 -m tensorflow_docs.tools.nblint \
114
114
A style module may contain some lint checks that do not fit your project. You
115
115
can exclude specific lint checks with the ` --exclude_lint ` option:
116
116
117
- ```
117
+ ``` shell
118
118
$ python3 -m tensorflow_docs.tools.nblint \
119
119
--styles=tensorflow --arg=repo:community/repo-name \
120
120
--exclude_lint=tensorflow::copyright_check \
@@ -124,7 +124,7 @@ $ python3 -m tensorflow_docs.tools.nblint \
124
124
125
125
Some lint errors can be automatically fixed in the notebook file:
126
126
127
- ```
127
+ ``` shell
128
128
$ python3 -m tensorflow_docs.tools.nblint --fix \
129
129
--arg=repo:tensorflow/docs notebook.ipynb
130
130
```
0 commit comments