extract-test-set
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExtract test set from raw prices
从原始价格中提取测试集
This is a skill to extract price data from the raw prices for an isolated unit test.
这是一项用于从原始价格中提取价格数据,以进行独立单元测试的技能。
Inputs
输入项
- Smart contract address and a blockchain as a blockchain explorer link
- Test case name
- 智能合约地址以及作为区块链浏览器链接的区块链信息
- 测试用例名称
Relevant files
相关文件
Seek metadata and Parquet information here:
- vault database
- data wrangling
在此处查找元数据和Parquet相关信息:
- vault database
- data wrangling
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
创建一个临时Python脚本,用于读取:
脚本输入项
- 链ID(数值型)- 地址元组
- 测试用例名称
脚本功能
- 从中提取价格序列
DEFAULT_UNCLEANED_PRICE_DATABASE
脚本输出项
- 包含单个测试用例的Pytest测试模块
- 仅包含该vault价格数据的相关Parquet文件
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
随后,脚本会创建test_xxx文件,在其中内联存储元数据,并创建对应的test_xxx_price.parquet文件,供测试用例读取。
- 仅包含单个测试函数,请勿生成过多测试用例
Run the script
运行脚本
- After running the script, run the generated test case
- 运行脚本后,执行生成的测试用例