From d06731cc54840d86360577ef2586ab607313e979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Gr=C4=99dowski?= Date: Thu, 19 Dec 2024 20:58:11 +0100 Subject: [PATCH] Fix wrong syntax of pyscript.toml --- bucket_of_utils/qr/pyscript.toml | 10 ++-- pyproject.toml | 7 +++ tests/pdf/test_add_title_to_first_page.py | 4 +- uv.lock | 70 +++++++++++++++++++++++ 4 files changed, 83 insertions(+), 8 deletions(-) diff --git a/bucket_of_utils/qr/pyscript.toml b/bucket_of_utils/qr/pyscript.toml index a4d379e..d49f4dc 100644 --- a/bucket_of_utils/qr/pyscript.toml +++ b/bucket_of_utils/qr/pyscript.toml @@ -7,11 +7,9 @@ packages = [ ] [files] "./index.py" = "./index.py" -"{SOURCE}" = "../../bucket_of_utils" -"{TARGET}" = "bucket_of_utils" -"{SOURCE}/qr/wifi.py" = "{TARGET}/qr/wifi.py" -"{SOURCE}/panel_autogenerator/__init__.py" = "{TARGET}/panel_autogenerator/__init__.py" -"{SOURCE}/panel_autogenerator/_generate.py" = "{TARGET}/panel_autogenerator/_generate.py" -"{SOURCE}/panel_autogenerator/_style.py" = "{TARGET}/panel_autogenerator/_style.py" +"../../bucket_of_utils/qr/wifi.py" = "bucket_of_utils/qr/wifi.py" +"../../bucket_of_utils/panel_autogenerator/__init__.py" = "bucket_of_utils/panel_autogenerator/__init__.py" +"../../bucket_of_utils/panel_autogenerator/_generate.py" = "bucket_of_utils/panel_autogenerator/_generate.py" +"../../bucket_of_utils/panel_autogenerator/_style.py" = "bucket_of_utils/panel_autogenerator/_style.py" "https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/ttf/FiraCode-Regular.ttf" = "_static/fonts/FiraCode-Regular.ttf" diff --git a/pyproject.toml b/pyproject.toml index a4fedf9..0039599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,3 +123,10 @@ force-single-line = true [tool.mypy] exclude = [".venv"] + +[dependency-groups] +dev = [ + "imgcompare>=2.0.1", + "pytest-mock>=3.14.0", + "pytest>=8.3.4", +] diff --git a/tests/pdf/test_add_title_to_first_page.py b/tests/pdf/test_add_title_to_first_page.py index 27bad06..b08bf2a 100644 --- a/tests/pdf/test_add_title_to_first_page.py +++ b/tests/pdf/test_add_title_to_first_page.py @@ -3,8 +3,8 @@ import pdf_annotate as pa -from bucket_of_utils.pdf.add_title_to_first_page import AnnotationConfig -from bucket_of_utils.pdf.add_title_to_first_page import add_file_name_annotation_to_pdf +from bucket_of_utils.pdf.add_title_to_first_page.add_title_to_first_page import AnnotationConfig +from bucket_of_utils.pdf.add_title_to_first_page.add_title_to_first_page import add_file_name_annotation_to_pdf def test_add_file_name_annotation_to_pdf(): diff --git a/uv.lock b/uv.lock index 64fe933..aa65346 100644 --- a/uv.lock +++ b/uv.lock @@ -65,6 +65,13 @@ dependencies = [ { name = "unidecode" }, ] +[package.dev-dependencies] +dev = [ + { name = "imgcompare" }, + { name = "pytest" }, + { name = "pytest-mock" }, +] + [package.metadata] requires-dist = [ { name = "panel", specifier = ">=1.2.1" }, @@ -81,6 +88,13 @@ requires-dist = [ { name = "unidecode", specifier = ">=1.3.6" }, ] +[package.metadata.requires-dev] +dev = [ + { name = "imgcompare", specifier = ">=2.0.1" }, + { name = "pytest", specifier = ">=8.3.4" }, + { name = "pytest-mock", specifier = ">=3.14.0" }, +] + [[package]] name = "certifi" version = "2024.12.14" @@ -258,6 +272,26 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442 }, ] +[[package]] +name = "imgcompare" +version = "2.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pillow" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/44/5b/d4fbdf996d9b99a1935e85fc28caa24a5048fc60cd06c028a32ba39de28e/imgcompare-2.0.1-py3-none-any.whl", hash = "sha256:f4ca88b68392d54b92b3f60b1157e058b3cb7b52ce84ea44dff522a1da39e800", size = 6066 }, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, +] + [[package]] name = "jinja2" version = "3.1.4" @@ -557,6 +591,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a0/61/6cff8a8dbbac3d7fb7adb435b60737a7d0b0849f53e3af38f2c94d988da6/pillow-10.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:f379abd2f1e3dddb2b61bc67977a6b5a0a3f7485538bcc6f39ec76163891ee48", size = 2229322 }, ] +[[package]] +name = "pluggy" +version = "1.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, +] + [[package]] name = "pygments" version = "2.18.0" @@ -575,6 +618,33 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1c/e6/f16847dae08ce4e1d544c66336561c38b883613e1bb6fa61491bae7a1b5c/pyodide_py-0.25.1-py3-none-any.whl", hash = "sha256:bfd93301ee0ee022e6cbcee5a3a9a28b34a2f7348ebb06186df1514be79e5499", size = 48290 }, ] +[[package]] +name = "pytest" +version = "8.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/05/35/30e0d83068951d90a01852cb1cef56e5d8a09d20c7f511634cc2f7e0372a/pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761", size = 1445919 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/92/76a1c94d3afee238333bc0a42b82935dd8f9cf8ce9e336ff87ee14d9e1cf/pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", size = 343083 }, +] + +[[package]] +name = "pytest-mock" +version = "3.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c6/90/a955c3ab35ccd41ad4de556596fa86685bf4fc5ffcc62d22d856cfd4e29a/pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0", size = 32814 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f2/3b/b26f90f74e2986a82df6e7ac7e319b8ea7ccece1caec9f8ab6104dc70603/pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f", size = 9863 }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0"