Metadata-Version: 2.3
Name: crunch-model-runner
Version: 0.1.1
Summary: 
Author: boutrig abdennour
Author-email: abdennour.boutrig@crunchdao.com
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: click (>=8.1.8,<9.0.0)
Requires-Dist: grpcio (>=1.0.0,<2.0.0)
Requires-Dist: importlib (>=1.0.4,<2.0.0)
Requires-Dist: joblib (==1.3.2)
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: protobuf (>=5.29.2,<6.0.0)
Requires-Dist: pyarrow (>=18.1.0,<19.0.0)
Requires-Dist: pytest (>=8.3.4,<9.0.0)
Description-Content-Type: text/markdown

## Model Runner
 
### Getting Started

To get started with this project, follow the steps below:

#### Prerequisites

Make sure you have the following installed:

- **Python 3.11.10** or later
- **Poetry** package manager

#### Installation

1. Clone the repository:
   ```bash
   git clone <repository_url>
   cd <project_folder>
   ```

2. Use Poetry to install the dependencies:
   ```bash
   poetry install
   ```

3. Activate the Poetry virtual environment:
   ```bash
   poetry shell
   ```

#### Generating Protocol Buffers

This project uses [gRPC](https://grpc.io/) for communication. You can generate the necessary gRPC code if you change the `[model_runner.proto](model_runner/protos/model_runner.proto)` file by using the following command:

```bash
poetry run _generate-proto
```

Ensure all `.proto` files are present in the appropriate directory before running the above command.

#### Running the Project

Once dependencies are installed, you can run the main application using:

```bash
poetry run python __main__.py --code-directory tests/models_examples/bill
```

Replace `--code-directory` with the path to the directory containing the code that should be made available remotely.

#### Running Tests

To run the tests for this project, execute:
Make sure the gRPC server is correctly set up and running before running the tests. (Next version of tests will introduce this automatically)

```bash
poetry run pytest
```

### Publishing 

Currently, code delivery is done through a build and push to S3, where the orchestrator retrieves it to build a Docker image  (to improve in the futur)
```bash
poetry run _build-publish
```

#### Additional Notes

- If you need to add new dependencies, use:
  ```bash
  poetry add <package_name>
  ```



