-
Notifications
You must be signed in to change notification settings - Fork 0
chore(tooling): lint stack + cleanup (auto) #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "MD013": false, | ||
| "MD040": false | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-yaml | ||
| - id: check-added-large-files | ||
| - id: check-json | ||
| - id: check-toml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,6 @@ __pycache__/ | |
| .mypy_cache/ | ||
| .ruff_cache/ | ||
| .pytest_cache/ | ||
| **/templates/**/*.html | ||
| **/*.html | ||
| *.lock | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": false, | ||
| "trailingComma": "all", | ||
| "printWidth": 120, | ||
| "tabWidth": 2 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Ruff configuration — auto-generated by python-quality MCP server | ||
| target-version = "py311" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n 'target-version|python-version|requires-python|Python 3\.(10|11|12)' .Repository: rhixecompany/rhixecompany-comics Length of output: 684 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '.ruff.toml:\n'
cat -n .ruff.toml
printf '\nPython version declarations and Ruff mentions:\n'
rg -n '\b(REQUIRES-PYTHON|requires-python|python_requires|Python 3\.|target-version|ruff)' . -g '!**/.git/**' -g '!**/node_modules/**'Repository: rhixecompany/rhixecompany-comics Length of output: 2301 🌐 Web query:
💡 Result: In Ruff, the target-version setting serves as the authoritative indicator of the minimum Python version your project supports [1]. It influences both linting and formatting behaviors to ensure compatibility with your specified environment [2]. Core Behavior and Influence - Linting: Ruff uses target-version to determine which Python features are available [1]. It will avoid suggesting fixes or lint errors that require features newer than your specified version [1]. For example, if target-version is set to py38, Ruff will not suggest modern syntax (such as union types like int | str) that requires Python 3.10+ [1]. - Formatting: The formatter uses this setting to adjust version-specific formatting choices [2]. An example is the parenthesizing of context managers, which may be handled differently depending on the Python version [2]. Configuration and Precedence - Setting target-version: You can define it in your configuration file (e.g., pyproject.toml or ruff.toml) under the [tool.ruff] section using the target-version key (e.g., target-version = "py310") [1][3]. Valid values range from py37 through py315 [3]. - Precedence over requires-python: While Ruff can infer the Python version from the project.requires-python field in your pyproject.toml, an explicit target-version setting will always take precedence if both are present [1]. - Per-file Overrides: If you need to target different versions for specific files (e.g., legacy scripts vs. modern source code), you can use the per-file-target-version setting to map glob-style patterns to specific Python versions [2]. - Inference: When target-version is not explicitly set, Ruff attempts to infer the version by searching for the nearest pyproject.toml and reading the project.requires-python field [3][4]. For projects already using pyproject.toml, it is recommended to use project.requires-python as it adheres to standard Python packaging conventions and is respected by other tools in the ecosystem [1]. [1][3][2][4] Citations:
Align Ruff’s Repository docs state Python 3.10+, but 🤖 Prompt for AI Agents |
||
| line-length = 120 | ||
|
|
||
| # Enable rules | ||
| select = [ | ||
| "E", # pycodestyle errors | ||
| "F", # pyflakes (undefined names, syntax) | ||
| "I", # isort (import sorting) | ||
| "N", # pep8-naming | ||
| "W", # pycodestyle warnings | ||
| "UP", # pyupgrade (modern Python) | ||
| "B", # flake8-bugbear (bug detection) | ||
| "SIM", # flake8-simplify (simplification) | ||
| "ARG", # flake8-unused-arguments | ||
| "RUF", # ruff-specific rules | ||
| ] | ||
|
|
||
| # Ignore rules | ||
| ignore = [ | ||
| "E501", # line too long (formatter handles this) | ||
| "N818", # exception name convention | ||
| ] | ||
|
|
||
| # Format | ||
| [format] | ||
| quote-style = "double" | ||
| indent-style = "space" | ||
| line-ending = "lf" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| name: rhixecompany-comics | ||
| title: "rhixecompany-comics — Plan" | ||
| description: "Plan for rhixecompany-comics generated by repo-plan-spec.py" | ||
| version: 1.0.0 | ||
| status: in_progress | ||
| created: 2026-08-01 | ||
| tags: [plan, repo] | ||
| --- | ||
| # rhixecompany-comics — Plan | ||
|
|
||
| ## Overview | ||
|
|
||
| - **Type:** Dual-stack web platform (Django backend + Next.js frontend) | ||
|
|
||
| ## Stack | ||
|
|
||
| - Languages: mixed/unknown | ||
| - Frameworks/libraries: (none auto-detected) | ||
| - Entrypoints: none detected | ||
|
|
||
| ## Repository Notes | ||
|
|
||
| - **Type:** Dual-stack web platform (Django backend + Next.js frontend) | ||
| - **Pattern:** Two independent stacks sharing a PostgreSQL database, with Celery for async tasks | ||
| - **Reference:** [Workflow Analysis](docs/Project_Architecture/Workflow_Analysis.md), [Exemplars](docs/Project_Architecture/exemplars.md) | ||
| - **Backend:** Django 4.x + Django REST Framework, Python 3.10+ | ||
| - **Frontend:** Next.js 16 App Router, TypeScript (strict) | ||
| - **Async:** Celery + Redis | ||
|
Comment on lines
+18
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n 'mixed/unknown|none auto-detected|none detected|Django 4|requirements: \[\]|acceptance_criteria: \[\]|^-\s+R[0-9]+:|^-\s+AC[0-9]+:' \
PLAN.md SPEC.md RESEARCH_REPORT.md TECHNOLOGY_STACK.md backend/requirements.txtRepository: rhixecompany/rhixecompany-comics Length of output: 1106 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '--- Git tracked relevant files ---\n'
git ls-files | rg '(^|/)(PLAN\.md|SPEC\.md|RESEARCH_REPORT\.md|TECHNOLOGY_STACK\.md|requirements.*\.txt|pyproject\.toml|package\.json|package-lock\.json|yarn\.lock|pnpm-lock\.yaml|pip.*\.txt|setup.*\.py|manage\.py)$|(^|/)docs/Project_Architecture/(Workflow_Analysis|exemplars)\.md$|(^|/)backend/|(^|/)frontend/|(^|/)app/' | sed -n '1,200p'
printf '\n--- PLAN.md top sections ---\n'
sed -n '1,50p' PLAN.md
printf '\n--- SPEC.md front matter and requirements/AC ---\n'
sed -n '1,45p' SPEC.md
printf '\n--- Dependency/version mentions ---\n'
rg -n 'Django|django|djangorestframework|djangorestframework|next|`@next`|typescript|celery|redis|python_requires|Requires-Python|Programming Language :: Python ::|name: .*python|uses: .*python' -S --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' | sed -n '1,240p'
printf '\n--- Dependency files ---\n'
for f in backend/requirements.txt requirements.txt pyproject.toml package.json frontend/package.json app/package.json; do
if [ -f "$f" ]; then
echo "===== $f ====="
sed -n '1,220p' "$f"
fi
doneRepository: rhixecompany/rhixecompany-comics Length of output: 261 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- Git tracked relevant files ---'
git ls-files | rg -E '(^|/)(PLAN\.md|SPEC\.md|RESEARCH_REPORT\.md|TECHNOLOGY_STACK\.md|requirements.*\.txt|pyproject\.toml|package\.json|package-lock\.json|yarn\.lock|pnpm-lock\.yaml|pip.*\.txt|setup.*\.py|manage\.py)$|(^|/)docs/Project_Architecture/(Workflow_Analysis|exemplars)\.md$|(^|/)backend/|(^|/)frontend/|(^|/)app/' | sed -n '1,200p' || true
printf '%s\n' ''
printf '%s\n' '--- PLAN.md top sections ---'
sed -n '1,50p' PLAN.md
printf '%s\n' ''
printf '%s\n' '--- SPEC.md front matter and requirements/AC ---'
sed -n '1,60p' SPEC.md
printf '%s\n' ''
printf '%s\n' '--- Dependency/version mentions ---'
rg -n -S 'Django|django|djangorestframework|djangorestframework|next|`@next`|typescript|celery|redis|python_requires|Requires-Python|Programming Language :: Python ::|name: .*python|uses: .*python' --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' | sed -n '1,240p' || true
printf '%s\n' ''
printf '%s\n' '--- Dependency files ---'
for f in backend/requirements.txt requirements.txt pyproject.toml package.json frontend/package.json app/package.json; do
if [ -f "$f" ]; then
echo "===== $f ====="
sed -n '1,220p' "$f"
fi
doneRepository: rhixecompany/rhixecompany-comics Length of output: 3985 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- Relevant files summary ---'
git ls-files 'README.md' 'requirements*.txt' 'backend/requirements*.txt' 'pyproject.toml' 'package.json' 'package-lock.json' 'yarn.lock' 'pnpm-lock.yaml' 'setup.py' 'manage.py' '.github/workflows' '*.prompt.md' 'RESEARCH_REPORT.md' 'TECHNOLOGY_STACK.md' 'docs/Project_Architecture' 2>/dev/null | sed -n '1,200p' || true
printf '%s\n' ''
printf '%s\n' '--- Search dependency/version/config/tooling mentions ---'
rg -n -S --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' \
'Django|django|djangorestframework|Next\.js|next\.js|`@next`|TypeScript|typescript|CELERY|Celery|celery|Redis|redis|requirements|pyproject|eslint|prettier|ruff|cspell|markdownlint|pre-commit|git-cliff|migrations|docker|compose|Python|python' \
. | sed -n '1,260p' || true
printf '%s\n' ''
printf '%s\n' '--- Dependency/config files (if present) ---'
for f in README.md requirements.txt backend/requirements.txt backend/requirements-dev.txt pyproject.toml package.json package-lock.json yarn.lock pnpm-lock.yaml setup.py manage.py .pre-commit-config.yaml .cspell.json .eslintrc* eslint.config.* pyproject.toml; do
if [ -f "$f" ]; then
echo "===== $f ====="
sed -n '1,240p' "$f"
fi
doneRepository: rhixecompany/rhixecompany-comics Length of output: 27198 Regenerate planning metadata from one source of truth. The generated inventory and 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
|
|
||
| ## Phases | ||
|
|
||
| 1. **Inventory** — confirm live config matrix, repo state, and git submodule status on disk. | ||
| 2. **Research** — per `repo-research-pipeline.prompt.md`: verify RESEARCH_REPORT.md current, links live, | ||
| cross-references symmetric. | ||
| 3. **Planning** — per `repo-management.prompt.md` outputs: branch normalization | ||
| (`development` + `production`), ignore-file audit, dependency audit, CI workflow. | ||
| 4. **Tooling** — apply python-quality / tooling-lint / tooling-config stacks (ruff, pyright, eslint, | ||
| prettier, cspell, markdownlint, pre-commit, git-cliff) where applicable. Never overwrite | ||
| customized configs — only create missing. | ||
| 5. **Check** — run every applicable checker via `tooling_full_check.py`; record findings with | ||
| exit-code classification (exit 2 = TOOLING FAIL blocker). | ||
| 6. **Fix** — apply safe auto-fixes only (ruff --fix, prettier --write on code globs, F821, broken | ||
| hook imports); flag curated debt as REPORT scope. | ||
| 7. **Validate** — re-run checkers; write verification summary into the master plan. | ||
|
|
||
| ## Acceptance | ||
|
|
||
| - [ ] RESEARCH_REPORT.md current (or created) with live links | ||
| - [ ] Branch structure: development + production only | ||
| - [ ] All applicable checkers run without tooling-level failure | ||
| - [ ] Findings triaged (FIX vs REPORT) | ||
| - [ ] Verification recorded | ||
|
|
||
| ## Status | ||
|
|
||
| Tracked in SPEC.md acceptance criteria. See `.hermes/plans/2026-08-01_async-script-tooling-master.md` | ||
| for the master plan. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| name: rhixecompany-comics | ||
| title: "rhixecompany-comics — Spec" | ||
| description: "Spec for rhixecompany-comics generated by repo-plan-spec.py" | ||
| version: 1.0.0 | ||
| status: in_progress | ||
| created: 2026-08-01 | ||
| tags: [spec, repo] | ||
| requirements: [] | ||
| acceptance_criteria: [] | ||
| --- | ||
| # rhixecompany-comics — Spec | ||
|
|
||
| ## Purpose | ||
|
|
||
| - **Type:** Dual-stack web platform (Django backend + Next.js frontend) | ||
|
|
||
| ## Requirements | ||
|
|
||
| - R1: Repo tooling configs present and valid for its stack (mixed/unknown; (none auto-detected)). | ||
| - R2: All applicable checkers pass or findings are triaged FIX/REPORT. | ||
| - R3: RESEARCH_REPORT.md exists with ≥9 sections and live links. | ||
| - R4: PLAN.md and SPEC.md stay in sync with the master plan. | ||
|
|
||
| ## Acceptance Criteria | ||
|
|
||
| - AC1: Config matrix verified on disk (no missing configs for detected stack). | ||
| - AC2: Tooling full check completes with zero tooling-level failures. | ||
| - AC3: Research report verified (links live, cross-references symmetric). | ||
| - AC4: Per-repo verification recorded in the final report. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| - Master plan: `.hermes/plans/2026-08-01_async-script-tooling-master.md` | ||
| - Prompts: `.github/prompts/repo-*.prompt.md` family | ||
| - Skills: repo-planning, prompt-management, tooling-implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Do not mask pytest failures.
Line 13 returns success after any non-zero pytest exit because
echosucceeds.2>/dev/nullalso hides failure details. Remove the fallback and stderr redirection. If an empty test suite is allowed, handle that case without accepting assertion or import failures.Based on learnings, run the project’s relevant tests, lint checks, deployment checks, and frontend build before submitting changes.
Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.29.0)
[warning] 4-13: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Learnings