You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Pull Request Check List
- [ ] Added **tests** for changed code.
- [ ] Updated **documentation** for changed code.
Bunch of improvements over `Configuration` documentation:
- Better show default value of options
- Add some missing `Introduced in <VERSION>` notes
- Add backticks around types for better readability
Will backport to `1.2` branch before final release.
Copy file name to clipboardExpand all lines: docs/configuration.md
+83-54
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ You can override the Cache directory by setting the `POETRY_CACHE_DIR` environme
147
147
148
148
### `cache-dir`
149
149
150
-
**Type**: string
150
+
**Type**: `string`
151
151
152
152
The path to the cache directory used by Poetry.
153
153
@@ -159,7 +159,9 @@ Defaults to one of the following directories:
159
159
160
160
### `experimental.system-git-client`
161
161
162
-
**Type**: boolean
162
+
**Type**: `boolean`
163
+
164
+
**Default**: `false`
163
165
164
166
*Introduced in 1.2.0*
165
167
@@ -169,33 +171,30 @@ Poetry uses `dulwich` by default for git related tasks to not rely on the availa
169
171
170
172
If you encounter any problems with it, set to `true` to use the system git backend.
171
173
172
-
Defaults to `false`.
173
-
174
-
### `installer.parallel`
175
-
176
-
**Type**: boolean
174
+
### `installer.max-workers`
177
175
178
-
Use parallel execution when using the new (`>=1.1.0`) installer.
179
-
Defaults to `true`.
176
+
**Type**: `int`
180
177
181
-
### `installer.max-workers`
178
+
**Default**: `number_of_cores + 4`
182
179
183
-
**Type**: int
180
+
*Introduced in 1.2.0*
184
181
185
-
Set the maximum number of workers while using the parallel installer. Defaults to `number_of_cores + 4`.
182
+
Set the maximum number of workers while using the parallel installer.
186
183
The `number_of_cores` is determined by `os.cpu_count()`.
187
-
If this raises a `NotImplentedError` exception `number_of_cores` is assumed to be 1.
184
+
If this raises a `NotImplementedError` exception,`number_of_cores` is assumed to be 1.
188
185
189
186
If this configuration parameter is set to a value greater than `number_of_cores + 4`,
190
187
the number of maximum workers is still limited at `number_of_cores + 4`.
191
188
192
189
{{% note %}}
193
-
This configuration will be ignored when `installer.parallel` is set to false.
190
+
This configuration is ignored when `installer.parallel` is set to `false`.
194
191
{{% /note %}}
195
192
196
193
### `installer.no-binary`
197
194
198
-
**Type**: string | bool
195
+
**Type**: `string | boolean`
196
+
197
+
**Default**: `false`
199
198
200
199
*Introduced in 1.2.0*
201
200
@@ -240,22 +239,33 @@ Unless this is required system-wide, if configured globally, you could encounter
240
239
across all your projects if incorrectly set.
241
240
{{% /warning %}}
242
241
242
+
### `installer.parallel`
243
+
244
+
**Type**: `boolean`
245
+
246
+
**Default**: `true`
247
+
248
+
*Introduced in 1.1.4*
249
+
250
+
Use parallel execution when using the new (`>=1.1.0`) installer.
243
251
244
252
### `virtualenvs.create`
245
253
246
-
**Type**: boolean
254
+
**Type**: `boolean`
255
+
256
+
**Default**: `true`
247
257
248
258
Create a new virtual environment if one doesn't already exist.
249
-
Defaults to `true`.
250
259
251
260
If set to `false`, poetry will install dependencies into the current python environment.
252
261
253
262
### `virtualenvs.in-project`
254
263
255
-
**Type**: boolean
264
+
**Type**: `boolean`
265
+
266
+
**Default**: `None`
256
267
257
268
Create the virtualenv inside the project's root directory.
258
-
Defaults to `None`.
259
269
260
270
If not set explicitly, `poetry` by default will create virtual environment under
261
271
`{cache-dir}/virtualenvs` or use the `{project-dir}/.venv` directory when one is available.
@@ -265,35 +275,27 @@ If set to `true`, the virtualenv will be created and expected in a folder named
265
275
266
276
If set to `false`, `poetry` will ignore any existing `.venv` directory.
267
277
268
-
### `virtualenvs.path`
269
-
270
-
**Type**: string
271
-
272
-
Directory where virtual environments will be created.
273
-
Defaults to `{cache-dir}/virtualenvs` (`{cache-dir}\virtualenvs` on Windows).
278
+
### `virtualenvs.options.always-copy`
274
279
275
-
### `virtualenvs.prompt`
280
+
**Type**: `boolean`
276
281
277
-
**Type**: string
282
+
**Default**: `false`
278
283
279
-
Format string defining the prompt to be displayed when the virtual environment is activated.
280
-
The variables `project_name` and `python_version` are available for formatting.
281
-
Defaults to `"{project_name}-py{python_version}"`.
284
+
*Introduced in 1.2.0*
282
285
283
-
### `virtualenvs.options.always-copy`
286
+
If set to `true` the `--always-copy` parameter is passed to `virtualenv` on creation of the virtual environment, so that
287
+
all needed files are copied into it instead of symlinked.
284
288
285
-
**Type**: boolean
289
+
### `virtualenvs.options.no-pip`
286
290
287
-
If set to `true` the `--always-copy` parameter is passed to `virtualenv` on creation of the venv. Thus all needed files are copied into the venv instead of symlinked.
288
-
Defaults to `false`.
291
+
**Type**: `boolean`
289
292
290
-
### `virtualenvs.options.no-pip`
293
+
**Default**: `false`
291
294
292
-
**Type**: boolean
295
+
*Introduced in 1.2.0*
293
296
294
-
If set to `true` the `--no-pip` parameter is passed to `virtualenv` on creation of the venv. This means when a new
295
-
virtual environment is created, `pip` will not be installed in the environment.
296
-
Defaults to `false`.
297
+
If set to `true` the `--no-pip` parameter is passed to `virtualenv` on creation of the virtual environment. This means
298
+
when a new virtual environment is created, `pip` will not be installed in the environment.
297
299
298
300
{{% note %}}
299
301
Poetry, for its internal operations, uses the `pip` wheel embedded in the `virtualenv` package installed as a dependency
@@ -306,12 +308,15 @@ packages. This is desirable for production environments.
306
308
307
309
### `virtualenvs.options.no-setuptools`
308
310
309
-
**Type**: boolean
311
+
**Type**: `boolean`
312
+
313
+
**Default**: `false`
314
+
315
+
*Introduced in 1.2.0*
310
316
311
-
If set to `true` the `--no-setuptools` parameter is passed to `virtualenv` on creation of the venv. This means when a new
312
-
virtual environment is created, `setuptools` will not be installed in the environment. Poetry, for its internal operations,
313
-
does not require `setuptools` and this can safely be set to `true`.
314
-
Defaults to `false`.
317
+
If set to `true` the `--no-setuptools` parameter is passed to `virtualenv` on creation of the virtual environment. This
318
+
means when a new virtual environment is created, `setuptools` will not be installed in the environment. Poetry, for its
319
+
internal operations, does not require `setuptools` and this can safely be set to `true`.
315
320
316
321
{{% warning %}}
317
322
Some development tools like IDEs, make an assumption that `setuptools` (and other) packages are always present and
@@ -320,44 +325,68 @@ available within a virtual environment. This can cause some features in these to
320
325
321
326
### `virtualenvs.options.system-site-packages`
322
327
323
-
**Type**: boolean
328
+
**Type**: `boolean`
329
+
330
+
**Default**: `false`
324
331
325
332
Give the virtual environment access to the system site-packages directory.
326
333
Applies on virtualenv creation.
327
-
Defaults to `false`.
334
+
335
+
### `virtualenvs.path`
336
+
337
+
**Type**: `string`
338
+
339
+
**Default**: `{cache-dir}/virtualenvs`
340
+
341
+
Directory where virtual environments will be created.
0 commit comments