[DOC] Runnable docstring examples and doctest coverage for core constructors
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation, testing
Research direction
Look at the existing runnable examples in src/blosc2/ndarray.py for CTable.where() and sort_by() to understand the format. The files to edit are src/blosc2/ndarray.py, src/blosc2/schunk.py, and src/blosc2/lazyexpr.py. After adding the examples, run pytest --doctest-modules to verify they pass. 'Done' means all listed functions have an 'Examples:' section with runnable code and the doctests pass.
Written by the indexing model from the issue text.
Description
Following issue #650 (which added runnable examples to CTable.where() and sort_by()), several fundamental array constructors in src/blosc2/ndarray.py (empty, zeros, full, fromiter, asarray, linspace) and core SChunk methods in src/blosc2/schunk.py (append_data, get_chunk, decompress_chunk) lack runnable, copy-pasteable Examples: sections in their docstrings.
Furthermore, pytest.ini currently tests doctests only on core.py, ndarray.py, and schunk.py.
Suggested Work
- Add NumPy-style runnable docstrings with code and expected output to:
src/blosc2/ndarray.py:empty(),zeros(),full(),fromiter(),asarray(),linspace().src/blosc2/schunk.py:append_data(),get_chunk(),decompress_chunk().src/blosc2/lazyexpr.py:compute(),save().
- Demonstrate realistic parameters in each example:
chunks=,blocks=,cparams=, andurlpath=. - Verify that all docstrings pass
pytest --doctest-modules.
- Dominant language
- Python
- Stars
- 211
- Forks
- 63
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 9
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.
More from Blosc/python-blosc2
-
sustain-2026
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Blosc/python-blosc2#717 ·
-
documentation sustain-2026
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Blosc/python-blosc2#714 ·
-
documentation sustain-2026
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Blosc/python-blosc2#710 ·
-
documentation sustain-2026
Difficulty 2/5 Half a day Newbie friendliness 74/100
Blosc/python-blosc2#651 · 5 comments ·
-
documentation sustain-2026
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Blosc/python-blosc2#722 ·
All issues in Blosc/python-blosc2
Similar issues
-
bug priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
CyberAgent/psd2svg#436 ·
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#122386 · 1 comment ·
-
ai-generated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/production-stack#1105 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100