-
Notifications
You must be signed in to change notification settings - Fork 64
/
pyproject.toml
146 lines (133 loc) · 4.77 KB
/
pyproject.toml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "streamlit-pydantic"
dynamic = ["version"]
description = "Auto-generate Streamlit UI from Pydantic Models & Dataclasses."
readme = "README.md"
authors = [{ name = "Lukas Masuch", email = "[email protected]" }]
requires-python = ">= 3.8"
dependencies = [
"streamlit>=1.30.0",
"pydantic[email]>=2.0",
"pydantic-settings>=2.0",
"pydantic-extra-types>=2.6.0",
]
license = "MIT"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
"Topic :: Utilities"
]
keywords = ["streamlit", "pydantic"]
[project.urls]
Homepage = "https://github.com/lukasmasuch/streamlit-pydantic"
Documentation = "https://github.com/lukasmasuch/streamlit-pydantic#documentation"
Repository = "https://github.com/lukasmasuch/streamlit-pydantic"
Issues = "https://github.com/lukasmasuch/streamlit-pydantic/issues"
Changelog = "https://github.com/lukasmasuch/streamlit-pydantic/releases"
[tool.rye]
managed = true
universal = true # # Generate lockfile valid on all platforms
dev-dependencies = ["pytest", "mypy", "ruff", "types-dataclasses", "lazydocs"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = ["src/streamlit_pydantic"]
[tool.rye.scripts]
all = { chain = ["format", "check", "test:pytest"] }
format = { chain = [
"format:ruff",
"isort:ruff",
]}
checks = { chain = [
"formatcheck:ruff",
"lint:ruff",
"typecheck:mypy",
"check:importable",
# TODO: add doccs check here
]}
"format:ruff" = "rye fmt"
"isort:ruff" = "rye lint --fix -- --select I"
"formatcheck:ruff" = "ruff format --check"
"lint:ruff" = "rye lint"
"test:pytest" = "rye test"
"check:importable" = "python -c 'import streamlit_pydantic'"
"typecheck:mypy" = "mypy src/streamlit_pydantic"
playground = "streamlit run ./playground/playground_app.py"
docs = "lazydocs --overview-file=README.md --src-base-url=https://github.com/lukasmasuch/streamlit-pydantic/blob/main streamlit_pydantic"
[tool.ruff]
target-version = 'py38'
line-length = 88
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # import sorting
"D", # pydocstyle
# "PL", # pylint
# "F", # pyflakes
# "B", # flake8-bugbear
# "C4", # flake8-comprehensions
# "UP", # pyupgrade
]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"E203", # space before : (needed for how black formats slicing)
"E501", # line too long
"E731", # do not assign a lambda expression, use a def
"E721", # do not compare types, use 'isinstance()'
"E402", # module level import not at top of file
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
# so it knows to group first-party stuff last
known-first-party = ["streamlit_pydantic", "tests"]
[tool.mypy]
# https://mypy.readthedocs.io/en/stable/config_file.html
python_version = "3.8"
ignore_missing_imports = true
disallow_untyped_defs = true
follow_imports = "skip"
[tool.pytest.ini_options]
addopts = "-s"