Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ How would users interact with this feature? If applicable, provide example code

```python
# Example code demonstrating how the feature would be used
from my_python_package import new_feature
from greeting_toolkit import new_feature

new_feature.do_something()
```
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Run tests with coverage
run: |
poetry run pytest --cov=my_python_package --cov-report=xml --cov-report=term
poetry run pytest --cov=greeting_toolkit --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy Documentation

on:
push:
branches: ["main"]
workflow_dispatch:

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install --with docs
- name: Build docs
run: |
poetry run make -C docs html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ jobs:
# Update the links at the bottom
if grep -q "\[unreleased\]:" CHANGELOG.md; then
sed -i "s|\[unreleased\]:.*|[unreleased]: https://github.com/DiogoRibeiro7/my_python_package/compare/v${{ steps.extract_version.outputs.version }}...HEAD|" CHANGELOG.md
sed -i "/\[unreleased\]:/a [{{ steps.extract_version.outputs.version }}]: https://github.com/DiogoRibeiro7/my_python_package/compare/v$(git describe --tags --abbrev=0 ${{ github.ref_name }}^)...v${{ steps.extract_version.outputs.version }}" CHANGELOG.md
sed -i "s|\[unreleased\]:.*|[unreleased]: https://github.com/DiogoRibeiro7/greeting-toolkit/compare/v${{ steps.extract_version.outputs.version }}...HEAD|" CHANGELOG.md
sed -i "/\[unreleased\]:/a [{{ steps.extract_version.outputs.version }}]: https://github.com/DiogoRibeiro7/greeting-toolkit/compare/v$(git describe --tags --abbrev=0 ${{ github.ref_name }}^)...v${{ steps.extract_version.outputs.version }}" CHANGELOG.md
fi
fi
fi
Expand All @@ -215,4 +215,4 @@ jobs:
if: success()
run: |
echo "✅ Package v${{ steps.extract_version.outputs.version }} has been released to PyPI!"
echo "📦 https://pypi.org/project/my-python-package/${{ steps.extract_version.outputs.version }}/"
echo "📦 https://pypi.org/project/greeting-toolkit/${{ steps.extract_version.outputs.version }}/"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Run tests with coverage
run: |
poetry run pytest --cov=my_python_package --cov-report=xml
poetry run pytest --cov=greeting_toolkit --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
21 changes: 13 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^mkdocs\.yaml$
- id: check-toml
- id: check-added-large-files
- id: check-ast
Expand All @@ -15,38 +16,42 @@ repos:
args: [--fix=lf]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
args: [--profile, black, --filter-files]

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 25.1.0
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
rev: v0.12.9
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.17.1
hooks:
- id: mypy
additional_dependencies: [types-all]
files: ^src/
# Use only the required typing stubs instead of the heavy types-all package.
additional_dependencies:
# Stub package for setuptools (includes pkg_resources types)
- types-setuptools

- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
rev: 1.8.6
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
exclude: "tests/"

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py310-plus]
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- Fixed GitHub Actions permissions for the code coverage workflow

### Migration

- Renamed package from `my_python_package` to `greeting-toolkit`. Update imports to `greeting_toolkit` and CLI usage to `greeting-toolkit`.

## [0.1.1] - 2025-08-14

### Added
Expand All @@ -48,6 +52,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Basic project structure
- MIT License

[0.1.0]: https://github.com/DiogoRibeiro7/my_python_package/releases/tag/v0.1.0
[0.1.1]: https://github.com/DiogoRibeiro7/my_python_package/compare/v0.1.0...v0.1.1
[unreleased]: https://github.com/DiogoRibeiro7/my_python_package/compare/v0.1.1...HEAD
[0.1.0]: https://github.com/DiogoRibeiro7/greeting-toolkit/releases/tag/v0.1.0
[0.1.1]: https://github.com/DiogoRibeiro7/greeting-toolkit/compare/v0.1.0...v0.1.1
[unreleased]: https://github.com/DiogoRibeiro7/greeting-toolkit/compare/v0.1.1...HEAD
10 changes: 6 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Contributing to my_python_package
# Contributing to greeting-toolkit

