Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[DOC] Runnable docstring examples and doctest coverage for core constructors

Open Beginner friendly
#720 0 comments 0 reactions 0 assignees View on GitHub

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

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

documentation sustain-2026

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
  1. 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().
  2. Demonstrate realistic parameters in each example: chunks=, blocks=, cparams=, and urlpath=.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Blosc/python-blosc2

All issues in Blosc/python-blosc2

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.