Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Test and Coverage

on:
push:
branches:
- main
pull_request:
types:
- opened
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## v1.1.0 (2025-01-15)

### Features

- **Package Manager Support**: Add comprehensive support for multiple Python package managers
- Support for UV (default), PDM, Poetry, and PIP package managers
- Interactive package manager selection in `fastkit init` and `fastkit startdemo` commands
- `--package-manager` CLI option for non-interactive usage
- Automatic generation of appropriate dependency files (`pyproject.toml` for UV/PDM/Poetry, `requirements.txt` for PIP)
- PEP 621 compliant project metadata for modern package managers

- **Automated Template Testing System**: Revolutionary zero-configuration template testing
- Dynamic template discovery - new templates are automatically tested
- Comprehensive end-to-end testing with actual project creation
- Multi-package manager compatibility testing
- Virtual environment creation and dependency installation validation
- Project structure and FastAPI integration verification
- Parameterized testing with pytest for scalable test execution

### Improvements

- **Enhanced CLI Experience**: Package manager selection with interactive prompts and helpful descriptions
- **Better Template Quality Assurance**: Multi-layer quality assurance with static inspection and dynamic testing
- **Improved Developer Experience**: Zero boilerplate test configuration for template contributors
- **Cross-Platform Compatibility**: Enhanced support for different package manager workflows

### Documentation

- Updated all user guides with package manager selection examples
- Enhanced CLI reference with comprehensive package manager documentation
- Updated contributing guidelines with new automated testing system
- Improved template creation guide with zero-configuration testing instructions
- Enhanced template quality assurance documentation

### Technical

- Implemented BasePackageManager abstract class with concrete implementations
- Added PackageManagerFactory for dynamic package manager instantiation
- Enhanced project metadata injection for all package managers
- Improved test infrastructure with dynamic template discovery
- Updated CI/CD pipelines for multi-package manager testing

### Breaking Changes

- **Default Package Manager**: Changed from PIP to UV for better performance
- **CLI Prompts**: Added package manager selection step in interactive commands

## v1.0.2 (2025-07-02)

### Features
Expand Down
62 changes: 54 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,61 @@ template-name/

### Testing

1. Required Tests:
- Basic CRUD operations
- Authentication/Authorization
FastAPI-fastkit includes **automated template testing** that provides comprehensive validation:

#### ✅ Automatic Template Testing

**Zero Configuration Required:**
- 🚀 New templates are **automatically discovered** and tested
- ⚡ No manual test file creation needed
- 🛡️ Consistent quality standards applied

**Comprehensive Test Coverage:**
- ✅ **Project Creation**: Template copying and metadata injection
- ✅ **Package Manager Support**: UV, PDM, Poetry, and PIP compatibility
- ✅ **Virtual Environment**: Creation and dependency installation
- ✅ **Project Structure**: File and directory validation
- ✅ **FastAPI Integration**: Project identification and functionality

**Test Execution:**
```bash
# Test all templates automatically
$ pytest tests/test_templates/test_all_templates.py -v

# Test your specific template
$ pytest tests/test_templates/test_all_templates.py::TestAllTemplates::test_template_creation[your-template-name] -v

# Test with PDM environment
$ pdm run pytest tests/test_templates/test_all_templates.py -v
```

#### ✅ Template-Specific Testing

While basic functionality is automatically tested, you should include template-specific tests:

1. **Required Template Tests:**
- Basic CRUD operations (if applicable)
- Authentication/Authorization (if implemented)
- Error handling
- API endpoints
- Configuration validation

2. Test Coverage:
- Minimum 80% code coverage
- Include integration tests
- API testing examples
2. **Test Coverage Goals:**
- Minimum 80% code coverage for template-specific logic
- Include integration tests for external services
- API testing examples in template documentation

#### ✅ Package Manager Testing

Test your template with all supported package managers:

```bash
# Test with different package managers
$ fastkit startdemo your-template-name --package-manager uv
$ fastkit startdemo your-template-name --package-manager pdm
$ fastkit startdemo your-template-name --package-manager poetry
$ fastkit startdemo your-template-name --package-manager pip
```

### Submission Process

Expand Down Expand Up @@ -313,10 +357,12 @@ template-name/
- [ ] All files use .py-tpl extension
- [ ] FastAPI-fastkit dependency included
- [ ] Security requirements met
- [ ] Tests implemented and passing
- [ ] Documentation complete
- [ ] inspector.py validation passes
- [ ] All make dev-check tests pass
- [ ] **Automatic template tests pass** (new templates tested automatically)
- [ ] **Package manager compatibility verified** (tested with UV, PDM, Poetry, PIP)
- [ ] **Template-specific functionality tested** (if applicable)

4. **Pull Request:**
- Provide detailed description
Expand Down
Loading
Loading