Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ jobs:
run: poetry install --no-interaction --with dev

- name: Run tests (full suite)
run: poetry run pytest --cov --cov-report=term-missing
run: poetry run pytest --cov --cov-branch --cov-report=xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5

docs:
name: Build docs (mkdocs)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Python Project Template
![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fgemmadanks%2Fpython-project-template%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)
[![codecov](https://codecov.io/gh/gemmadanks/python-project-template/graph/badge.svg?token=SJVFI32RHC)](https://codecov.io/gh/gemmadanks/python-project-template)
[![CI](https://github.com/gemmadanks/python-project-template/actions/workflows/ci.yaml/badge.svg?branch=main)](.github/workflows/ci.yaml)
[![release-please](https://github.com/gemmadanks/python-project-template/actions/workflows/release-please.yaml/badge.svg)](release-please-config.json)
[![Docs (GitHub Pages)](https://github.com/gemmadanks/python-project-template/actions/workflows/docs-pages.yaml/badge.svg)](https://github.com/gemmadanks/python-project-template/actions/workflows/docs-pages.yaml)
Expand All @@ -10,7 +11,7 @@
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

A minimal, opinionated template for modern Python projects -- featuring Poetry packaging, Ruff for linting and formatting, pytest testing, MkDocs documentation with configuration for Read The Docs, pre-commit hooks, GitHub Actions CI, GitHub issue and pull request templates and automated semantic releases.
A minimal, opinionated template for modern Python projects -- featuring Poetry packaging, Ruff for linting and formatting, pytest testing with code coverage upload to codecov, MkDocs documentation with configuration for Read The Docs, pre-commit hooks, GitHub Actions CI, GitHub issue and pull request templates and automated semantic releases.

The goal is to help you start writing code immediately without having to spend time deciding what tools or conventions to use.

Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,23 @@ dependencies = [
[dependency-groups]
dev = [
"pytest (>=8.4.2,<9.0.0)",
"pytest-cov (>=7.0.0,<8.0.0)",
"ruff (>=0.13.1,<0.15.0)",
"pre-commit (>=4.3.0,<5.0.0)",
"pyright (>=1.1.406,<2.0.0)"
"pyright (>=1.1.406,<2.0.0)",
"pytest-cov (>=7.0.0,<8.0.0)"
]
docs = [
"mkdocs",
"mkdocstrings[python]",
"mkdocs-material"
]

[tool.coverage.run]
source = ["package_name"]
omit = [
"tests/*",
"conftest.py"
]

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
Expand Down