Metadata-Version: 2.4
Name: smoek
Version: 1.0.0
Summary: A lightweight optimization modeling library for fast model transformation
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/sandialabs/smoek
Project-URL: Documentation, https://smoek.readthedocs.io
Project-URL: Repository, https://github.com/sandialabs/smoek
Project-URL: Issues, https://github.com/sandialabs/smoek/issues
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pyomo>=6.0
Requires-Dist: munch
Requires-Dist: numpy>=1.20
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-cov>=4.0; extra == "test"
Provides-Extra: poek
Requires-Dist: poek; extra == "poek"
Provides-Extra: coek
Requires-Dist: coek; extra == "coek"
Provides-Extra: backends
Requires-Dist: poek; extra == "backends"
Requires-Dist: coek; extra == "backends"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx-rtd-theme; extra == "dev"
Dynamic: license-file

A lightweight optimization modeling library.

--------------------------------------------------------------------------------

[![CI](https://github.com/sandialabs/smoek/workflows/Tests/badge.svg)](https://github.com/sandialabs/smoek/actions)
[![codecov](https://codecov.io/gh/sandialabs/smoek/branch/main/graph/badge.svg)](https://codecov.io/gh/sandialabs/smoek)
[![Documentation Status](https://readthedocs.org/projects/smoek/badge/?version=latest)](http://smoek.readthedocs.org/en/latest/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![GitHub contributors](https://img.shields.io/github/contributors/sandialabs/smoek.svg)](https://github.com/sandialabs/smoek/graphs/contributors)
[![Merged PRs](https://img.shields.io/github/issues-pr-closed-raw/sandialabs/smoek.svg?label=merged+PRs)](https://github.com/sandialabs/smoek/pulls?q=is:pr+is:merged)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

## Overview

Smoek is an experimental Python modeling environment that uses a
compact abstract model expression to enable fast transformation of model structure, deferred model
instantiation, and code generation. Smoek was designed to support lightweight model declarations
that can be transformed into back-end implementations such as Pyomo, Poek, Coek, and other
modeling languages or specialized solver interfaces. 
Abstract
model descriptions can be written compactly in Python, transformed quickly, and used to generate
efficient concrete optimization models in lower-level or performance-oriented modeling systems.
The overhead for Smoek declarations and problem transformations is minimal, and low-
level modeling libraries like Coek can be leveraged to significantly accelerate model generation.

## Installation

### Basic Installation

Install smoek with pip:

```bash
pip install smoek
```

### With Optional Backends

Smoek supports multiple optimization backends. Install with optional dependencies:

```bash
# Install with poek backend
pip install smoek[poek]

# Install with coek backend  
pip install smoek[coek]

# Install with all backends
pip install smoek[backends]
```

### Development Installation

For contributors and developers:

```bash
git clone https://github.com/sandialabs/smoek.git
cd smoek
conda env create -f dev_environment.yml
conda activate smoek_dev
pip install -e ".[dev]"
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development setup and guidelines.

## Requirements

- Python 3.10 or higher
- Pyomo >= 6.0
- munch
- numpy >= 1.20

## Testing

Smoek tests can be executed using pytest:

```
cd smoek
pytest .
```

If the pytest-cov package is installed, pytest can provide coverage statistics:

```
cd smoek
pytest --cov=smoek .
```

The following options list the lines that are missing from coverage tests:
```
cd smoek
pytest --cov=smoek --cov-report term-missing .
```

Note that pytest coverage includes coverage of test files themselves.  This gives a somewhat skewed sense of coverage for the code base, but it helps identify tests that are omitted or not executed completely.

