From b25fe5cb2b8cdafc52c283de67d1aa95027088dc Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Tue, 28 Jan 2025 21:41:00 -0500 Subject: [PATCH 1/6] feat: migrate setup configuration to pyproject.toml and simplify setup.py --- pyproject.toml | 23 +++++++++++++++++++++++ setup.py | 23 ++--------------------- 2 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9fb33d0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[build-system] +requires = ["setuptools>=64.0.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "simpleguardhome" +version = "0.1.0" +requires-python = ">=3.7" +dependencies = [ + "fastapi", + "uvicorn", + "python-dotenv", + "httpx", + "pydantic", + "jinja2", +] + +[tool.setuptools] +package-dir = {"" = "src"} +packages = {find = {where = ["src"]}} + +[tool.setuptools.package-data] +simpleguardhome = ["templates/*", "favicon.ico"] \ No newline at end of file diff --git a/setup.py b/setup.py index d0f350a..fc1f76c 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,3 @@ -from setuptools import setup, find_packages -from pathlib import Path +from setuptools import setup -setup( - name="simpleguardhome", - version="0.1.0", - packages=find_packages(where="src"), - package_dir={"": "src"}, - include_package_data=True, - package_data={ - "simpleguardhome": ["templates/*", "favicon.ico"] - }, - python_requires=">=3.7", - install_requires=[ - "fastapi", - "uvicorn", - "python-dotenv", - "httpx", - "pydantic", - "jinja2", - ], -) \ No newline at end of file +setup() \ No newline at end of file From 56e05a967d8b751ebefa47b2edb53856b637287f Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Tue, 28 Jan 2025 21:41:22 -0500 Subject: [PATCH 2/6] Potential fix for code scanning alert no. 3: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/simpleguardhome/templates/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/simpleguardhome/templates/index.html b/src/simpleguardhome/templates/index.html index 87e125f..bb5e98c 100644 --- a/src/simpleguardhome/templates/index.html +++ b/src/simpleguardhome/templates/index.html @@ -5,10 +5,11 @@