forked from pescheckit/python-gpt-po
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
146 lines (124 loc) · 3.78 KB
/
pyproject.toml
File metadata and controls
146 lines (124 loc) · 3.78 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[build-system]
requires = ["setuptools>=61.0", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
# Use find with namespaces=True to handle nested packages
packages = { find = { exclude = ["*.__pycache__", "*.__pycache__.*"], namespaces = true } }
[tool.setuptools_scm]
fallback_version = "1.0.0"
write_to = "python_gpt_po/_version.py"
[project]
name = "gpt-po-translator"
dynamic = ["version"]
authors = [
{name = "Bram Mittendorff", email = "bram@pescheck.io"},
]
description = "A CLI tool for translating .po files using GPT models."
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
dependencies = [
"polib==1.2.0",
"openai==1.99.9",
"python-dotenv==1.0.1",
"pytest==8.3.4",
"tenacity==9.0.0",
"setuptools-scm==8.1.0",
"pycountry==24.6.1",
"anthropic==0.63.0",
"requests==2.32.3",
"responses==0.25.8",
"isort==5.13.2",
"tomli==2.2.1",
"claude-agent-sdk>=0.1.0",
"tiktoken==0.12.0",
"genai-prices==0.0.51",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Topic :: Software Development :: Internationalization",
"Topic :: Software Development :: Localization",
"Topic :: Text Processing :: Linguistic",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Natural Language :: English",
"Natural Language :: Dutch",
"Environment :: Console",
"Typing :: Typed"
]
[project.scripts]
gpt-po-translator = "python_gpt_po.main:main"
[tool.isort]
line_length = 120
[tool.gpt-po-translator]
# Configuration for gpt-po-translator
# ===== FILE SCANNING =====
# Whether to respect .gitignore files (enabled by default)
respect_gitignore = true
# Additional patterns to ignore (beyond .gitignore)
ignore_patterns = [
"*.pyc",
"__pycache__/",
"*.egg-info/",
".pytest_cache/",
".coverage",
".tox/",
".mypy_cache/",
"htmlcov/",
]
# Default patterns that are always ignored (can be overridden by setting to empty list)
default_ignore_patterns = [
".git/",
".venv/",
"venv/",
"env/",
".env/",
"node_modules/",
".cache/",
"build/",
"dist/",
"*.egg-info/",
"__pycache__/",
".pytest_cache/",
".tox/",
".mypy_cache/",
]
# ===== TRANSLATION BEHAVIOR =====
# Default verbosity level (0=WARNING, 1=INFO, 2=DEBUG)
default_verbosity = 1
# Default batch size for bulk mode
default_batch_size = 50
# Enable bulk mode by default
default_bulk_mode = false
# Whether to mark AI-generated translations with comments by default
mark_ai_generated = true
# Whether to use folder-based language detection by default
folder_language_detection = false
# Whether to fix fuzzy entries by default
fix_fuzzy_entries = false
# ===== PROVIDER DEFAULTS =====
# Default provider to use if multiple API keys are available
# Options: "openai", "anthropic", "groq", "together", "xai"
# default_provider = "openai"
# Default models for each provider (will be used if no model is specified)
default_models = { openai = "gpt-4o-mini", anthropic = "claude-3-5-sonnet-20241022" }
# ===== PERFORMANCE =====
# Maximum retries for failed translations
max_retries = 3
# Timeout for API requests (seconds)
request_timeout = 120
# ===== OUTPUT =====
# Skip files that are already fully translated
skip_translated_files = true
# Show progress indicators during translation
show_progress = true
# Show detailed summary at the end
show_summary = true