{"id":50521170,"url":"https://github.com/dryvist/python-template","last_synced_at":"2026-06-03T04:03:21.827Z","repository":{"id":304376293,"uuid":"1018591720","full_name":"dryvist/python-template","owner":"dryvist","description":"Professional Python project template with pytest, automated code quality (Black, Ruff, MyPy, Bandit), pre-commit hooks, and GitHub Actions mandating 100% coverage. Targets Python 3.11+ and eliminates boilerplate setup, enabling immediate development with rigorous quality gates for production-ready projects.","archived":false,"fork":false,"pushed_at":"2026-05-29T05:06:44.000Z","size":182,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T05:23:28.894Z","etag":null,"topics":["bandit","best-practices","black","boilerplate","ci-cd","code-coverage","code-quality","github-actions","mypy","pre-commit","pyproject-toml","pytest","python","python-template","ruff","security-scanning","testing","type-checking"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dryvist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-12T15:40:06.000Z","updated_at":"2026-05-26T21:52:41.000Z","dependencies_parsed_at":"2026-05-24T18:01:39.149Z","dependency_job_id":null,"html_url":"https://github.com/dryvist/python-template","commit_stats":null,"previous_names":["jacobpevans/python-template","dryvist/python-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/dryvist/python-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryvist%2Fpython-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryvist%2Fpython-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryvist%2Fpython-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryvist%2Fpython-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dryvist","download_url":"https://codeload.github.com/dryvist/python-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dryvist%2Fpython-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33847265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bandit","best-practices","black","boilerplate","ci-cd","code-coverage","code-quality","github-actions","mypy","pre-commit","pyproject-toml","pytest","python","python-template","ruff","security-scanning","testing","type-checking"],"created_at":"2026-06-03T04:03:19.434Z","updated_at":"2026-06-03T04:03:21.821Z","avatar_url":"https://github.com/dryvist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Project Template\n\n[![Code Quality](https://github.com/JacobPEvans/python-template/actions/workflows/ci.yml/badge.svg)](https://github.com/JacobPEvans/python-template/actions/workflows/ci.yml)\n[![Python Tests](https://github.com/JacobPEvans/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/JacobPEvans/python-template/actions/workflows/tests.yml)\n[![Code Coverage](https://codecov.io/github/JacobPEvans/python-template/graph/badge.svg?token=IFMKOLPQE9)](https://codecov.io/github/JacobPEvans/python-template)\n\nA minimal Python project template following modern best practices and industry standards.\n\n**Author:** JacobPEvans\n**Created:** July 12, 2025\n**License:** [Apache License 2.0](LICENSE)\n**Python Version:** 3.11+\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Python 3.11 or higher\n- Git\n\n### Installation\n\n1. **Clone this repository**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd python-template\n   ```\n\n2. **Create and activate a virtual environment**\n   ```bash\n   # Windows\n   python -m venv .venv\n   .\\.venv\\Scripts\\Activate.ps1\n\n   # Linux/macOS\n   python3 -m venv .venv\n   source .venv/bin/activate\n   ```\n   \u003e **Note**: We use `.venv` as the directory name to match common conventions and ensure it's ignored by git.\n\n3. **Install dependencies**\n   ```bash\n   # Development installation (includes dev dependencies)\n   pip install -e \".[dev]\"\n\n   # Or just production dependencies\n   pip install -e .\n   ```\n   \u003e **Note**: The `-e` flag installs in \"editable\" mode, so changes to your code take effect immediately.\n\n4. **Set up pre-commit hooks (Required for contributing)**\n   ```bash\n   # Pre-commit is already installed with dev dependencies\n   # Install the git hook scripts\n   pre-commit install\n\n   # (Optional) Run on all files to test setup\n   pre-commit run --all-files\n   ```\n   \u003e **Note**: Pre-commit hooks will run automatically on every commit and may auto-fix formatting issues.\n\n## 🧪 Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run tests with coverage\npytest --cov=src/hello_world --cov-report=html\n\n# Run tests with coverage (same as GitHub Actions/CodeCov) - REQUIRES 100% coverage\npytest --cov --cov-branch --cov-report=xml --cov-fail-under=100\n\n# Run tests in verbose mode\npytest -v\n\n# Run specific test file\npytest tests/test_main.py -v\n```\n\n## 100% Code Coverage Required**\n\nThis project enforces 100% code coverage. All pull requests must maintain 100% coverage or they will be automatically rejected by GitHub Actions.\n\nUse `pytest --cov --cov-branch --cov-report=xml --cov-fail-under=100` to ensure your changes meet this requirement before committing.\n\n## 🛠️ Development Tools\n\n### Code Quality \u0026 Pre-commit\n\nThis project uses multiple workflows for maintaining code quality:\n\n#### GitHub Actions\n- **`tests.yml`**: Runs pytest with coverage across Python 3.11-3.13\n- **`ci.yml`**: Enforces code quality with auto-fixing and validation\n\n#### Pre-commit Hooks Setup\nPre-commit hooks automatically run code formatting, linting, and type checking before each commit to ensure code quality.\n```bash\n# Pre-commit is already installed with dev dependencies\n# Install the git hook scripts\npre-commit install\n\n# Test the setup\npre-commit run --all-files\n```\n\n\u003e **Note**: Once installed, pre-commit will automatically run on every `git commit`. If any checks fail, the commit will be blocked until issues are fixed. Code formatting tools like Black and isort will auto-fix many issues.\n\n## Features\n\n- ✅ Modern Python packaging with `pyproject.toml`\n- ✅ Automated testing with pytest and coverage\n- ✅ Dual GitHub Actions workflows (testing + code quality)\n- ✅ Pre-commit hooks for code quality enforcement\n- ✅ Type hints and mypy type checking\n- ✅ Code formatting with Black and isort\n- ✅ Linting with flake8\n- ✅ Pre-configured `.gitignore`\n\n## Project Structure\n\n```\npython-template/\n├── .github/\n│   └── workflows/\n│       ├── tests.yml          # GitHub Actions - Testing\n│       └── ci.yml             # GitHub Actions - Code Quality\n├── src/\n│   └── hello_world/\n│       ├── __init__.py        # Package initialization\n│       └── main.py            # Main application code\n├── tests/\n│   ├── __init__.py            # Test package initialization\n│   └── test_main.py           # Unit tests\n├── .gitignore                 # Git ignore rules\n├── .pre-commit-config.yaml    # Pre-commit hooks configuration\n├── README.md                  # Project documentation\n├── pyproject.toml             # Modern Python packaging \u0026 tool config\n├── pytest.ini                # Pytest configuration\n└── requirements-dev.txt       # Development dependencies\n```\n\n## Quick Setup (Alternative)\n\nIf you prefer the minimal approach:\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd python-template\n   ```\n\n2. Create a virtual environment:\n   ```bash\n   python3 -m venv .venv\n   source .venv/bin/activate  # On Windows: .\\.venv\\Scripts\\activate\n   ```\n\n3. Install dependencies:\n   ```bash\n   pip install -e \".[dev]\"\n   ```\n\n## Usage\n\nRun the hello world application:\n\n```bash\npython -m hello_world.main\n```\n\nOr import and use in your code:\n\n```python\nfrom hello_world import greet\n\nprint(greet(\"Python\"))  # Output: Hello, Python!\n```\n\n## Development\n\n### Running Tests\n\n```bash\npytest tests/ -v\n```\n\n### Running Tests with Coverage\n\n```bash\n# Generate HTML coverage report\npytest tests/ -v --cov=src/hello_world --cov-report=html\n\n# Generate XML coverage report (used by CodeCov in CI)\npytest --cov --cov-branch --cov-report=xml --cov-fail-under=100\n```\n\n### Installing in Development Mode\n\n```bash\npip install -e .\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Run tests with coverage before committing (see coverage requirements above)\n4. Commit your changes (`git commit -m 'Add some amazing feature'`)\n5. Push to the branch (`git push origin feature/amazing-feature`)\n6. Open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdryvist%2Fpython-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdryvist%2Fpython-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdryvist%2Fpython-template/lists"}