Project templates¶
新しいプロジェクトの作成方法は、newコマンドでHatchのconfig fileを使用して制御できます。
Author¶
[template]
name = "..."
email = "..."
Licenses¶
[template.licenses]
headers = true
default = [
"MIT",
]
ライセンスのリストは、SPDX identifiersで構成する必要があります。複数のライセンスが指定されている場合、それらはLICENSESディレクトリに配置されます。
Options¶
Tests¶
これにより、テストとリンティングのための環境を含むtests
ディレクトリが追加されます。
[template.plugins.default]
tests = true
CI¶
これにより、最新バージョンのPythonを使用してすべてのプラットフォームでテストを実行するGitHub Actions workflowが追加される。
[template.plugins.default]
ci = false
src
layout¶
this blog postを参照してください。
[template.plugins.default]
src-layout = true
Feature flags¶
Command line interface¶
--cli
フラグは、python -m <PKG_NAME>
で呼び出すこともでき、Click(https://github.com/)に裏打ちされたCLIを追加します。