semvec/pypi-packages huggingface dataset:
gnomepy-testing 0.2.0
Testing framework for validating market data implementations
Requires Python: >=3.13

# gnomepy-testing

This package is used internally at GTG for testing market data implementations.

## Overview

A comprehensive testing framework for validating Python market data implementations against Java implementations for crypto exchanges using a **Capture Proxy** architecture with **gnomepy** schema types.

### How It Works

1. **Capture Proxy** - Connects to the exchange and receives raw market data
2. **Both clients** (Python & Java) connect to the proxy and receive identical raw messages
3. **Schema Parsing** - Each client parses messages into gnomepy schema objects (MBP1, MBP10, etc.)
4. **Binary Output** - Clients encode schema objects to binary files
5. **Byte-level Comparison** - Binary outputs are compared to verify implementations match exactly

This ensures both implementations receive the exact same data and produce identical binary output.

## Quick Start

```bash
# Install dependencies
poetry install

# Run a quick test (proxy + Python client)
make test-proxy LISTING_ID=1 DURATION=60

# Or manually
# Terminal 1: Start proxy (listing ID 1 = Hyperliquid BTC-USD)
poetry run python -m gnomepy_testing.capture_proxy 1 --duration 60

# Terminal 2: Start Python client
poetry run python -m gnomepy_testing.client.proxy_client \
    --host localhost --port 8765 --output output/python.bin --duration 30
```

## Docker Usage

```bash
# Build
make docker-build

# Run test with default listing (ID 1)
make docker-test

# Custom test with different listing
make docker-test LISTING_ID=2 DURATION=120
```

## Architecture

```
Registry API
     ↓
Listing Resolver (listing_id → exchange/security info)
     ↓
Exchange (Hyperliquid/Lighter/Binance/...)
     ↓
Capture Proxy Server
     ↓
┌────┴────┐
↓         ↓
Python    Java
Client    Client
↓         ↓
Parse     Parse
↓         ↓
MBP1/10   MBP1/10
↓         ↓
Encode    Encode
↓         ↓
python.   java.
bin       bin
└────┬────┘
     ↓
Binary Compare
     ↓
pass or fail
```

## Project Structure

```
gnomepy-testing/
├── gnomepy_testing/
│   ├── capture_proxy/         # Proxy server and exchange connectors
│   ├── client/                # Python proxy client
│   ├── output/                # Binary output handler
│   ├── network/               # Transport/protocol abstraction
│   ├── listing_resolver.py    # Registry API integration
│   └── compare_outputs.py     # Binary output comparison
├── docker/                    # Docker configuration
├── output/                    # Test outputs (*.bin, *.log)
└── tests/                     # Unit tests
```

## Releasing a new version

The GitHub Actions workflow will automatically run with a tag matching the
pattern `v*.*.*` is released.

```commandline
poetry version patch  # or minor/major
git commit -m "Release new version"
git tag v$(poetry version -s)
git push origin main --tags
```
tuxrun 1.4.0
Command line tool for testing Linux under QEMU
Requires Python: >=3.6

<div align="center">
  <img src="docs/tuxrun_full.svg" alt="TuxRun Logo" width="40%" />
</div>

[![Pipeline Status](https://gitlab.com/Linaro/tuxrun/badges/master/pipeline.svg)](https://gitlab.com/Linaro/tuxrun/pipelines)
[![coverage report](https://gitlab.com/Linaro/tuxrun/badges/master/coverage.svg)](https://gitlab.com/Linaro/tuxrun/commits/master)
[![PyPI version](https://badge.fury.io/py/tuxrun.svg)](https://pypi.org/project/tuxrun/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI - License](https://img.shields.io/pypi/l/tuxrun)](https://gitlab.com/Linaro/tuxrun/blob/master/LICENSE)

[Documentation](https://tuxrun.org/) - [Repository](https://gitlab.com/Linaro/tuxrun) - [Issues](https://gitlab.com/Linaro/tuxrun/-/issues)

TuxRun, by [Linaro](https://www.linaro.org/), is a command line tool for
testing Linux on the following virtual devices, using curated test suites.

* AVH
* FVP
* QEMU

TuxRun is a part of [TuxSuite](https://tuxsuite.com), a suite of tools and
services to help with Linux kernel development.

[[_TOC_]]

# About TuxRun

Testing the Linux kernel is as simple as using QEMU but it gets complicated
when you want to support the following combinations:

- Architectures (arm64, armv5, armv7, i386, mips32, mips32el, mips64, mips64el,
  ppc32, ppc64, ppc64le, riscv64, s390, sh4, sparc64, x86_64)

- Emulation systems (QEMU or FVP or AVH)
- Tests (every test suite has dependencies on the rootfs)

Each of those items requires specific configuration and root file systems. In
order to allow for reproducible tests, TuxRun uses containers runtimes (Docker
or Podman).

# Installing TuxRun

There are several options for installing TuxRun:

- [From PyPI](docs/install-pypi.md)
- [Run uninstalled](docs/run-uninstalled.md)

# Using TuxRun

To use TuxRun, compile your own linux kernel for arm64, for example using
[TuxMake](https://tuxmake.org).

Then call tuxrun:

```shell
tuxrun --device qemu-arm64 --kernel /path/to/Image
```

TuxRun will automatically start qemu-system with the right arguments and the
right root filesystem.

# TuxLAVA Library

TuxRun uses [TuxLAVA](https://gitlab.com/Linaro/tuxlava) library to generate LAVA job definition files.

# Known issues

Known issues when booting on different virtual platforms.

- [From issues](docs/issues.md)

# Examples

Boot test a mipsel kernel at https://mykernel.org/vmlinux:

```shell
tuxrun --device qemu-mips32el \
       --kernel https://mykernel.org/vmlinux
```

Running *ltp-smoke*:

```shell
tuxrun --device qemu-mips32el \
       --kernel https://mykernel.org/vmlinux \
       --test ltp-smoke
```

Using a custom root file system

```shell
tuxrun --device qemu-mips32el \
       --kernel https://mykernel.org/vmlinux \
       --rootfs https://mykernel.org/rootfs.tar.xz
```