Fill in authors filed during uv init (#7756)

## Summary

Fill in the `authors` field of `pyproject.toml` by fetching author info
from Git.

Resolves #7718
This commit is contained in:
Jo 2024-10-09 03:06:37 +08:00 committed by GitHub
parent 56521937b7
commit 15e5e3f6af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 288 additions and 11 deletions

View file

@ -440,6 +440,19 @@ uv init [OPTIONS] [PATH]
<p>By default, an application is not intended to be built and distributed as a Python package. The <code>--package</code> option can be used to create an application that is distributable, e.g., if you want to distribute a command-line interface via PyPI.</p>
</dd><dt><code>--author-from</code> <i>author-from</i></dt><dd><p>Fill in the <code>authors</code> field in the <code>pyproject.toml</code>.</p>
<p>By default, uv will attempt to infer the author information from some sources (e.g., Git) (<code>auto</code>). Use <code>--author-from git</code> to only infer from Git configuration. Use <code>--author-from none</code> to avoid inferring the author information.</p>
<p>Possible values:</p>
<ul>
<li><code>auto</code>: Fetch the author information from some sources (e.g., Git) automatically</li>
<li><code>git</code>: Fetch the author information from Git configuration only</li>
<li><code>none</code>: Do not infer the author information</li>
</ul>
</dd><dt><code>--cache-dir</code> <i>cache-dir</i></dt><dd><p>Path to the cache directory.</p>
<p>Defaults to <code>$HOME/Library/Caches/uv</code> on macOS, <code>$XDG_CACHE_HOME/uv</code> or <code>$HOME/.cache/uv</code> on Linux, and <code>%LOCALAPPDATA%\uv\cache</code> on Windows.</p>