Add Unit Tests for shorten_list_repr() and inline_dask_repr() and inline_sparse_repr() in formatting.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
What is your issue?
Hello,
I'm a student currently working on a course assignment that involves contributing to an open-source project. While exploring the Xarray codebase and running coverage tools with pytest, I noticed that the inline_dask_repr() and inline_sparse_repr() functions in xarray/core/formatting.py currently lack unit test coverage.
These functions produce string representations for Dask and sparse arrays, and adding targeted tests would help improve test coverage
Would the maintainers be open to me contributing unit tests for these two functions? If so, I’d be happy to create a pull request and include tests under xarray/tests/test_formatting.py or another location that aligns with your guidelines.
Thanks for your time and for maintaining such a great project!
Contributor 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.
Research direction
Start with xarray/core/formatting.py and the existing tests in xarray/tests/test_formatting.py. Run the relevant formatting tests with pytest, then add targeted coverage for shorten_list_repr(), inline_dask_repr(), and inline_sparse_repr(); done means the functions have tests covering their string representations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100