This template provides a complete setup for Python projects with automated GitHub repository creation and PyPI package publishing capabilities.
- Automated GitHub repository setup
- PyPI package publishing workflow
- Code formatting with Black, Ruff, and isort
- Code quality checks with Flake8 and Pyright
- Test coverage with Pytest
- Project archiving functionality
- Comprehensive workflow automation
The main setup script that:
- Configures project structure
- Sets up GitHub repository
- Installs dependencies
- Creates necessary configuration files
Key components of the script:
- Package management functions
- GitHub repository setup
- Project file generation
- Version control initialization
The script uses a comprehensive project_info
dictionary that contains:
project_info = {
"templates": {
# File templates for pyproject.toml, setup.py, etc.
},
"classifiers": {
# PyPI project classifiers
},
"setup": {
"paths": {
# Project file paths configuration
},
"classifiers": {
# Project-specific classifiers
},
"version": "0.1.1",
"description": "",
"user_config": {
# User information
},
"urls": {
# Project URLs
},
"requirements": [
# Project dependencies
],
"nix_packages": [
# Nix environment packages
],
"required_packages": [
# Essential packages for setup
]
}
}
- pypi_upload.py: Handles PyPI package versioning and publishing
- create_zip.py: Creates project archives
-
Ensure environment variables are set:
- GITHUB_TOKEN
- REPLIT_TOKEN
- PYPI_TOKEN (for publishing)
-
Run the prepare environment script:
python scripts/prepare_environment.py
-
Use the Tools menu in Replit to run workflows for:
- Code formatting
- Testing
- Package publishing
- Project archiving
├── scripts/ # Utility scripts
├── src/ # Source code
├── tests/ # Test files
├── logs/ # Log outputs
├── zip/ # Archive storage
└── assets/ # Project assets