-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (97 loc) · 3.24 KB
/
pyproject.toml
File metadata and controls
110 lines (97 loc) · 3.24 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "sketchresponse"
dynamic = ["version"]
description = "A tool for drawing and evaluating mathematical functions"
readme = "README.md"
license = "LGPL-2.1-or-later"
requires-python = ">=3.10"
authors = [{ name = "Massachusetts Institute of Technology" }]
keywords = ["education", "grading", "mathematics", "edx", "prairielearn"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"numpy>=1.20.0",
"sympy>=1.9",
"future>=0.18.0",
]
[project.optional-dependencies]
server = ["flask>=2.0.0"]
[project.urls]
Repository = "https://github.com/PrairieLearn/sketchresponse"
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*"]
[tool.hatch.build.hooks.vcs]
version-file = "sketchresponse/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["sketchresponse"]
[tool.hatch.build.targets.sdist]
include = [
"sketchresponse/",
"/LICENSE",
"/README.md",
"/pyproject.toml",
]
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "SIM"]
ignore = [
"E501", # line-too-long
"SIM108", # if-else-block-instead-of-if-exp
]
[tool.pytest.ini_options]
testpaths = ["test_grader_lib"]
python_files = ["test*.py"]
[dependency-groups]
dev = [
"matplotlib>=3.0.0",
"pandas>=1.0.0",
"pyright>=1.1.409",
"pytest>=7.0.0",
"ruff>=0.8.0",
]
[tool.pyright]
include = ["sketchresponse"]
exclude = [
"grader_scripts",
"**/__pycache__",
]
pythonVersion = "3.10"
typeCheckingMode = "strict"
# SketchConfig/SketchItem/SketchSubmission are declared total=False so every
# key is technically optional, but the code treats them as present at usage
# sites. Disable the strict-access check to match mypy's default behavior.
reportTypedDictNotRequiredAccess = "none"
# Subclasses of Function (CurveFunction, SplineFunction, MultipleSplinesFunction)
# deliberately narrow `domain` / `functions` to the concrete shape they use.
# These overrides are safe because the subclasses never expose the wider type.
reportIncompatibleVariableOverride = "none"
# Unknown-type propagation from numpy/sympy. Both ship stubs, but sympy's
# geometry stubs are narrow (e.g. Segment.points is tuple[Basic, Basic]
# instead of tuple[Point2D, Point2D]) and numpy's polyval/ndarray types leak
# Any. Re-enable these if you're willing to add cast(...) at the library
# boundary.
reportUnknownMemberType = "none"
reportUnknownVariableType = "none"
reportUnknownArgumentType = "none"
reportUnknownLambdaType = "none"
reportMissingTypeStubs = "none"
# Stylistic strict-mode checks we don't enforce — independent of library typing.
reportPrivateUsage = "none"
reportUnusedCallResult = "none"
reportImplicitOverride = "none"
reportImportCycles = "none"