Project templates¶プロジェクトテンプレート¶
You can control how new projects are created by the new command using Hatch's config file.Hatchのconfig fileを使用して、newコマンドによって新しいプロジェクトの作成方法を制御できます。
Author¶著者¶
[template]
name = "..."
email = "..."
Licenses¶ライセンス¶
[template.licenses]
headers = true
default = [
"MIT",
]
The list of licenses should be composed of SPDX identifiers. If multiple licenses are specified, then they will be placed in a LICENSES directory.ライセンスのリストは、SPDX identifiersで構成されるべきです。複数のライセンスが指定されている場合、それらはLICENSESディレクトリに配置されます。
Options¶オプション¶
Tests¶テスト¶
This adds a tests directory with environments for testing and linting.これにより、テストとリンティング用の環境を持つtestsディレクトリが追加されます。
[template.plugins.default]
tests = true
CI¶CI¶
This adds a GitHub Actions workflow that runs tests on all platforms using modern versions of Python.これにより、最新のPythonバージョンを使用してすべてのプラットフォームでテストを実行するGitHub Actions workflowが追加されます。
[template.plugins.default]
ci = false
src layout¶src レイアウト¶
See this blog post.このブログ記事を参照してください。
[template.plugins.default]
src-layout = true
Feature flags¶フィーチャーフラグ¶
Command line interface¶コマンドラインインターフェース¶
The --cli flag adds a CLI backed by Click that can also be invoked with python -m <PKG_NAME>.--cli フラグは、Click に基づいたCLIを追加し、python -m <PKG_NAME> で呼び出すこともできます。