-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (111 loc) · 4 KB
/
pyproject.toml
File metadata and controls
125 lines (111 loc) · 4 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
# pyproject.toml: Modern Python project configuration
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=80", "wheel"]
[project]
authors = [{name = "Denise Case"}] # TODO: Change to YOUR name (ownership matters)
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
]
description = "Professional Python starter project for Apache Spark"
license = "MIT"
name = "pro-analytics-apache-starter" # PACKAGE name (matches src folder except with dashes)
readme = "README.md"
requires-python = ">=3.12"
version = "0.0.1"
dependencies = [ # fmt: off
"loguru", # Better than print() - practice production logging with levels
"python-dotenv", # env variables
"matplotlib", # Industry standard plotting
"pandas", # THE data manipulation tool in analytics
"seaborn", # Statistical charts built on matplotlib
"ipython", # Enhanced Python shell (needed for notebooks)
"ipykernel", # Jupyter kernel for notebooks
"pyspark", # includes py4j internally
] # fmt: on
[project.urls]
"Bug Tracker" = "https://github.com/denisecase/pro-analytics-apache-starter/issues"
Documentation = "https://denisecase.github.io/pro-analytics-apache-starter/"
Homepage = "https://github.com/denisecase/pro-analytics-apache-starter"
Repository = "https://github.com/denisecase/pro-analytics-apache-starter"
[project.optional-dependencies]
dev = [
"pre-commit", # check code before committing
"pytest", # run some tests automatically
"pytest-cov", # coverage report for more visibility
]
docs = [
"mkdocs", # Core MkDocs
"mkdocs-material", # Modern, responsive theme
"mkdocstrings[python]", # Auto-generate API docs from docstrings
"livereload", # Enables live reload (auto-refresh on edit)
"watchdog", # Faster and more reliable file watching
"ruff", # Needed so mkdocstrings can format signatures
]
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
# Ruff formats, lints, and fixes code
[tool.ruff]
exclude = [".venv", ".ruff_cache", "build", "dist", "*.egg-info", ".eggs", "__pycache__", "tests"]
fix = true
line-length = 100
preview = false
target-version = "py312"
unsafe-fixes = false
[tool.ruff.format]
line-ending = "lf"
quote-style = "preserve"
[tool.ruff.lint]
extend-select = [
"F", # Pyflakes rules
"W", # PyCodeStyle warnings
"E", # PyCodeStyle errors
"I", # Sort imports properly
"UP", # Newer Python features
"C4", # Catch incorrect use of comprehensions, dict, list, etc
"C408", # unnecessary comprehension
"D", # Docstring conventions
"Q", # flake8-quotes
"S", # Security issues
"C90", # McCabe complexity
"N", # Naming conventions
"B", # Bugbear
"A", # flake8-annotations
"PTH", # Use pathlib instead of os.path
"RET", # Good return practices
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports for project conventions
"TCH", # flake8-type-checking for type checking imports
]
ignore = [
"E501", # line length handled by formatter
"D203", # 1 blank line before class docstring (conflicts with D211)
"D213", # Multi-line docstring summary should start at the second line
"D413", # Missing blank line after last section
"S101", # assert statements (handled by bandit)
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
[tool.ruff.lint.per-file-ignores]
"src/**/__init__.py" = ["D104"]
"tests/**/*.py" = ["TID251", "TID252", "S101", "D"]
"notebooks/**/*.ipynb" = ["F821"]
# Optional: Pyright checks that our type hints are correct
[tool.pyright]
extraPaths = ["src"]
include = ["src"]
pythonVersion = "3.12"
reportMissingImports = "warning"
reportPrivateUsage = "none"
typeCheckingMode = "basic" # or "strict"
useLibraryCodeForTypes = false # don't open libraries for types (some are on 3.14)
venv = ".venv"
venvPath = "."
# Optional: Pytest runs basic tests to ensure code runs correctly
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
addopts = "--cov=src --cov-report=term-missing"