-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (102 loc) · 2.87 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (102 loc) · 2.87 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
# pyproject.toml
# Modern Python packaging configuration - the new standard way to configure Python packages (vs setup.py)
# This file is read by pip, build tools, and IDEs to understand the project structure
# Build system requirements: tools needed to build the package
[build-system]
requires = [
"setuptools>=61.0",
"wheel",
]
build-backend = "setuptools.build_meta"
# Project metadata - alternative to setup.py (we're using both for compatibility)
[project]
name = "flit-experiment-configs"
version = "1.0.0"
description = "Experiment configuration package for Flit's A/B testing platform"
readme = "README.md"
authors = [
{name = "Kevin Waithaka", email = "kevwaithakam@gmail.com"}
]
license = {text = "MIT"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Information Analysis",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.9"
# Dependencies
dependencies = [
"pyyaml>=6.0",
"pydantic>=1.10.0",
]
# Optional dependencies - same as extras_require in setup.py
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"black>=22.0.0",
"flake8>=4.0.0",
"mypy>=0.950",
]
# Tool configurations - Instead of separate config files, we configure all tools here
[tool.black]
# Black code formatter configuration
line-length = 88
target-version = ['py39']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories to exclude from formatting
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
# Import sorting configuration (works with black)
profile = "black"
multi_line_output = 3
line_length = 88
include_trailing_comma = true
[tool.mypy]
# Type checking configuration
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
# Ignore missing imports for external libraries that don't have type stubs
[[tool.mypy.overrides]]
module = [
"yaml.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
# Test configuration
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v", # Verbose output
"--tb=short", # Shorter traceback format
"--strict-markers", # Only allow defined markers
"--disable-warnings", # Clean test output
]
# Test markers - for categorizing tests
markers = [
"unit: Unit tests that run quickly and don't need external dependencies",
"integration: Integration tests that may need external services",
"slow: Tests that take a long time to run",
]