@@ -42,7 +42,7 @@ and **those settings live in your repository**.
42
42
A configuration file with explicit dependencies looks like this:
43
43
44
44
.. code-block :: yaml
45
-
45
+
46
46
# File: .readthedocs.yaml
47
47
48
48
version : 2
@@ -85,7 +85,7 @@ for example:
85
85
and its dependencies using a requirements file.
86
86
87
87
.. code-block :: yaml
88
-
88
+
89
89
# File: .readthedocs.yaml
90
90
91
91
version : 2
@@ -106,7 +106,7 @@ for example:
106
106
Your project is relying on the default Python version and default installed dependencies.
107
107
108
108
.. code-block :: yaml
109
-
109
+
110
110
# File: .readthedocs.yaml
111
111
112
112
version : 2
@@ -134,7 +134,7 @@ Some examples:
134
134
readthedocs-sphinx-search==0.1.1
135
135
136
136
.. code-block :: yaml
137
-
137
+
138
138
# File: docs/environment.yaml
139
139
140
140
name : docs
@@ -143,7 +143,7 @@ Some examples:
143
143
- defaults
144
144
dependencies :
145
145
- sphinx==4.2.0
146
- - nbsphinx==0.8.1
146
+ - nbsphinx==0.8.1
147
147
- pip :
148
148
- sphinx_rtd_theme==1.0.0
149
149
@@ -160,7 +160,7 @@ Some examples:
160
160
readthedocs-sphinx-search
161
161
162
162
.. code-block :: yaml
163
-
163
+
164
164
# File: docs/environment.yaml
165
165
166
166
name : docs
@@ -182,3 +182,89 @@ or our Conda docs about :ref:`environment files <guides/conda:creating the \`\`e
182
182
183
183
Remember to update your docs' dependencies from time to time to get new improvements and fixes.
184
184
It also makes it easy to manage in case a version reaches its end of support date.
185
+
186
+
187
+ Pinning transitive dependencies
188
+ -------------------------------
189
+
190
+ Once you have pinned your own dependencies,
191
+ the next thing to worry about are the additional dependencies of these projects.
192
+ Transitive dependencies are these extra dependencies.
193
+
194
+ We recommend `pip-tools `_ to help address this problem.
195
+ It allows you to specify a ``requirements.in `` file with your first-level dependencies,
196
+ and it generates a ``requirementes.txt `` file with the full set of transitive dependencies.
197
+
198
+ .. _pip-tools : https://pip-tools.readthedocs.io/en/latest/
199
+
200
+ ✅ Good:
201
+ All your transitive dependencies will stay defined,
202
+ not allowing a package upgrade to break your docs.
203
+
204
+ .. code-block ::
205
+
206
+ # File: docs/requirements.in
207
+
208
+ sphinx==4.2.0
209
+
210
+ .. code-block :: yaml
211
+
212
+ # File: docs/requirements.txt
213
+
214
+ # This file is autogenerated by pip-compile with python 3.7
215
+ # To update, run:
216
+ #
217
+ # pip-compile docs.in
218
+ #
219
+ alabaster==0.7.12
220
+ # via sphinx
221
+ babel==2.10.1
222
+ # via sphinx
223
+ certifi==2021.10.8
224
+ # via requests
225
+ charset-normalizer==2.0.12
226
+ # via requests
227
+ docutils==0.17.1
228
+ # via sphinx
229
+ idna==3.3
230
+ # via requests
231
+ imagesize==1.3.0
232
+ # via sphinx
233
+ importlib-metadata==4.11.3
234
+ # via sphinx
235
+ jinja2==3.1.2
236
+ # via sphinx
237
+ markupsafe==2.1.1
238
+ # via jinja2
239
+ packaging==21.3
240
+ # via sphinx
241
+ pygments==2.11.2
242
+ # via sphinx
243
+ pyparsing==3.0.8
244
+ # via packaging
245
+ pytz==2022.1
246
+ # via babel
247
+ requests==2.27.1
248
+ # via sphinx
249
+ snowballstemmer==2.2.0
250
+ # via sphinx
251
+ sphinx==4.4.0
252
+ # via -r docs.in
253
+ sphinxcontrib-applehelp==1.0.2
254
+ # via sphinx
255
+ sphinxcontrib-devhelp==1.0.2
256
+ # via sphinx
257
+ sphinxcontrib-htmlhelp==2.0.0
258
+ # via sphinx
259
+ sphinxcontrib-jsmath==1.0.1
260
+ # via sphinx
261
+ sphinxcontrib-qthelp==1.0.3
262
+ # via sphinx
263
+ sphinxcontrib-serializinghtml==1.1.5
264
+ # via sphinx
265
+ typing-extensions==4.2.0
266
+ # via importlib-metadata
267
+ urllib3==1.26.9
268
+ # via requests
269
+ zipp==3.8.0
270
+ # via importlib-metadata
0 commit comments