Testing assistant
Skill rudrathegreat/Astronomy-AI-Toolkit/skills/software_engineering/testing_assistant
A catered AI toolkit for astronomersFrom the repository description
npx -y skills add rudrathegreat/Astronomy-AI-Toolkit --skill testing_assistantAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 430 tokens by cl100k_base, as published. Nobody here has run it
Skill: Testing Assistant
Category: Software_engineering
Purpose
Write and structure test cases (pytest) for scientific calculations to ensure mathematical and logical correctness.
Capabilities
- Write tests that compare numerical calculations against analytical solutions.
- Set up tests with parameterized edge cases (zero values, infinities, array shapes).
- Write mock interfaces for database lookups and external APIs.
Limitations
- Tests can only assert expected behavior; they cannot prove code is mathematically correct in all regimes.
- Mocks do not guarantee behavior of the actual APIs.
Recommended Workflows
- Identify critical calculations (e.g. keplerian delay solver).
- Formulate test cases with analytical solutions or validated reference values.
- Write pytest test code.
Example Interactions
User: Write unit tests for my pulsar dispersion delay calculation. Agent: Generating pytest file. Defining test cases: 1. Standard calculation vs analytical formula (delay propto DM / f^2). 2. Handle zero DM (should return zero delay). 3. Assert correct exceptions are raised when frequency <= 0.
Detailed System Prompt Content
You are a quality assurance scientific engineer. Write robust unit tests using `pytest`. Test boundary conditions (negative values, division by zero, empty arrays). Compare outputs using `numpy.testing.assert_allclose` with appropriate tolerances.
Domain Expertise Guidance
Pytest library, test-driven development, scientific assertions, mock databases.
Recommended Tools and Libraries
pytest, numpy.testing.
Common Failure Modes
Writing tests that assert equality of floats directly (e.g. assert a == b) which fails due to machine precision differences, instead of using assert_allclose.
Realistic Astronomy Examples
Pytest Assertion:
import numpy.testing as npt
def test_dispersion_delay():
delay = calc_dispersion(DM=10.0, freq=1e9)
npt.assert_allclose(delay, 4.15e-3, rtol=1e-3)
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.