From 9e471942e6f8dc32a3b329d7d4c575dd442c91ea Mon Sep 17 00:00:00 2001 From: "Felipe N. Schuch" Date: Wed, 4 Feb 2026 15:22:14 -0300 Subject: [PATCH] lint: ensure recent markdown files pass pre-commit verifications --- .github/copilot-instructions.md | 40 +++++++++++++++++----------- .github/workflows/ci.yaml | 6 ----- README.md | 1 + docs/references/how-to-contribute.md | 2 +- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index dacb893..aa4c5ef 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -5,6 +5,7 @@ This file provides context for AI coding assistants (like GitHub Copilot) workin ## Template Overview This is a Python project template that includes: + - Modern Python package structure using `src` layout - Automated testing with pytest - Code quality tools (ruff, mypy, pre-commit) @@ -21,6 +22,7 @@ hatch run _wizard ``` This script: + - Replaces all references to `wizard-template` with your project name - Replaces all references to `fschuch` with your username - Renames the `src/wizard_template` directory to your project name @@ -80,16 +82,19 @@ hatch config set dirs.env.virtual .venv ## Quality Assurance Tools ### Linting & Formatting + - **Ruff**: Fast Python linter and formatter (replaces flake8, black, isort) - Configured in `pyproject.toml` under `[tool.ruff]` - Convention: Google-style docstrings ### Type Checking + - **MyPy**: Static type checker for Python - Configured in `pyproject.toml` under `[tool.mypy]` - Type hints are expected in all new code ### Testing + - **Pytest**: Testing framework - Tests located in `tests/` directory - Run with `hatch run test` @@ -97,6 +102,7 @@ hatch config set dirs.env.virtual .venv - Doctests are enabled for all Python files ### Pre-commit Hooks + - Configured in `.pre-commit-config.yaml` - Includes: ruff, mypy, codespell, file checks, mdformat, nbstripout, zizmor - Install with `hatch run pre-commit-install` @@ -132,15 +138,16 @@ hatch config set dirs.env.virtual .venv ### Making Changes 1. Create a new branch for your changes -2. Make your code changes -3. Add/update tests as needed -4. Run QA checks: `hatch run qa` -5. Commit your changes -6. Push and create a pull request +1. Make your code changes +1. Add/update tests as needed +1. Run QA checks: `hatch run qa` +1. Commit your changes +1. Push and create a pull request ### Adding Dependencies Add dependencies to `pyproject.toml` under: + - `dependencies` for runtime dependencies - `project.optional-dependencies.tests` for test dependencies - `project.optional-dependencies.docs` for documentation dependencies @@ -161,10 +168,10 @@ This template includes several GitHub Actions workflows: ### Adding a New Module 1. Create new file in `src/wizard_template/` (or your renamed package) -2. Add type hints to all functions -3. Add Google-style docstrings -4. Create corresponding test file in `tests/` -5. Ensure coverage stays above 90% +1. Add type hints to all functions +1. Add Google-style docstrings +1. Create corresponding test file in `tests/` +1. Ensure coverage stays above 90% ### Adding Tests @@ -184,6 +191,7 @@ This template includes several GitHub Actions workflows: ## Versioning This project uses: + - **EffVer** (Effort-based Versioning) for version scheme - **hatch-vcs** for automatic version management from git tags - Version is automatically generated from git tags @@ -191,13 +199,13 @@ This project uses: ## Important Notes for AI Assistants 1. **Always run the renaming script first** when working with a new project from this template -2. **Use `hatch run` prefix** for all project commands, not direct pip/pytest/etc. -3. **Maintain 90% test coverage** - add tests for new code -4. **Follow Google docstring convention** for all docstrings -5. **Add type hints** to all new functions and methods -6. **Run `hatch run qa`** before committing to ensure all checks pass -7. **Keep the wizard badge** in README.md - it shows the project was created from this template -8. **Do not commit** `__pycache__`, `.venv`, `build/`, or other build artifacts +1. **Use `hatch run` prefix** for all project commands, not direct pip/pytest/etc. +1. **Maintain 90% test coverage** - add tests for new code +1. **Follow Google docstring convention** for all docstrings +1. **Add type hints** to all new functions and methods +1. **Run `hatch run qa`** before committing to ensure all checks pass +1. **Keep the wizard badge** in README.md - it shows the project was created from this template +1. **Do not commit** `__pycache__`, `.venv`, `build/`, or other build artifacts ## Getting Help diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db11439..37c6bed 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,12 +8,6 @@ on: - "main" - "release/**" pull_request: - paths: - - .github/workflows/ci.yaml - - .pre-commit-config.yaml - - pyproject.toml - - tests/** - - src/** schedule: - cron: "0 0 * * 1" # midnight every Monday diff --git a/README.md b/README.md index 096c64c..7afeeb4 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Check out the documentation for more details on how to use the template and its ### For AI Assistants If you're an AI coding assistant (like GitHub Copilot), please read [`.github/copilot-instructions.md`](.github/copilot-instructions.md) for important context about this template, including: + - First-time setup requirements (running the renaming script) - Project management tools (Hatch commands) - Quality assurance workflow diff --git a/docs/references/how-to-contribute.md b/docs/references/how-to-contribute.md index 1b0cf27..afbcf14 100644 --- a/docs/references/how-to-contribute.md +++ b/docs/references/how-to-contribute.md @@ -161,7 +161,7 @@ To create a new release, follow these steps: - Create a new release from GitHub: - - Based on previous versions, choose the next version number according to the [EffVer](https://jacobtomlinson.dev/effver/) scheme. The tag matching pattern is set to `v*.*.*`, for instance, `v1.2.3`, , `v2.3.4a0`, , `v2.3.4b0`, `v2.3.4rc0`. + - Based on previous versions, choose the next version number according to the [EffVer](https://jacobtomlinson.dev/effver/) scheme. The tag matching pattern is set to `v*.*.*`, for instance, `v1.2.3`, `v2.3.4a0`, `v2.3.4b0`, `v2.3.4rc0`. - Choose to create a new tag on publish based on version from previous step. - Click on Generate Release Notes. Modify the release notes as needed. - Double-check if the new version number is appropriate for the given set of changes.