Skip to content

Conversation

@oliveira-caio
Copy link
Contributor

Summary

  • Add comprehensive NumPy-style docstrings to all public classes and functions to make it compatible with ReadTheDocs
  • Configure Sphinx with autodoc, napoleon, and autosummary for API documentation
  • Restructure API reference to generate separate pages per class/function
  • Create dedicated configuration page with embedded default.yaml and option descriptions
  • Update README with features, quick start examples, and documentation links

Changes

Docstrings

  • experiment.py: Experiment class, interpolate(), get_valid_range()
  • datasets.py: ChunkDataset class and methods
  • dataloaders.py: get_multisession_dataloader(), get_multisession_concat_dataloader()
  • interpolators.py: All interpolator classes (Interpolator, SequenceInterpolator, ScreenInterpolator, etc.)
  • intervals.py: TimeInterval class and interval functions
  • utils.py: LongCycler, ShortCycler, FastSessionDataLoader, SessionBatchSampler, etc.

Documentation Structure

  • Add autosummary extension for per-class/function pages
  • Create custom class template for detailed documentation
  • Move configuration to dedicated page with full default.yaml content
  • Rename API sections to avoid duplicate sidebar entries

README

  • Add features section
  • Add quick start code examples
  • Link to Read the Docs documentation

claude and others added 30 commits January 25, 2026 12:35
Add extensions for autodoc, napoleon, mathjax, intersphinx, and viewcode.
Configure napoleon for NumPy-style docstrings with math rendering support
and cross-references to Python, NumPy, SciPy, and PyTorch documentation.
- Add autodoc_mock_imports for heavy dependencies (torch, numpy, etc.)
- Create api.rst with single-page API reference for all modules
- Update index.rst to include API Reference section
Document package architecture, class relationships, data flow,
potential bugs, and docstring requirements with priority levels.
- experiment.py: Experiment class, interpolate, get_valid_range
- datasets.py: ChunkDataset class, __getitem__
- dataloaders.py: get_multisession_dataloader, get_multisession_concat_dataloader
- configs.py: module-level docstring with exports documentation
- Create _static directory to fix warning
- Fix initialize_statistics, initialize_transforms docstrings (datasets.py)
- Fix get_screen_sample_mask_from_meta_conditions docstring (datasets.py)
- Fix get_full_valid_sample_times docstring (datasets.py)
- Fix add_behavior_as_channels docstring (utils.py)
- Remove duplicate device_names property docstring (experiment.py)
interpolators.py:
- Interpolator base class and factory method
- SequenceInterpolator with linear interpolation math
- ScreenInterpolator for visual stimuli
- PhaseShiftedSequenceInterpolator
- ScreenTrial and subclasses (ImageTrial, VideoTrial, BlankTrial)

intervals.py:
- TimeInterval class
- All interval manipulation functions

utils.py:
- LongCycler, ShortCycler
- FastSessionDataLoader with full parameter documentation
Add extensions for autodoc, napoleon, mathjax, intersphinx, and viewcode.
Configure napoleon for NumPy-style docstrings with math rendering support
and cross-references to Python, NumPy, SciPy, and PyTorch documentation.
- Add autodoc_mock_imports for heavy dependencies (torch, numpy, etc.)
- Create api.rst with single-page API reference for all modules
- Update index.rst to include API Reference section
Document package architecture, class relationships, data flow,
potential bugs, and docstring requirements with priority levels.
- experiment.py: Experiment class, interpolate, get_valid_range
- datasets.py: ChunkDataset class, __getitem__
- dataloaders.py: get_multisession_dataloader, get_multisession_concat_dataloader
- configs.py: module-level docstring with exports documentation
- Create _static directory to fix warning
- Fix initialize_statistics, initialize_transforms docstrings (datasets.py)
- Fix get_screen_sample_mask_from_meta_conditions docstring (datasets.py)
- Fix get_full_valid_sample_times docstring (datasets.py)
- Fix add_behavior_as_channels docstring (utils.py)
- Remove duplicate device_names property docstring (experiment.py)
interpolators.py:
- Interpolator base class and factory method
- SequenceInterpolator with linear interpolation math
- ScreenInterpolator for visual stimuli
- PhaseShiftedSequenceInterpolator
- ScreenTrial and subclasses (ImageTrial, VideoTrial, BlankTrial)

intervals.py:
- TimeInterval class
- All interval manipulation functions

