From 7fa51bda6b1c64d5ff81813f9329aad1be1c5ca4 Mon Sep 17 00:00:00 2001
From: Alexander Kalinovsky
Date: Mon, 8 Sep 2025 19:03:36 +0300
Subject: [PATCH] chore: update dependencies and license, refine local CI
script for comprehensive checks
---
.gitea/workflows/ci.yaml | 6 +++---
.pre-commit-config.yaml | 4 ++--
pyproject.toml | 9 +-------
scripts/local_ci.sh | 40 ++++++++++++++++++++++++++++++++----
scripts/test_ci_locally.sh | 42 --------------------------------------
5 files changed, 42 insertions(+), 59 deletions(-)
delete mode 100755 scripts/test_ci_locally.sh
diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml
index a96d564..7a3006b 100644
--- a/.gitea/workflows/ci.yaml
+++ b/.gitea/workflows/ci.yaml
@@ -71,12 +71,12 @@ jobs:
- name: Ruff (lint + format check)
run: |
- uv run ruff check src/ tests/
- uv run ruff format --check src/ tests/
+ uv run ruff check
+ uv run ruff format --check
- name: MyPy
run: |
- uv run mypy src/ tests/
+ uv run mypy .
- name: Pytest
run: |
uv run pytest tests/ --cov=src/quickbot_cli --cov-report=term-missing --cov-report=html -v
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5d20738..52e7a71 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,7 +4,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.12.10
+ rev: v0.12.12
hooks:
- id: ruff-check
args: ["--fix"]
@@ -26,6 +26,6 @@ repos:
hooks:
- id: codespell
- repo: https://github.com/fsfe/reuse-tool
- rev: v5.0.2
+ rev: v5.1.1
hooks:
- id: reuse
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 9a4957b..225c1a1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -18,10 +18,9 @@ authors = [
]
readme = "README.md"
requires-python = ">=3.13"
-license = { text = "MIT" }
+license = { text = "Apache-2.0" }
dependencies = [
"typer",
- "quickbot>=0.1.1",
"jinja2",
"pyyaml",
]
@@ -62,12 +61,6 @@ python_version = "3.13"
strict = true
ignore_missing_imports = true
warn_unused_ignores = true
-exclude = [
- "test_cli_output/",
- "dist/",
- ".venv/",
- ".mypy_cache/"
-]
[tool.hatch.version]
source = "vcs"
diff --git a/scripts/local_ci.sh b/scripts/local_ci.sh
index 8deacb1..a1b349f 100755
--- a/scripts/local_ci.sh
+++ b/scripts/local_ci.sh
@@ -4,16 +4,16 @@
#
# SPDX-License-Identifier: Apache-2.0
-# Local CI script to test the same steps as the Gitea workflow
+# Local CI script to run all checks and a packaging/CLI smoke test
set -e
-echo "๐ Running local CI tests..."
+echo "๐ Running local CI checks and smoke tests..."
echo "๐ฆ Installing dependencies..."
uv sync --all-extras --dev
echo "๐ Running Ruff linting..."
-uv run ruff check .
+uv run ruff check
echo "๐จ Checking code formatting..."
uv run ruff format --check
@@ -27,4 +27,36 @@ uv run reuse lint
echo "๐งช Running tests..."
uv run pytest
-echo "โ
All checks passed!"
+echo "๐งช Testing CI workflow steps locally (package build and CLI)..."
+
+echo "๐ฆ Building package..."
+uv build
+
+echo "๐ง Testing package installation..."
+uv pip install dist/*.whl
+
+echo "โ Testing help command..."
+uv run quickbot --help
+
+echo "๐ Testing CLI functionality..."
+mkdir -p test_cli_output
+uv run quickbot init \
+ --output test_cli_output \
+ --project-name "Local Test" \
+ --description "Local Test Description" \
+ --author "Local Test" \
+ --license-name MIT \
+ --no-include-alembic \
+ --no-include-i18n \
+ --no-interactive
+
+echo "๐ Checking generated files..."
+ls -la test_cli_output/
+echo "๐ Generated pyproject.toml:"
+cat test_cli_output/pyproject.toml
+
+echo "๐งน Cleaning up..."
+rm -rf test_cli_output
+rm -rf dist/*
+
+echo "โ
All checks and smoke tests passed!"
diff --git a/scripts/test_ci_locally.sh b/scripts/test_ci_locally.sh
deleted file mode 100755
index 03d7327..0000000
--- a/scripts/test_ci_locally.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-# SPDX-FileCopyrightText: 2025 Alexander Kalinovsky
-#
-# SPDX-License-Identifier: Apache-2.0
-
-# Test CI workflow steps locally
-set -e
-
-echo "๐งช Testing CI workflow steps locally..."
-
-echo "๐ฆ Building package..."
-uv build
-
-echo "๐ง Testing package installation..."
-uv pip install dist/*.whl
-
-echo "โ Testing help command..."
-uv run quickbot --help
-
-echo "๐ Testing CLI functionality..."
-mkdir -p test_cli_output
-uv run quickbot init \
- --output test_cli_output \
- --project-name "Local Test" \
- --description "Local Test Description" \
- --author "Local Test" \
- --license-name MIT \
- --no-include-alembic \
- --no-include-i18n \
- --no-interactive
-
-echo "๐ Checking generated files..."
-ls -la test_cli_output/
-echo "๐ Generated pyproject.toml:"
-cat test_cli_output/pyproject.toml
-
-echo "๐งน Cleaning up..."
-rm -rf test_cli_output
-rm -rf dist/*
-
-echo "โ
All CI workflow steps passed locally!"