Skip to content

docs: restore generated Algorithms API reference - #152

Merged
chaoming0625 merged 2 commits into
chaobrain:mainfrom
poilsosart:docs/complete-algorithms-api-reference
Jul 28, 2026
Merged

docs: restore generated Algorithms API reference#152
chaoming0625 merged 2 commits into
chaobrain:mainfrom
poilsosart:docs/complete-algorithms-api-reference

Conversation

@poilsosart

@poilsosart poilsosart commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Restore the Algorithms API reference to Sphinx-generated documentation instead of maintaining static API pages.

Changes

  • Removed docs/apis/algorithm_details/.
  • Restored autosummary generation under docs/apis/generated/.
  • Reorganized algorithm classes into clearer categories.
  • Moved common estimator classes into Base Classes.
  • Separated classes and functions in the compiler API.
  • Removed source links from generated class pages.
  • Preserved the existing Sequence Driver API.
  • Improved public API docstrings.
  • Updated outdated links from algorithm_details to generated.
  • Added no custom CSS, JavaScript, hooks, or static API pages.
  • Changed no algorithm behavior or callable signatures.

Verification

Strict Sphinx build completed with zero warnings:

python -m sphinx -W --keep-going -E -a -b html docs docs\_build\algorithm-api-rebased2

Relevant API tests passed:

193 passed

Verified that:

  • Generated algorithm pages exist.
  • No algorithm_details references remain.
  • No source links remain on the generated class pages.
  • No duplicate documentation targets exist.
  • No additional CSS or JavaScript files were introduced.

Summary by Sourcery

Restore Sphinx-generated Algorithms API reference and clean up public-facing API documentation.

New Features:

  • Reintroduce autosummary-generated algorithm API pages under the public documentation hierarchy.

Enhancements:

  • Improve docstrings for core algorithm classes and compiler entry points to provide clearer parameter descriptions and usage context.
  • Adjust Sphinx configuration to avoid linking public API docs to private implementation modules and to render accurate constructor signatures for metaclass-based modules.
  • Reorganize algorithm, compiler, concept, and example documentation pages into clearer categories while preserving the existing sequence driver API surface.

Documentation:

  • Remove manually maintained static algorithm detail pages in favor of Sphinx-generated API reference pages, updating all references to the new locations and ensuring no source links appear on generated class pages.

@sourcery-ai

sourcery-ai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Reviewer's Guide

Restores the Algorithms API docs to Sphinx-generated pages, removes the old hand-written algorithm_details pages, configures Sphinx to generate cleaner public API references without leaking implementation modules, and tightens several docstrings and signatures to render better in the new documentation layout.

File-Level Changes

Change Details Files
Adjust Sphinx configuration so generated API pages show correct constructor signatures while avoiding implementation-module source links from public APIs.
  • Disable following imported members in viewcode so public API docs do not link into private implementation modules.
  • Configure autodoc to render class signatures using init so metaclass call does not hide concrete constructor parameters.
docs/conf.py
Improve runtime docstrings and parameter annotations so autodoc can generate clearer API reference for algorithms and compiler helpers.
  • Rewrite EligibilityTrace docstring to a concise summary and add explicit Parameters section for value, name, and metadata.
  • Clarify SequenceDriverMixin and ETraceVmap docstrings to avoid brittle intersphinx references and point to the correct methods.
  • Annotate varargs and kwargs for compile() so their roles and accepted types are clearer in the rendered docs.
braintrace/_algorithm/base.py
braintrace/_algorithm/sequence.py
braintrace/_compile.py
Replace manually maintained algorithm_details pages with auto-generated Algorithms and Compiler API reference, reorganizing content and removing bespoke static pages.
  • Delete all algorithm_details/*.rst files that previously documented each algorithm and helper individually.
  • Restore autosummary-driven generation of algorithm API pages under docs/apis/generated/.
  • Reorganize algorithms, compiler API, concepts, and examples RST files so classes/functions are grouped into clearer categories and the Sequence Driver API layout is preserved.
  • Ensure no custom CSS/JS or Sphinx hooks are introduced beyond template and configuration changes, and update links from algorithm_details to the new generated locations.
docs/_templates/classtemplate.rst
docs/apis/algorithms.rst
docs/apis/compiler.rst
docs/apis/concepts.rst
docs/examples/drtrl_examples.rst
docs/examples/pp_prop_examples.rst
docs/examples/rnn_examples.rst
docs/examples/snn_examples.rst
docs/apis/algorithm_details/braintrace.DNI.rst
docs/apis/algorithm_details/braintrace.D_RTRL.rst
docs/apis/algorithm_details/braintrace.EProp.rst
docs/apis/algorithm_details/braintrace.ETraceAlgorithm.rst
docs/apis/algorithm_details/braintrace.ETraceConfig.rst
docs/apis/algorithm_details/braintrace.ETraceVjpAlgorithm.rst
docs/apis/algorithm_details/braintrace.ETraceVmap.rst
docs/apis/algorithm_details/braintrace.EligibilityTrace.rst
docs/apis/algorithm_details/braintrace.FixedRandomFeedback.rst
docs/apis/algorithm_details/braintrace.IODimVjpAlgorithm.rst
docs/apis/algorithm_details/braintrace.KappaFilter.rst
docs/apis/algorithm_details/braintrace.OSTLFeedforward.rst
docs/apis/algorithm_details/braintrace.OSTLRecurrent.rst
docs/apis/algorithm_details/braintrace.ParamDimVjpAlgorithm.rst
docs/apis/algorithm_details/braintrace.RandomProjectionVjpAlgorithm.rst
docs/apis/algorithm_details/braintrace.SequenceDriverMixin.rst
docs/apis/algorithm_details/braintrace.SnAp.rst
docs/apis/algorithm_details/braintrace.SyntheticGradient.rst
docs/apis/algorithm_details/braintrace.ThreeFactor.rst
docs/apis/algorithm_details/braintrace.UORO.rst
docs/apis/algorithm_details/braintrace.compile.rst
docs/apis/algorithm_details/braintrace.pp_prop.rst
docs/apis/algorithm_details/braintrace.train_synthetic_gradient.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chaoming0625
chaoming0625 merged commit 986cf4e into chaobrain:main Jul 28, 2026
7 checks passed
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.

2 participants