Skip to main content

Studying github CI/CD

Project description

mykhcolors

Python Versions Lint Tests Type Check

A minimal Python package providing ANSI colored text functions for terminal output, designed to study GitHub CI/CD workflows, Hatch dev environments, testing with pytest, linting with Ruff, and type checking with Mypy.


Features

  • Red, Green, Yellow text functions for terminal output
  • Compatible with src/ layout
  • Editable install for development
  • Tested with pytest
  • Linted with Ruff
  • Type-checked with Mypy

Installation

From GitHub

Clone the repository and install editable:

git clone git@github.com:khtestingo/testing_cicd.git
cd testing_cicd
pip install -e .

Now you can use the command:

mykhcolors

Or import functions in Python:

from mykhcolors import red, green, yellow

print(red("Hello"))
print(green("World"))
print(yellow("!"))

From PyPI Once uploaded to PyPI:

pip install mykhcolors

Development

Run Tests

Using Hatch:

hatch run test

Or directly:

python -m pytest

Linting

ruff check src tests

Type Checking

mypy src tests

CI/CD Workflow

GitHub Actions workflow includes:

  • Ruff (linting)
  • Mypy (type checking)
  • pytest (tests)

Supports multiple Python versions:

3.8, 3.9, 3.10, 3.11, 3.12

Workflow uses Hatch editable environment so src/ layout works seamlessly.

Project Layout

Skopiuj kod
testing_cicd/
├── src/
│   └── mykhcolors/
│       ├── __init__.py
│       ├── colors.py
│       └── __about__.py
├── tests/
│   └── test_colors.py
├── pyproject.toml
├── README.md
└── .github/workflows/ci.yml

License

MIT License © khaz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mykhcolors-0.5.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mykhcolors-0.5.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file mykhcolors-0.5.4.tar.gz.

File metadata

  • Download URL: mykhcolors-0.5.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.11.14 HTTPX/0.28.1

File hashes

Hashes for mykhcolors-0.5.4.tar.gz
Algorithm Hash digest
SHA256 9a36c0a29093dda90e735b28c1894f3578b5a0058bbb9ec4e49cfe45c278eb86
MD5 3e698b50ff3deb712c2d4b75e5502e81
BLAKE2b-256 64a4b852d3c168f1c6f310f89f843602089f05b03415bb1b1cbedbc73c526ff9

See more details on using hashes here.

File details

Details for the file mykhcolors-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: mykhcolors-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.11.14 HTTPX/0.28.1

File hashes

Hashes for mykhcolors-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 edb42e96e3595c1d0ae3cd69bef44d0f1028a299c2c9ebb5ae367608b87a23a9
MD5 6171858eaf5dcdeb4cac82fef6c71937
BLAKE2b-256 657d40f7dc07f5b9398e80b674ab6ccaf9f1c4f2cdf96f3f9a1a830617db463a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page