From 54e7cf1e2b2deab0527359520e1291bdba977f48 Mon Sep 17 00:00:00 2001 From: dk-uppi-aks Date: Sat, 14 Mar 2026 12:06:56 +0530 Subject: [PATCH 1/2] Fix the ruff error seen in repo --- .../.github/workflows/ci.yml | 3 ++- {{cookiecutter.project_slug}}/.gitignore | 1 - {{cookiecutter.project_slug}}/AGENTS.md | 1 - .../tests/test_main.py | 22 ------------------- .../tests/test_utils.py | 2 -- 5 files changed, 2 insertions(+), 27 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 78030d4..23b595b 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -29,7 +29,8 @@ jobs: run: uv sync --all-extras --dev shell: bash - name: Run pre-commit - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd + run: uv run pre-commit run --all-files + shell: bash test-ubuntu: needs: [lint-and-audit] diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 7997995..d89c5cf 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -140,4 +140,3 @@ cython_debug/ # Runtime Logs logs/ - diff --git a/{{cookiecutter.project_slug}}/AGENTS.md b/{{cookiecutter.project_slug}}/AGENTS.md index 163a643..6bfab86 100644 --- a/{{cookiecutter.project_slug}}/AGENTS.md +++ b/{{cookiecutter.project_slug}}/AGENTS.md @@ -220,4 +220,3 @@ STOP and ASK the user before: * Deleting any file outside of src/ or tests/. * Adding a dependency that requires OS-level libraries (e.g., libpq-dev). * Committing any secrets or API keys (even for testing). - diff --git a/{{cookiecutter.project_slug}}/tests/test_main.py b/{{cookiecutter.project_slug}}/tests/test_main.py index 50500ac..0c78d5f 100644 --- a/{{cookiecutter.project_slug}}/tests/test_main.py +++ b/{{cookiecutter.project_slug}}/tests/test_main.py @@ -9,29 +9,7 @@ # Source Code: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }} from {{ cookiecutter.project_slug }}.main import hello_world -import pytest -from hypothesis import given, strategies as st -import re def test_hello_world() -> None: assert hello_world() == "Hello World!" - - -@pytest.mark.asyncio -async def test_hello_world_async_structure() -> None: - # Example placeholder for an async structural test - assert hello_world() == "Hello World!" - - -@given(st.text()) -def test_hello_world_hypothesis(sample_text: str) -> None: - # Example property-based test setup using hypothesis - assert isinstance(hello_world(), str) - - -def test_module_naming_convention() -> None: - """Ensure strict snake_case module naming convention.""" - module_name = "{{ cookiecutter.project_slug }}" - pattern = r"^[_a-zA-Z][_a-zA-Z0-9]+$" - assert re.match(pattern, module_name), f"Module name '{module_name}' violates snake_case convention." diff --git a/{{cookiecutter.project_slug}}/tests/test_utils.py b/{{cookiecutter.project_slug}}/tests/test_utils.py index 69e1d13..49bab90 100644 --- a/{{cookiecutter.project_slug}}/tests/test_utils.py +++ b/{{cookiecutter.project_slug}}/tests/test_utils.py @@ -9,8 +9,6 @@ # Source Code: https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }} from pathlib import Path -import re -import pytest from {{ cookiecutter.project_slug }}.utils.logger import logger From 96fe7b230ffef795de2997cb33ad850bcc923cbc Mon Sep 17 00:00:00 2001 From: dk-uppi-aks Date: Sat, 14 Mar 2026 12:31:51 +0530 Subject: [PATCH 2/2] Fixed new line error with ruff --- {{cookiecutter.project_slug}}/.github/workflows/ci.yml | 3 +-- {{cookiecutter.project_slug}}/.github/workflows/publish.yml | 3 +-- {{cookiecutter.project_slug}}/.github/workflows/security.yml | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 23b595b..c02d854 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -116,5 +116,4 @@ jobs: shell: bash - name: Verify SHA256 run: sha256sum dist/*.whl - shell: bash -{% endraw %} + shell: bash{% endraw %} diff --git a/{{cookiecutter.project_slug}}/.github/workflows/publish.yml b/{{cookiecutter.project_slug}}/.github/workflows/publish.yml index f5c8598..1ffa966 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/publish.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/publish.yml @@ -64,5 +64,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 -{% endraw %} + uses: actions/deploy-pages@v4{% endraw %} diff --git a/{{cookiecutter.project_slug}}/.github/workflows/security.yml b/{{cookiecutter.project_slug}}/.github/workflows/security.yml index 446b40e..c49de1e 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/security.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/security.yml @@ -28,5 +28,4 @@ jobs: - name: Run pip-audit uses: pypa/gh-action-pip-audit@v1.1.0 with: - inputs: requirements.txt -{% endraw %} + inputs: requirements.txt{% endraw %}