mcpField
E
extract-test-set

extract-test-set

github.com/tradingstrategy-aiTesting & quality82956 installsUpdated today
Repository

About extract-test-set

A testing skill that extracts raw price data into a focused unit-test fixture. It creates one pytest test module and a vault-specific Parquet file, then runs the generated test.

Key features

  1. 01Extracts prices from the raw price database
  2. 02Takes chain ID, address, and test name
  3. 03Generates one pytest test case
  4. 04Writes vault-specific Parquet price data
  5. 05Runs the generated test

Use cases

  1. 01Create an isolated test for a vault price series
  2. 02Reproduce a price-data case with a minimal fixture

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tradingstrategy-ai/web3-ethereum-defi --skill extract-test-set

After installing, type/extract-test-setin Claude Code to confirm it loaded.

Details

From the project README

Extract test set from raw prices

This is a skill to extract price data from the raw prices for an isolated unit test.

Inputs

  1. Smart contract address and a blockchain as a blockchain explorer link
  2. Test case name

Relevant files

Seek metadata and Parquet information here:

Ad-hoc script

Create an ad-hoc Python script that reads

Script inputs

  • chain id (numeric) - address tuple
  • test case name

Scripts

  • Extracts the price series from DEFAULT_UNCLEANED_PRICE_DATABASE

Script outputs

  • Pytest test module with a single test case
  • Related Parquet file containing price data only for this vault

Write test case

Then the script creates test_xxx file, stores metadata there inline and creates corresponding test_xxx_price.parquet file for the test case to read.

  • Include only a single test function, do not generate excessive tests

Run the script

  • After running the script, run the generated test case

Comments

Markdown supported