Studying github CI/CD
Project description
mykhcolors
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 Test PyPI Once uploaded to Test PyPI:
pip install --index-url https://test.pypi.org/simple/ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mykhcolors-0.0.1.tar.gz.
File metadata
- Download URL: mykhcolors-0.0.1.tar.gz
- Upload date:
- Size: 3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b89c53dd0ce334b601e15d8a0d77295ed491f167d89d96f9659c0070b0d9e698
|
|
| MD5 |
8325544be86a16fd89de31e40368eab1
|
|
| BLAKE2b-256 |
ac6e3e76d7f9c243d6dae146e2bbea1db490ba847d295acaab26af55559d5dd1
|
File details
Details for the file mykhcolors-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mykhcolors-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0742dd8f9bb3765ca25a7633603847e2f9f1356fbc952e24486518dc688a5b3f
|
|
| MD5 |
4dcb53d999e6c38cf11f9e47534ab150
|
|
| BLAKE2b-256 |
67774298f9e967ec0598d336c638a00e6517f47c0db3306c09f5fd058e9ade4a
|