Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on **Keep a Changelog**,
and this project adheres to **Semantic Versioning**.

* Keep a Changelog: [https://keepachangelog.com/en/1.1.0/](https://keepachangelog.com/en/1.1.0/)
* Semantic Versioning: [https://semver.org/](https://semver.org/)

---

## [Unreleased]

### Added

* Initial project structure
* Pre-commit hooks for linting, formatting, typing, and security
* Documentation and governance templates

### Changed

* N/A

### Deprecated

* N/A

### Removed

* N/A

### Fixed

* N/A

### Security

* N/A

---

## [0.1.0] - YYYY-MM-DD

### Added

* Initial public release

---

## Versioning Policy

This project follows **Semantic Versioning**:

* **MAJOR** version for incompatible API changes
* **MINOR** version for backward-compatible functionality
* **PATCH** version for backward-compatible bug fixes

---

## How to Update This File

* Update **[Unreleased]** as part of each PR
* Move entries to a new version section at release time
* Keep entries concise and user-focused
* Avoid low-level implementation details

---

## Types of Changes

* **Added** – New features
* **Changed** – Changes in existing functionality
* **Deprecated** – Soon-to-be removed features
* **Removed** – Removed features
* **Fixed** – Bug fixes
* **Security** – Vulnerability-related changes
80 changes: 80 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Code of Conduct

## Our Pledge

We as contributors and maintainers pledge to make participation in this project a respectful and harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

---

## Our Standards

Examples of behavior that contributes to a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Accepting constructive criticism gracefully
* Focusing on what is best for the project and community
* Showing empathy towards other contributors

Examples of unacceptable behavior include:

* Harassment, discrimination, or derogatory comments
* Trolling, insulting or dismissive remarks
* Public or private harassment
* Publishing others’ private information without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

---

## Enforcement Responsibilities

Project maintainers are responsible for clarifying standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Maintainers have the right and responsibility to remove, edit, or reject contributions that are not aligned with this Code of Conduct.

---

## Scope

This Code of Conduct applies within all project spaces, including:

* GitHub issues and pull requests
* Discussions and code reviews
* Project documentation
* Community interactions related to this project

---

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainers at:

**<your.name@example.com>**

Since this is a template project, the contact email has been left as a dummy, please update this while using the template in your project.

All complaints will be reviewed and investigated promptly and fairly.
Confidentiality will be respected where possible.

---

## Enforcement Guidelines

Maintainers will follow these principles when enforcing this Code of Conduct:

1. **Correction** – A private or public warning
2. **Temporary Ban** – Temporary restriction from participation
3. **Permanent Ban** – Permanent removal from the project community

The response will depend on the severity and context of the violation.

---

## Attribution

This Code of Conduct is adapted from the
[Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

---

By participating in this project, you agree to abide by this Code of Conduct.
164 changes: 164 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Contributing Guide

Thank you for your interest in contributing to this project.
Contributions are welcome, but please read this document carefully before opening an issue or pull request.

This project prioritizes **code quality, clarity, and long-term maintainability** over rapid feature growth.

---

## Ways to Contribute

You can contribute by:

* Reporting bugs
* Proposing new features or improvements
* Improving documentation
* Submitting code changes
* Reviewing pull requests

Before starting work, please check existing issues and pull requests to avoid duplication.

---

## Development Setup

### Prerequisites

* Python 3.9 or newer
* `uv` (recommended) or `pip`
* `git`

### Clone and Install

```bash
git clone https://github.com/lfagotbouquet/template_python
cd template_python

# Create a virtual environment
uv venv
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to add uv in a separate PR and to try to remove pip when doing it, WDYT?

I have the feeling that adding uv but continuing to rely on pip isn't really the proper way to use uv even if it's of course possible.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think the README.md file is still relying on pyenv right?

source .venv/bin/activate

# Install dependencies
uv pip install -r requirements.txt

# Install the project in editable mode
uv pip install -e .

# Install pre-commit hooks
pre-commit install
```

---

## Code Standards

This project enforces strict automated checks.

### Formatting and Linting

* **Ruff** is used for linting and formatting
* Manual formatting is discouraged; rely on tooling instead

Run locally:

```bash
pre-commit run --all-files
```

### Typing

* **Mypy** is used with a strict configuration
* **Bandit** is used to catch early security issues
* New code must include type annotations
* Public APIs must be fully typed

### Tests

* **Pytest** is used for testing
* New features and bug fixes must include tests
* Tests should be deterministic and fast

Run tests with:

```bash
python -m pytest tests/
```

---

## Commit Messages

This project follows **Conventional Commits**. Please read the docs here for more information [DOCS](https://www.conventionalcommits.org/en/v1.0.0/#specification)

Examples:

* `feat: add decrement CLI command`
* `fix: handle empty config file`
* `docs: update installation instructions`
* `refactor: simplify config loading logic`

Pull requests with non-conforming commit messages will be rejected.

---

## Pull Request Guidelines

Before opening a pull request:

* Ensure all pre-commit checks pass
* Ensure tests pass locally
* Keep changes focused and minimal
* Avoid unrelated refactors
* Update documentation where applicable
* Avoid making large PRs as and where possible

Each pull request should:

* Clearly state **what** is changed
* Clearly explain **why** the change is needed
* Reference relevant issues if applicable

---

## Issue Reporting

When reporting bugs, include:

* A clear description of the problem
* Steps to reproduce
* Expected vs actual behavior
* Python version and environment details
* Relevant logs or stack traces

Incomplete or vague issues may be closed without response.

---

## Design Philosophy

This project favors:

* Explicit over implicit behavior
* Simple solutions over clever ones
* Readability over brevity
* Fewer dependencies over convenience

Changes that significantly increase complexity or maintenance burden may be declined.

---

## Code of Conduct

All contributors are expected to follow the project’s
[Code of Conduct](CODE_OF_CONDUCT.md).

---

## Questions

If you are unsure whether a change is appropriate, open an issue **before** starting work.

---

Thank you for contributing.
Loading