4.3 KiB
4.3 KiB
Changelog Update for v1.2.0
[1.2.0] - 2025-12-16
Added
Python Project Templates
py-new- Create basic Python project with venv, tests, and structurepy-django- Django web application template with best practicespy-flask- Flask web application with blueprints and templatespy-fastapi- FastAPI REST API with automatic docspy-data- Data science project with Jupyter, pandas, and proper data directory structurepy-cli- Command-line tool template using Click framework
Python Template Features
- Automatic virtual environment creation
- Poetry support (configurable via
PY_TEMPLATE_USE_POETRY) - Pre-configured .gitignore for Python projects
- README with setup instructions
- Requirements.txt with common dependencies
- Project structure following best practices
- Optional git initialization
- Quick aliases:
pynew,pydjango,pyflask,pyfast,pydata,pycli venvfunction to quickly activate virtual environments
Changed
Alias System Cleanup
- Removed
statsalias - Forces explicitdfstatsusage to avoid conflicts - Updated help text in
dotfiles-clito reflect removal - Clarified that
statsremoval is intentional in documentation
Configuration
New Python template settings in dotfiles.conf:
# Python Project Templates
PY_TEMPLATE_BASE_DIR="$HOME/projects" # Where to create projects
PY_TEMPLATE_PYTHON="python3" # Python executable
PY_TEMPLATE_VENV_NAME="venv" # Virtual environment name
PY_TEMPLATE_USE_POETRY="false" # Use Poetry instead of venv
PY_TEMPLATE_GIT_INIT="true" # Auto-initialize git repos
Usage Examples
Basic Python Project
py-new myproject
cd myproject
source venv/bin/activate
# Start coding!
Django Project
py-django myblog
cd myblog
source venv/bin/activate
python manage.py runserver
# Visit: http://localhost:8000
FastAPI Project
py-fastapi myapi
cd myapi
source venv/bin/activate
python run.py
# Docs at: http://localhost:8000/docs
Data Science Project
py-data analysis
cd analysis
source venv/bin/activate
jupyter notebook
CLI Tool
py-cli mytool
cd mytool
pip install -e .
mytool --help
Breaking Changes
statsalias removed - Usedfstatsinstead- Reason: Potential conflicts with other tools/scripts
- Migration: Replace
statswithdfstatsin any scripts or muscle memory
File Changes
New Files
zsh/functions/python-templates.zsh- Python project template functions
Modified Files
zsh/aliases.zsh- Removedstatsalias, added cleanup notesdotfiles.conf- New Python template configuration section (optional).zshrc- Sourcespython-templates.zsh(needs manual addition)
To Enable Python Templates
Add to your .zshrc:
# Python project templates
[[ -f "$_dotfiles_dir/zsh/functions/python-templates.zsh" ]] && \
source "$_dotfiles_dir/zsh/functions/python-templates.zsh"
Or add to deferred loading section:
_deferred_load() {
# ... existing code ...
# Python templates
[[ -f "$_dotfiles_dir/zsh/functions/python-templates.zsh" ]] && \
source "$_dotfiles_dir/zsh/functions/python-templates.zsh"
}
Documentation Updates Needed
README.md
- Add Python Templates section
- Update aliases table (remove
stats, adddfstats) - Add examples of template usage
SETUP_GUIDE.md
- Add Python project templates section
- Document template configuration options
New Documentation
- Consider creating
docs/PYTHON_TEMPLATES.mdwith detailed examples
Testing Checklist
- Test each template type creates correct structure
- Verify virtual environment creation works
- Test with both venv and Poetry modes
- Confirm git initialization works
- Check that
statsalias is truly removed - Verify
dfstatsstill works correctly - Test on fresh installation
Future Enhancements (v1.3.0)
- Add
py-testtemplate for testing frameworks - Add
py-packagefor PyPI package development - Add
py-mlfor machine learning projects (with more ML tools) - Add interactive template customization wizard
- Support for different Python versions (pyenv integration)
- Add GitHub Actions workflow templates
- Add Docker support for projects