-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
107 lines (93 loc) · 3.21 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[project]
name = "Pytho-FastDTM"
version = "0.1.0"
description = "_unofficial implementation of Scaling up Dynamic Topic Model"
authors = [{ name = "kaki005", email = "u097498f@ecs.osaka-u.ac.jp" }]
dependencies = [
"wandb>=0.17.6",
"numpy>=2.0.1",
"matplotlib>=3.9.1.post1",
"hydra-core>=1.3.2",
"scikit-learn>=1.5.1",
"omegaconf>=2.3.0",
"seaborn>=0.13.2",
"dataclasses-json>=0.6.7",
"pandas>=2.2.2",
"tensorly>=0.8.1",
"utilpy @ git+https://github.com/kaki005/PythonUtils.git",
"rich>=13.9.4",
"equinox>=0.11.10",
"jaxtyping>=0.2.36",
"polyagamma>=2.0.1",
]
readme = "README.md"
requires-python = ">= 3.10"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = ["pre-commit>=3.8.0", "ruff>=0.8.0"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/models"]
[tool.ruff]
# 1行の最大文字数
line-length = 120
[tool.ruff.lint]
# チェックするエラーの種類
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
fixable = ["ALL"]
# 除外するエラーの種類
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"W191", # indentation contains tabs
"B904", # raise ... from ... になっていない場合のエラーを無視
"F401", # imported but not used
"UP008",
"B007",
"F722", # for jaxtyping
"F821", # for jaxtyping
]
logger-objects = ["logging.Logger"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores] # ファイルごとのエラー除外
"__init__.py" = ["F401"]
# isort の設定
[tool.ruff.lint.isort]
known-third-party = []
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true # Python3.8互換のための設定
[tool.ruff.lint.mccabe]
max-complexity = 5
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
strict = false
disallow_untyped_calls = false
check_untyped_defs = false
allow_redefinition = true
show_error_context = true # エラー時のメッセージを詳細表示
show_column_numbers = true # エラー発生箇所の行数/列数を表示
ignore_missing_imports = true # import 先のチェックを行わない (デフォルトだとサードパーティーライブラリまでチェックする)
disallow_untyped_defs = false # 関数定義の引数/戻り値に型アノテーション必須
no_implicit_optional = true # デフォルト引数に None を取る場合型アノテーションに Optional 必須
warn_return_any = true # 戻り値が Any 型ではない関数の戻り値の型アノテーションが Any のとき警告
# ※ `# type: ignore` が付与されている箇所は mypy のエラーを無視出来る
# warn_unused_ignores = true # mypy エラーに該当しない箇所に `# type: ignore` コメントが付与されていたら警告
warn_redundant_casts = true # 冗長なキャストに警告