semvec/pypi-packages huggingface dataset:
tarski-tmp 0.8.5
This is a fork of Tarski, a framework for the specification, modeling and manipulation of AI planning problems.
Requires Python: >=3.6
Keywords: planning logic STRIPS RDDL

⚠️ This is a fork of Tarski. Please use the main one.

------

# Tarski - An AI Planning Modeling Framework 
[![Unit Tests](https://github.com/aig-upf/tarski/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/aig-upf/tarski/actions/workflows/unit-tests.yml)
[![Documentation Status](https://readthedocs.org/projects/tarski/badge/?version=latest)](https://tarski.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/aig-upf/tarski/branch/master/graph/badge.svg)](https://codecov.io/gh/aig-upf/tarski)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tarski.svg?style=popout)
![PyPI](https://img.shields.io/pypi/v/tarski.svg?style=popout)


## What is Tarski
Tarski is a framework for the specification, modeling and manipulation of 
[AI planning](https://en.wikipedia.org/wiki/Automated_planning_and_scheduling) problems.
Tarski is written in Python and includes parsers for major modeling languages
(e.g., [PDDL](https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language),
[FSTRIPS](https://dl.acm.org/citation.cfm?id=566359),
[RDDL](https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language#RDDL)), 
along with modules to perform other common tasks such as logical transformations,
reachability analysis, grounding of first-order representations and problem reformulations.


**Installation**: Check the [*installation instructions*](docs/installation.md).

**Documentation**: Read the [*documentation of the project*](https://tarski.readthedocs.io).

**Testing**: Most tests can be run by executing `pytest` on the root directory.
Alternatively, they can be run through `tox`, for which several testing environments [are defined](tox.ini).

## How to Cite

If you find `tarski` useful in your research, you can cite it with the following `bibtex` entry:

```
@misc{tarski:github:18,
  author = {Guillem Franc\'{e}s and Miquel Ramirez and Collaborators},
  title = {Tarski: An {AI} Planning Modeling Framework},
  year = {2018},
  publisher = {{GitHub}},
  journal = {{GitHub} repository},
  howpublished = {\url{https://github.com/aig-upf/tarski}}
}
```

## License
Tarski is licensed under the [Apache-2.0 License](LICENSE).
pytest-llm 0.1.0
pytest-llm: A pytest plugin for testing LLM outputs with success rate thresholds.
Requires Python: >=3.10

# pytest-llm

Fast AI reliability test suite

A pytest plugin that provides a custom marker for testing LLM (Large Language Model) outputs with configurable success rate thresholds.

## Usage

```python
import pytest

@pytest.mark.llm("How many R's are in the Word 'Strawberry'?", 0.9)
def test_counting(prompt, llm):
    result = llm(prompt).lower()
    assert ("3" in result) or ("three" in result)
```

## Setup

```bash
python3 -m pip install -e pytest-llm
```

```python
# conftest.py
import os
import typing

import httpx
import ollama
import pytest


def github_models_complete(prompt, model=None, system=None) -> str:
    messages = [{"role": "system", "content": system}] if system else []
    messages += [{"role": "user", "content": prompt}]
    if GITHUB_TOKEN := os.getenv("GITHUB_TOKEN"):
        response = httpx.post(
            "https://models.github.ai/inference/chat/completions",
            headers={
                "Content-Type": "application/json",
                "Accept": "application/vnd.github+json",
                "Authorization": f"Bearer {GITHUB_TOKEN}",
                "X-GitHub-Api-Version": "2022-11-28",
            },
            json={
                "model": model or "openai/gpt-5-nano",
                "messages": messages,
            },
        )
        response.raise_for_status()
        return response.json()["choices"][0]["message"]["content"]
    else:
        return ollama.generate(model="llama3.2", prompt=prompt).response


@pytest.fixture
def llm() -> typing.Callable[[str], str]:
    # This fixture isn't needed but might be convenient
    return github_models_complete


def pytest_llm_complete(config):
    # This pytest hook will provide enable the plugin to generate random prompts
    return github_models_complete
```

## Running Tests

```bash
pytest -m llm
# or to run non-llm tests
pytest -m "not llm"
```