Thank you for considering contributing to my_python_package! This document provides guidelines and instructions for contributing.
Thank you for considering contributing to greeting-toolkit! This document provides guidelines and instructions for contributing.

> **Migration note:** The project was renamed from `my_python_package` to `greeting-toolkit`. Update imports to `greeting_toolkit` and CLI usage to `greeting-toolkit`.
## Code of Conduct

Expand Down Expand Up @@ -43,8 +45,8 @@ For feature requests, please use the feature request template. Include:

1. Clone the repository:
```bash
git clone https://github.com/DiogoRibeiro7/my_python_package.git
cd my_python_package
git clone https://github.com/DiogoRibeiro7/greeting-toolkit.git
cd greeting-toolkit
```

2. Set up the development environment:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributors

This file lists the contributors to the `my_python_package` project.
This file lists the contributors to the `greeting-toolkit` project.

## Core Contributors

Expand All @@ -17,7 +17,7 @@ Template for new contributors:

## How to Contribute

Thank you for considering contributing to `my_python_package`! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute to this project.
Thank you for considering contributing to `greeting-toolkit`! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute to this project.

## Contributor License Agreement

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ RUN poetry install
ENTRYPOINT ["poetry", "run"]

# Default command
CMD ["python", "-m", "my_python_package"]
CMD ["python", "-m", "greeting_toolkit"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test:
poetry run pytest

test-cov:
poetry run pytest --cov=my_python_package --cov-report=term-missing
poetry run pytest --cov=greeting_toolkit --cov-report=term-missing

tox:
poetry run tox
Expand Down
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# my_python_package
# greeting-toolkit

[![PyPI version](https://img.shields.io/pypi/v/my_python_package.svg) ![Docstring Coverage](https://img.shields.io/badge/docstring%20coverage-93.1%25-brightgreen)](https://pypi.org/project/my_python_package/)
[![Python Versions](https://img.shields.io/pypi/pyversions/my_python_package.svg)](https://pypi.org/project/my_python_package/)
[![Tests](https://github.com/DiogoRibeiro7/my_python_package/actions/workflows/test.yml/badge.svg)](https://github.com/DiogoRibeiro7/my_python_package/actions/workflows/test.yml)
[![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen)](https://codecov.io/gh/DiogoRibeiro7/my_python_package)
[![PyPI version](https://img.shields.io/pypi/v/greeting-toolkit.svg)](https://pypi.org/project/greeting-toolkit/)
![Docstring Coverage](https://img.shields.io/badge/docstring%20coverage-93.1%25-brightgreen)
[![Python Versions](https://img.shields.io/pypi/pyversions/greeting-toolkit.svg)](https://pypi.org/project/greeting-toolkit/)
[![Tests](https://github.com/DiogoRibeiro7/greeting-toolkit/actions/workflows/test.yml/badge.svg)](https://github.com/DiogoRibeiro7/greeting-toolkit/actions/workflows/test.yml)
[![Coverage](https://codecov.io/gh/DiogoRibeiro7/greeting-toolkit/branch/main/graph/badge.svg)](https://codecov.io/gh/DiogoRibeiro7/greeting-toolkit)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/badge/ruff-enabled-brightgreen)](https://github.com/astral-sh/ruff)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat)](https://pycqa.github.io/isort/)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)

A minimal but production-ready Python package scaffold configured for publishing to [PyPI](https://pypi.org).
**greeting-toolkit** is a minimal but production-ready Python package scaffold configured for publishing to [PyPI](https://pypi.org).

## Features

- 🚀 Modern Python packaging with Poetry
- 🔧 Configurable greeting functions with multiple formatting options
- 🧪 Comprehensive testing suite with 100% coverage
- 🧪 Comprehensive testing suite with over 95% coverage
- 📊 Continuous Integration workflows for testing, coverage, and releases
- 🛠️ Code quality tools preconfigured (black, ruff, mypy, isort, pre-commit)
- 📝 Complete documentation with doctests
Expand All @@ -31,18 +32,18 @@ A minimal but production-ready Python package scaffold configured for publishing

```bash
# Using pip
pip install my_python_package
pip install greeting-toolkit

# Using Poetry
poetry add my_python_package
poetry add greeting-toolkit
```

### For Development

```bash
# Clone the repository
git clone https://github.com/DiogoRibeiro7/my_python_package.git
cd my_python_package
git clone https://github.com/DiogoRibeiro7/greeting-toolkit.git
cd greeting-toolkit

# Using Poetry (recommended)
poetry install
Expand All @@ -59,7 +60,7 @@ make setup
### Basic Greeting

```python
from my_python_package import hello
from greeting_toolkit import hello

# Basic usage
greeting = hello("World")
Expand All @@ -73,7 +74,7 @@ print(custom) # Output: Hi, Python!
### Formatted Greetings

```python
from my_python_package import format_greeting
from greeting_toolkit import format_greeting

# Default formatting
print(format_greeting("World")) # Output: Hello, World!
Expand All @@ -93,7 +94,7 @@ print(format_greeting("Very Long Name", max_length=15)) # Output: Hello, Very..
### Multiple Greetings

```python
from my_python_package import create_greeting_list
from greeting_toolkit import create_greeting_list

# Greet multiple people
greetings = create_greeting_list(["Alice", "Bob", "Charlie"])
Expand All @@ -104,7 +105,7 @@ for greeting in greetings:
### Context-Aware Greetings

```python
from my_python_package import generate_greeting
from greeting_toolkit import generate_greeting

# Time-based greeting (morning/afternoon/evening)
print(generate_greeting("World", time_based=True))
Expand All @@ -116,7 +117,7 @@ print(generate_greeting("Mrs. Smith", formal=True))
### Random Greetings

```python
from my_python_package import random_greeting
from greeting_toolkit import random_greeting

# Get a random greeting
print(random_greeting("World")) # Different greeting each time
Expand All @@ -128,19 +129,19 @@ The package also provides a command-line interface:

```bash
# Basic greeting
my-python-package hello World
greeting-toolkit hello World

# Random greeting
my-python-package random World
greeting-toolkit random World

# Time-based greeting
my-python-package time World --formal
greeting-toolkit time World --formal

# Multiple names
my-python-package multi Alice Bob Charlie --greeting "Greetings"
greeting-toolkit multi Alice Bob Charlie --greeting "Greetings"

# Formatted greeting
my-python-package format World --greeting "Welcome" --uppercase --max-length 15
greeting-toolkit format World --greeting "Welcome" --uppercase --max-length 15
```

## Development
Expand Down Expand Up @@ -276,7 +277,7 @@ The repository includes GitHub Actions for:
## Project Structure

```text
my_python_package/
greeting_toolkit/
├── pyproject.toml # Project metadata, dependencies
├── README.md # Project overview
├── LICENSE # MIT license
Expand All @@ -294,7 +295,7 @@ my_python_package/
├── requirements.txt # Dependencies for simple installation
├── dev-requirements.txt # Development dependencies
├── src/
│ └── my_python_package/ # Package source code
│ └── greeting_toolkit/ # Package source code
│ ├── __init__.py # Package exports
│ ├── __main__.py # Module execution entry point
│ ├── core.py # Core greeting functionality
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ pytest-sugar>=1.0.0
pre-commit>=3.6.2
tox>=4.13.0
pdoc>=14.3.0
types-all>=1.0.0
types-setuptools>=0.1
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
dockerfile: Dockerfile
volumes:
- .:/opt/pysetup
command: python -m my_python_package
command: python -m greeting_toolkit

test:
build:
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Custom styles for my_python_package documentation */
/* Custom styles for greeting_toolkit documentation */

/* Improve code block appearance */
div[class^="highlight"] {
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Custom JavaScript for my_python_package documentation
// Custom JavaScript for greeting_toolkit documentation

document.addEventListener('DOMContentLoaded', function() {
// Add copy buttons to code blocks
Expand Down
Loading
Loading