Metadata-Version: 2.4
Name: krag_mathlib
Version: 0.1.17
Summary: A clean mathematical utility package.
Author-email: "Kenura R. Gunarathna" <kenuragunarathna@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Kenura R. Gunarathna
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/Kenura-R-Gunarathna/mathlib
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: license-file

# krag-mathlib

`krag-mathlib` is a Python library for performing mathematical operations like addition, subtraction, and more.

---

## 📑 Table of Contents

1. [Introduction](#introduction)
2. [Installation](#installation)
3. [Development Workflow](#development-workflow)

   * [Run Tests](#1-pytest--q---run-your-tests)
   * [Editable Install](#2-pip-install-e---editable-install-development-mode)
   * [Build Package](#3-python--m-build---create-release-artifacts)
4. [Publishing](#publishing)
5. [Usage](#usage)
6. [Contributing](#contributing)
7. [License](#license)

---

## Introduction

`krag-mathlib` provides a clean and simple interface for performing common mathematical operations. It is designed for Python developers who want a lightweight, easy-to-use library for basic calculations.

---

## Installation

Install the package from PyPI:

```bash
pip install krag-mathlib
```

For development with optional dependencies (for testing, etc.):

```bash
pip install .[dev]
```

---

## Development Workflow

### 1. `pytest -q` — Run your tests

Run:

```bash
pytest -q
```

Use it to test your package code during:

* Development
* Before committing
* Before releasing/publishing

This ensures your package works correctly in your local environment.

---

### 2. `pip install -e .` — Editable install (development mode)

Run:

```bash
pip install -e .
```

Use editable mode to:

* Use the package in another project
* Test imports without reinstalling
* Develop multiple packages simultaneously

Changes in:

```
src/krag_mathlib/
```

are immediately reflected everywhere Python imports `krag_mathlib`.

---

### 3. `python -m build` — Create release artifacts

Run:

```bash
python -m build
```

This creates:

```
dist/krag_mathlib-0.1.0-py3-none-any.whl
" +
"dist/krag_mathlib-0.1.0.tar.gz
```

Use this before:

* Releasing on GitHub
* Publishing to PyPI
* Sharing the library

---

## Publishing

### PyPI

```bash
twine upload dist/*
```

### GitHub

* Upload wheel + tar.gz to a release

---

## Usage

Install from PyPI:

```bash
pip install krag-mathlib
```

Then use in your code:

```python
from krag_mathlib import add, subtract

def main():
    a = 10
    b = 5

    sum_result = add(a, b)
    diff_result = subtract(a, b)

    print(f"The sum of {a} and {b} is: {sum_result}")
    print(f"The difference when {b} is subtracted from {a} is: {diff_result}")

if __name__ == "__main__":
    main()
```

**Note:** The PyPI package name is `krag-mathlib`, but the import is `krag_mathlib` (matching the internal folder name).

---

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests:

```bash
pytest -q
```

5. Submit a pull request

---

## License

This project is licensed under the MIT License.
