From 45263d788d4ae0a065fa2a2747ebf282ebd29a6d Mon Sep 17 00:00:00 2001 From: Pedro Bizachi Date: Mon, 3 Aug 2026 16:54:55 -0300 Subject: [PATCH 1/4] fix(docs): Fix md link to media on README [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7399e99..a338113 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ and prints their HTTP status. ## Workflow -![workflow-overview](src/media/workflow-overview.png) +![workflow-overview](public/media/workflow-overview.png) ## What we will implement in this repository From 79f4bc0e5238d8a5e295de92e825019b3fda479f Mon Sep 17 00:00:00 2001 From: Pedro Bizachi Date: Tue, 4 Aug 2026 20:47:13 -0300 Subject: [PATCH 2/4] feat(logging): Enhanced logging coloring --- pyproject.toml | 2 +- src/simple_http_checker/cli.py | 41 +++++++++------------------------- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4c2be65..03637f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ version = "1.2.0" description = "A simple CLI tool to check the status of URLs." readme = "README.md" requires-python = ">=3.9" -dependencies = ["click>=8.0,<9.0", "requests>=2.28,<3.0"] +dependencies = ["click>=8.0,<9.0", "requests>=2.28,<3.0", "rich>=15.0,<16.0"] authors = [{ name = "Pedro Lima" }, { email = "bizak.dev@outlook.com" }] license = { text = "MIT" } classifiers = [ diff --git a/src/simple_http_checker/cli.py b/src/simple_http_checker/cli.py index c82fe3b..f635c47 100644 --- a/src/simple_http_checker/cli.py +++ b/src/simple_http_checker/cli.py @@ -1,43 +1,22 @@ import logging from collections.abc import Collection -from typing import ClassVar import click +from rich.logging import RichHandler from simple_http_checker.checker import check_urls - -class ColoredLevelFormatter(logging.Formatter): - LEVEL_COLORS: ClassVar[dict[int, str]] = { - logging.DEBUG: "cyan", - logging.INFO: "green", - logging.WARNING: "yellow", - logging.ERROR: "red", - logging.CRITICAL: "magenta", - } - - def format(self, record: logging.LogRecord) -> str: - original_levelname = record.levelname - color = self.LEVEL_COLORS.get(record.levelno) - if color: - record.levelname = click.style(record.levelname, fg=color) - - try: - return super().format(record) - finally: - record.levelname = original_levelname - - -handler = logging.StreamHandler() -handler.setFormatter( - ColoredLevelFormatter( - fmt="[%(asctime)s] %(levelname)s: %(message)s", - datefmt="%Y-%m-%d %H:%M:%S", - ) +logging.basicConfig( + level=logging.INFO, + format="%(message)s", + datefmt="%Y-%m-%d %H:%M:%S", + handlers=[ + RichHandler( + show_path=False, + ) + ], ) -logging.basicConfig(level=logging.INFO, handlers=[handler]) - logger = logging.getLogger(__name__) From 313b84c121f62c8e49bb8a4eae515591e63c34fc Mon Sep 17 00:00:00 2001 From: Pedro Bizachi Date: Tue, 4 Aug 2026 22:37:19 -0300 Subject: [PATCH 3/4] feat(docs): Added tags to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a338113..5ab3905 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +[![Supported Python Versions](https://img.shields.io/pypi/pyversions/simple-http-checker-PedroLima)](https://pypi.org/project/simple-http-checker-PedroLima/) +[![PyPI version](https://img.shields.io/pypi/v/simple-http-checker-PedroLima)](https://pypi.org/project/simple-http-checker-PedroLima/) +[![Downloads](https://pepy.tech/badge/simple-http-checker-PedroLima/month)](https://pepy.tech/project/simple-http-checker-PedroLima) +[![CI/CD](https://github.com/PedroBizachi/python-devops-cicd-project/actions/workflows/python-ci.yaml/badge.svg)](https://github.com/PedroBizachi/python-devops-cicd-project/actions/workflows/python-ci.yaml) +[![Publish](https://github.com/PedroBizachi/python-devops-cicd-project/actions/workflows/publish.yaml/badge.svg)](https://github.com/PedroBizachi/python-devops-cicd-project/actions/workflows/publish.yaml) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) # Python for DevOps: CI/CD for Python Projects From 905bcf9ded4c0a768b04bd0f7a944874188c1efd Mon Sep 17 00:00:00 2001 From: Pedro Bizachi Date: Tue, 4 Aug 2026 22:38:07 -0300 Subject: [PATCH 4/4] fix(pyproject): Correct link to documentation --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 03637f2..8dd2219 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ [project.urls] Homepage = "https://github.com/PedroBizachi/python-devops-cicd-project" -Documentation = "https://github.com/lm-academy/python-devops-cicd-project/blob/main/README.md" +Documentation = "https://github.com/PedroBizachi/python-devops-cicd-project/blob/main/README.md" Repository = "https://github.com/PedroBizachi/python-devops-cicd-project" Issues = "https://github.com/PedroBizachi/python-devops-cicd-project/issues" Changelog = "https://github.com/PedroBizachi/python-devops-cicd-project/blob/main/CHANGELOG.md"