Metadata-Version: 2.3
Name: lifeomic-chatbot-tools
Version: 9.0.0
Summary: Utilities for machine learning, web services, and cloud infrastructure.
License: MIT
Author: LifeOmic Development
Author-email: development@lifeomic.com
Requires-Python: >=3.12.0,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Provides-Extra: aws
Provides-Extra: ml
Requires-Dist: boto3 (>=1.21.7,<2.0.0) ; extra == "aws"
Requires-Dist: fastapi (>=0.109.1)
Requires-Dist: httpx (>=0.27.2,<0.28.0)
Requires-Dist: loguru (>=0.5.1,<0.6.0)
Requires-Dist: networkx (>=2.5.1,<3.0.0) ; extra == "ml"
Requires-Dist: numpy (>=1.19.2,<2.0.0) ; extra == "ml"
Requires-Dist: pydantic (>=1.10.17,<3)
Requires-Dist: requests (>=2.21.0,<3.0.0)
Requires-Dist: scikit-learn (>=1.1.3,<2.0.0) ; extra == "ml"
Requires-Dist: tenacity (>=9.1.2,<10.0.0) ; extra == "aws"
Description-Content-Type: text/markdown

# lifeomic-chatbot-tools

Python utilities for machine learning, web services, and cloud infrastructure.
Includes classes and methods for:

1. ML model serialization/deserialization
2. ML model evaluation utilities
3. Data structures/models related to chatbots
4. ML model artifact persistence and version management
5. And more

The data structures in this package can all be found in the
`lifeomic_chatbot_tools.types` sub-package, and are all
[Pydantic](https://pydantic-docs.helpmanual.io/) data models. For example the
`lifeomic_chatbot_tools.types.agent.AgentConfig` class represents a chatbot's
configuration and training data.

## Getting Started

To begin using the package, use your favorite package manager to install it from PyPi.
For example, using pip:

```
pip install lifeomic-chatbot-tools
```

Some of the features in this repo require more heavy weight dependencies, like AWS
related utilities, or utilities specific to machine learning. If you try to import
those features, they will tell you if you do not have the correct package extra
installed. For example, many of the features in the `lifeomic_chatbot_tools.ml`
sub-package require the `ml` extra. To install `lifeomic-chatbot-tools` with that
extra:

```
pip install lifeomic-chatbot-tools[ml]
```

You can then begin using any package features that require ML dependencies.

## Developing Locally

Before making any new commits or pull requests, please complete these steps.

1. Install the Poetry package manager for Python if you do not already have it.
   Installation instructions can be found
   [here](https://python-poetry.org/docs/#installation).
2. Clone the project.
3. From the root directory of the repo, install the dependencies, including all dev
   dependencies and extras:
   ```
   poetry install --all-extras
   ```

## Testing Locally

With Yarn, Docker, and docker-compose installed, run this command from the project
root:

```
poetry run poe ci
```

This will build the project, lint it, and run the unit tests and integration tests.
All those steps can be run individually as well. See the scripts in the `pyproject.toml`
file for the command names.

### MacOS Users

When developing using MacOS, it is recommended to use a dev container. This project supports
[VS Code dev containers](https://code.visualstudio.com/docs/devcontainers/containers) out of
the box.

## Releasing The Package

Releasing the package is automatically handled by CI, but three steps must be taken
to trigger a successful release:

1. Use Poetry's [`version` command](https://python-poetry.org/docs/cli/#version) to
   bump the package's version.
2. Update the [CHANGELOG](./CHANGELOG.md) file with the latest changes added under the new version.
3. Open a PR. When it's merged to `master`, the release will happen automatically.

CI will then build and release the package to pypi with that version once the PR is
merged to `master`.

