-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (109 loc) · 3.49 KB
/
pyproject.toml
File metadata and controls
125 lines (109 loc) · 3.49 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
# SPDX-FileCopyrightText: 2023 Mark Liffiton <liffiton@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-only
[project]
name = 'Gen-Ed'
description = "A framework for building web applications using generative AI (LLMs) for education."
version = '0.1.0'
authors = [
{ name='Mark Liffiton', email='liffiton@gmail.com' }
]
readme = 'README.md'
license = 'AGPL-3.0-only'
license-files = ['LICENSES/*']
requires-python = '>=3.11'
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Flask",
"Intended Audience :: Education",
"Programming Language :: Python :: 3",
"Topic :: Education",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
dependencies = [
"Authlib~=1.7.2",
"Flask~=3.1.0",
"markdown-it-py~=4.0",
"msgspec~=0.20.0",
"openai~=2.0",
"pylti@git+https://github.com/liffiton/pylti",
"pyrage~=1.3.0",
"python-dotenv~=1.2.0",
"python-frontmatter~=1.1.0",
"tzdata", # Timezone data (needed on Windows; can make a difference on Linux)
]
[project.optional-dependencies]
dev = [
"build~=1.5.0",
"oauthlib~=3.3.0",
"pytest~=9.0",
"pytest-cov~=7.0",
"pytest-xdist~=3.8.0",
"mypy~=2.0",
"types-oauthlib~=3.3.0",
"types-requests",
"pyrage-stubs~=1.3.0",
]
[project.urls]
Repository = 'https://github.com/liffiton/Gen-Ed/'
[tool.pytest.ini_options]
log_level = 'DEBUG'
testpaths = 'tests'
addopts = [
"--import-mode=importlib",
"-n=auto",
]
markers = [
"use_real_openai: marks any test that sends requests to the real OpenAI endpoint",
]
[tool.ruff]
include = ["pyproject.toml", "src/**/*.py", "tests/**/*.py"]
output-format = "grouped"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"E501", # line too long
"COM812", # missing trailing comma
"ERA001", # commented-out code
"RET504", # unnecessary assignment before return
"RET505", # unnecessary else after return
"S101", # assert statements
"S311", # pseudo-random number generators
"TRY400", # logger.error() inside except block
"G004", # f-string in logging statement
"EM", # Exceptions with string literals
"Q", # string quoting
"D", # docstrings
"ANN", # type annotation
"TD", # TODOs
"PERF203",# try-except in a loop
"C408", # dict() vs dict literal
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [ # Ignore warnings in the tests directory
"DTZ005", # timezone-unaware objects are okay in tests
"E712", # equality comparisons to False (make assertions clearer)
"FBT001", # boolean positional arguments (used for parameterized tests)
"PLR0913", # too many arguments (fixtures push us in that direction)
"PLR2004", # magic numbers
"S", # all security lints (not important in test code)
]
[tool.djlint]
profile = "jinja"
files = ["src/"]
ignore = "T001,H021,H023,H030,H031"
[tool.mypy]
files = [ "src/", "tests/" ]
strict = "True"
enable_error_code = "unreachable, deprecated, redundant-expr, possibly-undefined, truthy-bool, truthy-iterable"
pretty = "True"
[tool.uv]
exclude-newer = "1 week"
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.package-data]
"*" = ["py.typed", "*.sql", "static/**/*", "templates/*.html", "templates/*.xml", "migrations/*.sql", "docs/*.md"]
"components" = ["*/static/**/*", "*/templates/*.html", "*/migrations/*.sql"]