139 lines
2.8 KiB
TOML
139 lines
2.8 KiB
TOML
|
|
[build-system]
|
||
|
|
requires = ["setuptools>=68.0", "wheel"]
|
||
|
|
build-backend = "setuptools.build_meta"
|
||
|
|
|
||
|
|
[project]
|
||
|
|
name = "article-replace-batch"
|
||
|
|
version = "1.0.0"
|
||
|
|
description = "文章批量处理工具 - 支持文章提取、AI改写、图片处理"
|
||
|
|
readme = "README.md"
|
||
|
|
requires-python = ">=3.10"
|
||
|
|
license = {text = "MIT"}
|
||
|
|
authors = [
|
||
|
|
{name = "ArticleReplace Team"}
|
||
|
|
]
|
||
|
|
keywords = ["article", "ai", "rewrite", "batch"]
|
||
|
|
classifiers = [
|
||
|
|
"Development Status :: 4 - Beta",
|
||
|
|
"Intended Audience :: Developers",
|
||
|
|
"License :: OSI Approved :: MIT License",
|
||
|
|
"Programming Language :: Python :: 3",
|
||
|
|
"Programming Language :: Python :: 3.10",
|
||
|
|
"Programming Language :: Python :: 3.11",
|
||
|
|
"Programming Language :: Python :: 3.12",
|
||
|
|
]
|
||
|
|
|
||
|
|
dependencies = [
|
||
|
|
"beautifulsoup4>=4.12.3",
|
||
|
|
"Pillow>=10.2.0",
|
||
|
|
"python-docx>=1.1.0",
|
||
|
|
"requests>=2.31.0",
|
||
|
|
"PySimpleGUI>=4.60.5",
|
||
|
|
"customtkinter>=5.2.0",
|
||
|
|
"pandas>=2.0.0",
|
||
|
|
"openpyxl>=3.1.0",
|
||
|
|
"selenium>=4.15.0",
|
||
|
|
"webdriver-manager>=4.0.0",
|
||
|
|
"html2docx>=1.5.0",
|
||
|
|
"markdown-it-py>=3.0.0",
|
||
|
|
"python-dotenv>=1.0.0",
|
||
|
|
"certifi>=2023.0.0",
|
||
|
|
]
|
||
|
|
|
||
|
|
[project.optional-dependencies]
|
||
|
|
dev = [
|
||
|
|
"pytest>=7.4.0",
|
||
|
|
"pytest-cov>=4.1.0",
|
||
|
|
"pytest-mock>=3.12.0",
|
||
|
|
"pytest-asyncio>=0.21.0",
|
||
|
|
"pytest-benchmark>=4.0.0",
|
||
|
|
"black>=23.0.0",
|
||
|
|
"isort>=5.12.0",
|
||
|
|
"flake8>=6.1.0",
|
||
|
|
"mypy>=1.7.0",
|
||
|
|
"pylint>=3.0.0",
|
||
|
|
]
|
||
|
|
build = [
|
||
|
|
"pyinstaller>=6.0.0",
|
||
|
|
"upx>=4.0.0",
|
||
|
|
]
|
||
|
|
docs = [
|
||
|
|
"sphinx>=7.0.0",
|
||
|
|
"myst-parser>=2.0.0",
|
||
|
|
]
|
||
|
|
|
||
|
|
[project.scripts]
|
||
|
|
article-replace = "ArticleReplace:main"
|
||
|
|
article-replace-cli = "cli:main"
|
||
|
|
|
||
|
|
[tool.setuptools]
|
||
|
|
package-dir = {"" = "."}
|
||
|
|
packages = ["."]
|
||
|
|
|
||
|
|
[tool.setuptools.package-data]
|
||
|
|
"*" = ["*.json", "*.ini", "*.txt"]
|
||
|
|
|
||
|
|
[tool.pytest.ini_options]
|
||
|
|
testpaths = ["tests"]
|
||
|
|
python_files = ["test_*.py"]
|
||
|
|
python_classes = ["Test*"]
|
||
|
|
python_functions = ["test_*"]
|
||
|
|
addopts = "-v --strict-markers"
|
||
|
|
|
||
|
|
[tool.black]
|
||
|
|
line-length = 100
|
||
|
|
target-version = ['py310', 'py311', 'py312']
|
||
|
|
include = '\.pyi?$'
|
||
|
|
extend-exclude = '''
|
||
|
|
/(
|
||
|
|
# directories
|
||
|
|
\.eggs
|
||
|
|
| \.git
|
||
|
|
| \.hg
|
||
|
|
| \.mypy_cache
|
||
|
|
| \.tox
|
||
|
|
| \.venv
|
||
|
|
| build
|
||
|
|
| dist
|
||
|
|
| __pycache__
|
||
|
|
)/
|
||
|
|
'''
|
||
|
|
|
||
|
|
[tool.isort]
|
||
|
|
profile = "black"
|
||
|
|
line_length = 100
|
||
|
|
skip_gitignore = true
|
||
|
|
|
||
|
|
[tool.mypy]
|
||
|
|
python_version = "3.10"
|
||
|
|
warn_return_any = true
|
||
|
|
warn_unused_configs = true
|
||
|
|
disallow_untyped_defs = false
|
||
|
|
ignore_missing_imports = true
|
||
|
|
|
||
|
|
[tool.pylint.messages_control]
|
||
|
|
max-line-length = 100
|
||
|
|
disable = [
|
||
|
|
"C0111", # missing-docstring
|
||
|
|
"C0103", # invalid-name
|
||
|
|
]
|
||
|
|
|
||
|
|
[tool.coverage.run]
|
||
|
|
source = ["."]
|
||
|
|
omit = [
|
||
|
|
"*/tests/*",
|
||
|
|
"*/test_*.py",
|
||
|
|
"*/venv/*",
|
||
|
|
"*/build/*",
|
||
|
|
"*/dist/*",
|
||
|
|
]
|
||
|
|
|
||
|
|
[tool.coverage.report]
|
||
|
|
exclude_lines = [
|
||
|
|
"pragma: no cover",
|
||
|
|
"def __repr__",
|
||
|
|
"raise AssertionError",
|
||
|
|
"raise NotImplementedError",
|
||
|
|
"if __name__ == .__main__.:",
|
||
|
|
"if TYPE_CHECKING:",
|
||
|
|
]
|