* Add GitHub Actions workflow for publishing Python package to PyPI and update pyproject.toml with project metadata * Bump version to 1.0.0 in pyproject.toml
102 lines
2.6 KiB
TOML
102 lines
2.6 KiB
TOML
# Ruff configuration for IMAP Migration Tools
|
|
# https://docs.astral.sh/ruff/
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "imap-migration-tools"
|
|
version = "1.0.0"
|
|
authors = [
|
|
{ name="Javier Callico", email="jcallico@callicode.com" },
|
|
{ name="Nathan Moinvaziri", email="nathan@nathanm.com" }
|
|
]
|
|
description = "Tools for migrating IMAP emails"
|
|
readme = "README.md"
|
|
requires-python = ">=3.9"
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
]
|
|
dependencies = [
|
|
"google-auth-oauthlib",
|
|
"msal",
|
|
]
|
|
|
|
[project.urls]
|
|
"Homepage" = "https://github.com/jcallico/imap-migration-tools"
|
|
"Bug Tracker" = "https://github.com/jcallico/imap-migration-tools/issues"
|
|
|
|
[project.scripts]
|
|
imap-backup = "backup_imap_emails:main"
|
|
imap-restore = "restore_imap_emails:main"
|
|
imap-migrate = "migrate_imap_emails:main"
|
|
imap-count = "count_imap_emails:main"
|
|
imap-compare = "compare_imap_folders:main"
|
|
|
|
[tool.setuptools.package-dir]
|
|
"" = "src"
|
|
|
|
[tool.ruff]
|
|
target-version = "py39"
|
|
line-length = 120
|
|
|
|
# Include src, tools, and test directories
|
|
src = ["src", "tools", "test"]
|
|
|
|
[tool.ruff.lint]
|
|
# Enable recommended rules
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # Pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
]
|
|
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
"E701", # multiple statements on one line (colon) - used for concise code
|
|
"E722", # bare except - used in connection handling
|
|
"B008", # do not perform function calls in argument defaults
|
|
"B905", # zip without explicit strict parameter
|
|
"F841", # local variable assigned but never used - used for clarity
|
|
"W293", # blank line contains whitespace - handled by formatter
|
|
]
|
|
|
|
# Allow unused variables when underscore-prefixed
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"test/*.py" = [
|
|
"S101", # assert statements are fine in tests
|
|
]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
skip-magic-trailing-comma = false
|
|
line-ending = "auto"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["test"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
addopts = "-v --tb=short"
|
|
|
|
[tool.coverage.run]
|
|
source = ["src"]
|
|
omit = ["test/*", "tools/*"]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"if __name__ == .__main__.:",
|
|
"raise NotImplementedError",
|
|
]
|