Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,toml,yml,yaml}]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
32 changes: 26 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,39 @@ build-backend = "hatchling.build"
[project]
name = "uf"
version = "0.1.2"
description = "UI Fast"
description = "Minimal-boilerplate web UIs for Python functions"
readme = "README.md"
requires-python = ">=3.10"
keywords = []
authors = []
license = "MIT"
keywords = [
"ui",
"forms",
"rjsf",
"json-schema",
"web-ui",
"fastapi",
"bottle",
"python-functions",
]
authors = [
{ name = "Thor Whalen" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
"Framework :: FastAPI",
]
dependencies = ["qh", "ju", "i2", "dol", "meshed"]

[project.license]
text = "mit"

[project.urls]
Homepage = "https://github.com/i2mint/uf"
Repository = "https://github.com/i2mint/uf"
Documentation = "https://i2mint.github.io/uf/"

[project.optional-dependencies]
dev = ["pytest>=7.0", "pytest-cov>=4.0", "ruff>=0.1.0"]
Expand Down
4 changes: 3 additions & 1 deletion uf/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def _generate_spec(self, func_name: str) -> dict:
from ju.rjsf import func_to_form_spec

# Generate form spec
form_spec = func_to_form_spec(func, **self._rjsf_config)
# ju nests the spec under a "rjsf" field by default; uf wants it flat
rjsf_config = {"nest_under_field": None, **self._rjsf_config}
form_spec = func_to_form_spec(func, **rjsf_config)

# Apply custom UI schema factory if provided
if self._ui_schema_factory:
Expand Down
Loading