Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -80,23 +82,27 @@ 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`
- Coverage requirement: 90% (configured in `pyproject.toml`)
- 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`
Expand Down Expand Up @@ -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
Comment thread
fschuch marked this conversation as resolved.

### 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
Expand All @@ -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

Expand All @@ -184,20 +191,21 @@ 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

## 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

Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/references/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ To create a new release, follow these steps:

- Create a new release from GitHub: <https://github.com/fschuch/wizard-template/releases>

- 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.
Expand Down