mirror of
https://github.com/brunopostle/ifcurl.git
synced 2026-07-12 02:08:13 +00:00
render_service.py: new FastAPI app with /render, /select, /render_diff endpoints that wrap run_sandboxed — listens on a Unix domain socket. service.py: imports the three pipeline functions from render_service.py; delegates to render service via httpx when IFCURL_RENDER_SOCKET is set, falls back to direct run_sandboxed when unset (single-service mode). __main__.py: add 'render-service' subcommand (--socket PATH). pyproject.toml: add httpx to service optional deps. ifcurl-api.service: renamed from ifcurl-preview.service; sets IFCURL_RENDER_SOCKET, adds AF_UNIX to RestrictAddressFamilies. ifcurl-render.service: new hardened unit — AF_UNIX only, ~execve ~execveat blocked, no credentials, separate ifcurl-render user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
64 lines
1.6 KiB
TOML
64 lines
1.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "ifcurl"
|
|
version = "0.0.0"
|
|
authors = [
|
|
{ name="Bruno Postle", email="bruno@postle.net" },
|
|
]
|
|
description = "Resolve and render ifc:// URLs pointing to IFC models in git repositories"
|
|
readme = "README.md"
|
|
license = { file = "LICENSE" }
|
|
requires-python = ">=3.10"
|
|
keywords = ["IFC", "BIM", "URL"]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
|
|
]
|
|
dependencies = ["ifcopenshell", "gitpython", "platformdirs"]
|
|
|
|
[project.optional-dependencies]
|
|
render = ["pyvista", "numpy", "Pillow"]
|
|
service = ["pyvista", "numpy", "Pillow", "fastapi", "uvicorn[standard]", "bcf", "httpx"]
|
|
|
|
[project.scripts]
|
|
ifcurl = "ifcurl.__main__:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/brunopostle/ifcurl"
|
|
Issues = "https://github.com/brunopostle/ifcurl/issues"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["ifcurl*"]
|
|
exclude = ["test*"]
|
|
|
|
[tool.setuptools.package-data]
|
|
ifcurl = ["py.typed"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
|
|
[tool.ruff.lint]
|
|
preview = true
|
|
select = [
|
|
"E9", # io errors
|
|
"FA", # future annotations
|
|
"UP", # pyupgrade
|
|
"I", # import sorting
|
|
"RUF015",
|
|
"RUF022",
|
|
]
|
|
ignore = [
|
|
"UP007", # Optional to X | Y
|
|
"UP045", # Optional to X | None
|
|
"UP015", # Unnecessary mode argument
|
|
"UP028", # yield for -> yield from
|
|
"UP030", # implicit references for positional format fields
|
|
"UP031", # Replace % with .format
|
|
"UP032", # Replace .format with f-string
|
|
]
|