Skip to content

fixing doctests#604

Merged
gviejo merged 2 commits into
devfrom
doctest
May 26, 2026
Merged

fixing doctests#604
gviejo merged 2 commits into
devfrom
doctest

Conversation

@gviejo

@gviejo gviejo commented May 20, 2026

Copy link
Copy Markdown
Contributor

This pull request primarily updates and improves the docstrings and usage examples for the IntervalSet and TsGroup classes in the pynapple codebase, ensuring that documentation reflects the current API and output formats. It also adds a new doctest job to the CI workflow to automatically test the code examples in the documentation. These changes enhance clarity, accuracy, and maintainability for both users and developers.

Documentation and Example Improvements:

  • Updated IntervalSet docstrings to reflect accurate output formats, including index columns, shape, and time units, and corrected metadata handling in examples. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Updated TsGroup docstrings and examples for methods such as restrict, value_from, count, to_tsd, getby_threshold, getby_intervals, and getby_category to use current output formats, metadata conventions, and correct method usage. [1] [2] [3] [4] [5] [6] [7]

Continuous Integration Enhancements:

  • Added a new doctest job to the GitHub Actions workflow to automatically run doctests on the pynapple/core and pynapple/process modules, ensuring that documentation examples remain correct. The main check job now depends on this doctest job.

Configuration and Miscellaneous:

  • Updated configuration documentation to reflect the current backend (numba instead of jax) and improved warnings documentation. [1] [2]

These updates will help keep documentation reliable and ensure that code examples are always in sync with the actual API and outputs.

@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
pynapple/core/config.py 82.22% <ø> (ø)
pynapple/core/interval_set.py 97.13% <ø> (ø)
pynapple/core/time_series.py 93.43% <ø> (ø)
pynapple/core/ts_group.py 93.00% <ø> (ø)
pynapple/process/decoding.py 92.43% <ø> (ø)
pynapple/process/perievent.py 100.00% <ø> (ø)
pynapple/process/randomize.py 84.61% <ø> (ø)
pynapple/process/signal.py 91.66% <ø> (ø)
pynapple/process/tuning_curves.py 97.35% <ø> (ø)
pynapple/process/warping.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gviejo gviejo merged commit 4bf3f4c into dev May 26, 2026
45 of 49 checks passed
@gviejo gviejo deleted the doctest branch May 26, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant