Skip to content

fbidu/cookie-py

Repository files navigation

Bidu's Python Template

License: GPL v3

copier copy gh:fbidu/cookie-py my-project


🇬🇧 English Description

Esse é um modelo de projeto Python usando Copier que inclui várias ferramentas modernas que gosto de usar.

Um template Copier serve para criar novos projetos com base em um formato pré-definido. No caso em todo projeto Python, eu gosto de usar certas ferramentas como Ruff, PyTest, Pyright, Pre-Commit e uv. Esse meu modelo instala tudo e configura tudo isso para mim!

É um modelo fortemente enviesado para o que eu gosto, uma vez que ele reflete minhas escolhas particulares sobre ferramentas, análises estáticas, hooks e etc.

Sinta-se livre para usar, forkear e modificar a vontade!

Uso

  1. Instale o uv
  2. Instale o Copier: uv tool install copier
  3. Execute copier copy gh:fbidu/cookie-py meu-projeto
  4. O seu terminal irá te perguntar tudo o que precisar!

Itens Inclusos

Itens marcados estão implementados!

  • Usar o uv para gerenciar pacotes e ambientes virtuais
  • Usar o pre-commit para cuidar de hooks pre-commit do git
  • Instalar o Pytest com plugins úteis (coverage, xdist, randomly)
  • Instalar o Ruff para formatação e linting
  • Instalar o Pyright para verificação de tipos
  • Executar Pytest pre-push
  • Relatório de Coverage no Pytest
  • Configurações modernas em pyproject.toml
  • Pipeline de CD opcional (GitHub Actions ou Homelab/GitLab)
  • Atualização de projetos existentes com copier update

Hooks de Pre-Commit Habilitados

  • Ruff (linting e formatação)
  • Pyright (verificação de tipos)
  • Bandit (segurança)
  • Hooks básicos (trailing whitespace, end-of-file, etc.)

English

This is a Python project template using Copier that includes modern tools I like to use.

A Copier template is useful to create new projects based on a pre-defined model. In every Python project I like to use some tools like Ruff, PyTest, Pyright, Pre-Commit and uv. This template installs and sets up all those tools for me!

It is highly opinionated since it reflects my personal choices about tooling, static analysis, hooks and so on.

Feel free to use, fork and modify at will!

Usage

  1. Install uv
  2. Install Copier: uv tool install copier
  3. Run copier copy gh:fbidu/cookie-py my-project
  4. Your terminal will ask you everything it needs!

Batteries Included

Checked items are implemented

  • Use uv to manage packages and virtual environments
  • Use Pre-commit to handle git pre-commit hooks
  • Install Pytest with useful plugins (coverage, xdist, randomly)
  • Install Ruff for linting and formatting
  • Install Pyright for type checking
  • Run Pytest pre-push
  • Coverage report on Pytest
  • Modern pyproject.toml configuration
  • Optional CD pipeline (GitHub Actions or Homelab/GitLab)
  • Update existing projects with copier update

Pre-Commit Hooks

  • Ruff (linting and formatting)
  • Pyright (type checking)
  • Bandit (security)
  • Basic hooks (trailing whitespace, end-of-file, etc.)

About

My personal Python cookiecutter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors