Metadata-Version: 2.5
Name: kyoslib_py
Version: 5.7.0
Summary: KYOS shared lib code as python package
Project-URL: Repository, https://github.com/kyosenergy/kyoslib_py
Project-URL: Documentation, https://kyosenergy.github.io/kyoslib_py/
Author-email: KYOS <support@kyos.com>
License-Expression: MIT
License-File: LICENSE.txt
Requires-Python: <3.14,>=3.11
Requires-Dist: boto3<2.0,>=1.34
Requires-Dist: h5py<4.0.0,>=3.9.0
Requires-Dist: numba<0.64.0,>=0.57.1
Requires-Dist: numpy<3.0.0,>=1.24.4
Requires-Dist: pandas<3.0.0,>=2.0.0
Requires-Dist: plotly<8.0.0,>=7.0.0
Requires-Dist: postmarker<2.0,>=1.0
Requires-Dist: requests<3.0.0,>=2.31.0
Description-Content-Type: text/markdown

# kyoslib_py

KYOS shared lib code as python package.

## Usage

Example code:

```python
from kyoslib_py.simulation import Simulation
simulation_set = Simulation()
```

## Installation

```pip install kyoslib_py```

## Dependencies

Python 3.11+

---

## Development

| Command | Description |
|---|---|
| `task` | Run lint + typecheck + test + security |
| `task install` | Install all dependencies |
| `task lint` | Run ruff format check + ruff lint |
| `task format` | Auto-format and fix with ruff |
| `task typecheck` | Run ty type checker |
| `task test` | Run pytest |
| `task test:coverage` | Run pytest with coverage report |
| `task security` | Run bandit SAST + uv audit |
| `task security:bandit` | Run bandit SAST scanner |
| `task security:audit` | Check deps for known CVEs |
| `task build` | Build the sdist and wheel into `dist/` |
| `task publish` | Build and publish to PyPI (needs `UV_PUBLISH_TOKEN`) |
| `task docs:serve` | Live preview of the documentation |
| `task docs:build` | Check that the documentation builds without errors |
| `task docs:deploy` | Deploy the documentation to GitHub Pages |
| `task clean` | Remove build artifacts and caches |

---

## Adding dependencies

```bash
uv add <package>
uv add --dev <package>
```

---

## Documentation

The package documentation is generated by MkDocs and published at
<https://kyosenergy.github.io/kyoslib_py/>. After `task install`, start a local preview server with:

```bash
task docs:serve
```

---

## Releasing

1. Bump `version` in `pyproject.toml` and add a matching entry to `docs/changelog.md`
   (CI checks that the version is in the changelog).
2. On merge to `master`, CI creates a tag for the new version and sends a `publish-to-pypi`
   repository dispatch event, which triggers the `Deploy kyoslib_py` workflow that builds and
   publishes the package to PyPI.

---

## CI

On every PR to `master`:
- **lint** — ruff format + ruff lint
- **typecheck** — ty
- **test** — pytest, on every supported Python version (3.11, 3.12, 3.13)
- **audit** — uv audit (known CVEs in deps)
- **bandit** — bandit SAST scan of `src`
- **secret-scan** — gitleaks (committed secrets)
- **docs** — `mkdocs build --strict`
- **build** — `uv build` (sdist and wheel), once lint, typecheck, test, audit, bandit and secret-scan pass
- **version** — the `pyproject.toml` version is listed in `docs/changelog.md`

On merge to `master`:
- A tag is created if the version is new, and the package is published to PyPI
- The documentation is deployed to GitHub Pages

Renovatebot opens PRs for dependency updates. The `uv-lock-regen` workflow
regenerates `uv.lock` automatically on Renovate PRs.

---

## Project structure

```
src/
  kyoslib_py/      # the package
tests/             # pytest suite
docs/              # MkDocs sources
mkdocs.yml         # MkDocs config
pyproject.toml     # project metadata + tool config
Taskfile.yml       # task runner
renovate.json      # dependency update config
```