utils.py:
- LongCycler, ShortCycler
- FastSessionDataLoader with full parameter documentation
…o/experanto into claude/add-docstrings-KhA9Q
- datasets.py: get_data_key_from_root_folder
- interpolators.py: rescale_frame
- utils.py: SessionBatchSampler.__init__, SessionSpecificSampler.__init__
- Add sphinx.ext.autosummary extension
- Create custom class template for detailed docs
- Reorganize api.rst with autosummary tables
- Each class/function now gets its own page
- Create configuration.rst with full default.yaml embedded
- Add documentation for all configuration options
- Update index.rst to include configuration page
- Add features section highlighting key capabilities
- Include quick start examples for Experiment and DataLoader
- Add configuration snippet and documentation links
- Add contributing, license, and citation sections
@oliveira-caio oliveira-caio added the documentation Improvements or additions to documentation label Jan 25, 2026
@gitnotebooks
Copy link

gitnotebooks bot commented Jan 25, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds NumPy-style docstrings and a Sphinx/ReadTheDocs documentation pipeline to generate API reference pages automatically.

Changes:

  • Added/expanded NumPy-style docstrings across core modules (datasets, interpolators, experiment, utils, intervals, dataloaders).
  • Added Sphinx configuration (autodoc/napoleon/autosummary) plus API/configuration pages and a custom autosummary class template.
  • Updated README with features, quick start, and documentation links; ignored generated API docs output in .gitignore.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
experanto/utils.py Updates docstrings for utilities and cyclers; minor formatting changes.
experanto/intervals.py Adds docstrings and corrects some return type annotations for interval utilities.
experanto/interpolators.py Adds comprehensive class/method docstrings; minor typing fix for rescale_size.
experanto/experiment.py Adds class/method docstrings for the main Experiment interface.
experanto/datasets.py Adds a full NumPy-style class docstring and method docstrings for ChunkDataset.
experanto/dataloaders.py Adds docstrings and examples for multi-session dataloader helpers.
experanto/configs.py Adds module docstring describing exported default config constants.
docs/source/index.rst Cleans up wording and adds API Reference toctree entries.
docs/source/configuration.rst New docs page describing configuration options and embedding default YAML.
docs/source/conf.py Enables Sphinx extensions and configures autodoc/napoleon/autosummary + mocks.
docs/source/api.rst New autosummary-driven API reference index.
docs/source/_templates/custom-class-template.rst New autosummary template to generate per-class pages with methods/attributes.
docs/source/_static/.gitkeep Keeps _static/ directory tracked.
README.md Adds features, quick start examples, and RTD links.
.gitignore Ignores Sphinx autosummary generated output directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@reneburghardt reneburghardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice stuff @oliveira-caio

oliveira-caio and others added 13 commits January 29, 2026 14:48
- Add configuration options section to demo_configs.rst
- Remove standalone configuration.rst (duplicated content)
- Update index.rst to remove configuration from API Reference
…o/experanto into claude/add-docstrings-KhA9Q
- Remove query language from Interpolator base class
- Add TimeIntervalInterpolator class docstring with full detail
- Minimize all interpolate method docstrings (detail lives in classes)
- Add TimeIntervalInterpolator to Interpolator See Also section
…o/experanto into claude/add-docstrings-KhA9Q
Copy link
Collaborator

@schewskone schewskone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool PR! Thanks @oliveira-caio
Not sure about the TeX formatting inside the code itself.
Can it be used for automated docstrings in readthedocs where it is formatted properly?

Comment on lines +125 to +126
``global_sampling_rate``
Override sampling rate for all modalities. Set to ``null`` to use per-modality rates.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why null and not None in these examples?

and ``"standardize"`` (z-score normalization).

``interpolation``
Interpolation settings including ``interpolation_mode`` (``"linear"`` or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that this is only for Sequence interpolators


.. math::

y(t) = y_0 \\cdot \\frac{t_1 - t}{t_1 - t_0} + y_1 \\cdot \\frac{t - t_0}{t_1 - t_0},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
y(t) = y_0 \\cdot \\frac{t_1 - t}{t_1 - t_0} + y_1 \\cdot \\frac{t - t_0}{t_1 - t_0},
y = y0 * (t1 - t) / (t1 - t0) + y1 * (t - t0) / (t1 - t0)

Markdown does not work here right or is this useful for readthedocs?


y(t) = y_0 \\cdot \\frac{t_1 - t}{t_1 - t_0} + y_1 \\cdot \\frac{t - t_0}{t_1 - t_0},

where :math:`t_0` and :math:`t_1` are the surrounding sample times.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where :math:`t_0` and :math:`t_1` are the surrounding sample times.
where t_0 and t_1 are the surrounding sample times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants