https://github.com/idatsy/python-base
Python project template with default config and CI using poetry
https://github.com/idatsy/python-base
actions ci git poetry pyright pytest python ruff template
Last synced: 4 days ago
JSON representation
Python project template with default config and CI using poetry
- Host: GitHub
- URL: https://github.com/idatsy/python-base
- Owner: idatsy
- Created: 2025-02-03T17:05:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-05T10:39:44.000Z (10 months ago)
- Last Synced: 2026-01-20T17:01:58.202Z (2 months ago)
- Topics: actions, ci, git, poetry, pyright, pytest, python, ruff, template
- Language: Makefile
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Template Python Repository
This repository provides a minimal yet opinionated starting point for Python
projects. It bundles common development tools and a GitHub Actions workflow so
you can focus on writing code rather than configuring your environment.
## Features
- **Poetry** for dependency management
- **Ruff** for formatting and linting
- **Pyright** for static type checking
- **Pytest** for unit tests
- **Wily** for complexity metrics
- **GitHub Actions** for CI (lint, tests and complexity analysis)
- **Makefile** with handy developer commands
## Getting Started
1. **Initialize the project** by running the helper script which replaces
placeholder names with your project name:
```bash
./scripts/init_repo.sh
```
The script infers the project name from the repository directory and updates
files such as `pyproject.toml`, the package directory and tests accordingly.
2. **Install dependencies**:
```bash
poetry install
```
3. **Run code checks** (formatting, linting and type checking):
```bash
make check
```
4. **Execute tests**:
```bash
make test
```
## Common Makefile Commands
- **Format code**: `make format`
- **Run linter**: `make lint`
- **Auto-fix lint issues**: `make lint-fix`
- **Type check**: `make typecheck`
- **Watch tests**: `make watch`
- **Show all commands**: `make help`
## Continuous Integration
The included GitHub Actions workflow runs linting, type checks, unit tests and
complexity analysis for every push and pull request.