-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (89 loc) · 2.5 KB
/
pyproject.toml
File metadata and controls
102 lines (89 loc) · 2.5 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
[project]
name = "canvas-learning-system"
version = "1.0.0"
description = "Obsidian Canvas-based AI-assisted learning system using Feynman Learning Method"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Canvas Learning System Team"}
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-asyncio>=0.21",
"pytest-bdd>=7.0",
"schemathesis>=3.0",
"hypothesis>=6.0",
]
api = [
"fastapi>=0.100",
"uvicorn>=0.20",
"pydantic>=2.0",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
markers = [
"bdd: BDD tests that execute Gherkin scenarios via pytest-bdd",
"contract: Contract tests that validate API against OpenAPI specification",
"integration: Integration tests requiring external services",
"unit: Unit tests for individual components",
"slow: Tests that take significant time to run",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.schemathesis]
# Configuration for Schemathesis contract testing
# Reference: docs/architecture/sot-hierarchy.md (OpenAPI is Level 4 SoT)
# Local schema path (used when FastAPI is not running)
schema_path = "specs/api/canvas-api.openapi.yml"
# Base URL for API testing (Epic 15 FastAPI)
# Uncomment when FastAPI is implemented:
# base_url = "http://localhost:8000"
# Test execution settings
max_examples = 100
hypothesis_deadline = 5000 # ms
validate_schema = true
# Stateful testing for workflow scenarios
stateful = "links"
# Check types
checks = [
"not_a_server_error",
"status_code_conformance",
"content_type_conformance",
"response_headers_conformance",
"response_schema_conformance",
]
[tool.ruff]
# Python linting configuration
line-length = 120
target-version = "py39"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.isort]
known-first-party = ["canvas_learning_system"]
[tool.mutmut]
# mutmut 3.x config — run manually: cd backend && mutmut run
# NOT in PostToolUse hook (too slow: each mutant = full pytest cycle)
# Use after bug fixes to verify tests aren't facades
paths_to_mutate = ["app/"]
tests_dir = ["tests/"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"