Discussion: Addition of figure tests using `pytest-mpl`
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- matplotlib, python
- Domain
- data-visualization, testing-qa
Research direction
Start by reviewing Stingray's existing tests that produce plots, then compare the proposed pytest-mpl approach with Astropy's figure_test helper and SunPy's reference-file strategy. Done means agreeing on a comparison or hash workflow and integrating figure verification with the test suite, including any required JSON or binary reference files.
Written by the indexing model from the issue text.
Description
Stingray's test suite produces a lot of plots, however, there are no tests comparing/verifying the plots to a previous version/hash.
This is supposed to be mitigated by other tests, but there can be issues which might manifest themselves into the end product itself (figures). Hence, the idea of verifying the plots to a previous binary/hash.
This can be solved by using pytest-mpl via either comparing the figure themselves or the figure hashes (preferred), as followed by astropy, sunpy, + and it's worth discussing if we want to implement a similar one in stingray, which I'll be happy to do.
The implementation will most likely be heavily inspired by astropy's figure_test, which uses a decorator and a JSON hash file inside the package for comparison.
Secondly, sunpy has a separate repo for storing ref binary files, which we can play it by the ear and implement if and when required.
- Dominant language
- Python
- Stars
- 229
- Forks
- 196
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StingraySoftware/stingray
-
create_gti_mask drops valid points after empty GTIs and crashes with min_length > 0 and dtPossibly taken @Rohan-Dedhia claimed this 5 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
StingraySoftware/stingray#1044 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
StingraySoftware/stingray#1042 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
StingraySoftware/stingray#1039 · 1 comment ·
Maintainers usually reply within 3 days
-
stingray: arbitrary code execution reading a pickle-format data product (read fmt=pickle) (CWE-502)May be free again @yash-8923 claimed this 11 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
StingraySoftware/stingray#1037 · 3 comments ·
Maintainers usually reply within 3 days
-
AveragedCrossspectrum returns zeros when using simulated light curves with input_counts=False.Possibly taken @VrtxOmega claimed this 176 days ago. Openbug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 52/100
StingraySoftware/stingray#977 · 1 comment ·
Maintainers usually reply within 3 days
All issues in StingraySoftware/stingray
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
future-agi/future-agi#6392 ·
Maintainers usually reply within 1 day
-
memmapped_arange ignores the start value and drops the last point above the memmap thresholdPossibly taken @prathameshfuke claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
StingraySoftware/HENDRICS#213 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day