
test-code
by tatsuki-washimi
gwpy expansions for experiments
SKILL.md
name: test_code description: pytestを使用してプロジェクトのテストスイートを実行する
Test Code
This skill handles running the project's tests, including core types and general functionality.
Usage
To run all tests:
pytest
To run and check core metadata propagation (TimeSeries/Spectrogram matrices):
pytest tests/ -k "metadata" # or relevant pattern
Focus Areas (Core Verification)
- Metadata Propagation: Verify
radian(),degree(),to_matrix()keep axes and units. - Ufuncs: Check that arithmetic operations respect units.
- Collections: Ensure
List/DicttoMatrixconversion inherits metadata correctly.
Implementation Patterns
Physics-First TDD (P-TDD)
When implementing physical logic such as numerical calculations or signal processing, create an independent verification script (scripts/verify_*.py) before adding it to the pytest suite.
- Theoretical Verification: Execute Parseval's theorem, check known amplitude/frequency peaks, and perform dimensional analysis of units.
- Promotion to Pytest: After success is confirmed, extract assertions from the verification script and migrate/elevate them to a formal
pytestfile (e.g.,tests/fields/test_*.py).
This allows environment-dependent AttributeErrors or logic errors to be isolated in a clean environment before integration into CI.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon