Skip to content

Conversation

@nrichers
Copy link
Collaborator

@nrichers nrichers commented Feb 10, 2026

Summary

  • Adds filtering to exclude internal helper modules (statsutils, ai_powered_test) from the docs sidebar navigation
  • Modules are filtered only if BOTH conditions are met: lowercase filename AND no @tags/@tasks decorators
  • Should preserve all legitimate test entries while hiding non-executable utility modules

Solution

Added two helper functions to generate_quarto_docs.py:

  • _has_test_decorators() — checks if a module has any member with @tags or @tasks decorator
  • _should_filter_module() — returns true if module should be filtered (lowercase AND no decorators)

Updated get_child_files() to use the filter when building sidebar entries.

Test plan

  • Verified filter logic correctly identifies statsutils and ai_powered_test as filterable
  • Verified filter logic preserves AutoARIMA, Bias, and other valid tests
  • Regenerated docs and confirmed filtered entries no longer appear in _sidebar.yml

Closes sc-6232

@nrichers nrichers added the internal Not to be externalized in the release notes label Feb 10, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nrichers nrichers force-pushed the sc-6232/hide-internal-test-descriptions branch from d59e6d5 to 206b406 Compare February 10, 2026 22:13
@nrichers nrichers added the documentation Improvements or additions to documentation label Feb 10, 2026
Add filtering to exclude helper modules that are not actual tests from
the sidebar navigation. Modules are filtered if BOTH conditions are met:
- Filename starts with lowercase (helper module convention)
- No @tags/@tasks decorators (not registered as a test)

This removes statsutils and ai_powered_test from the sidebar while
preserving all legitimate test entries.

Also fix pre-existing bug where docs/validmind/ directory was not
created before writing version.qmd.

[sc-6232]
@nrichers nrichers force-pushed the sc-6232/hide-internal-test-descriptions branch from 206b406 to 5e25555 Compare February 10, 2026 22:16
@github-actions
Copy link
Contributor

PR Summary

This PR introduces functional enhancements to the documentation generation process. The key changes include:

  1. In the sidebar template (sidebar.qmd.jinja2), the call to get_child_files now passes an additional parameter (full_data) to support enhanced filtering of child files.

  2. In generate_quarto_docs.py:

    • Two utility functions have been added:
      • _has_test_decorators: Scans module members for specific decorators (@tags and @tasks) to flag modules with tests or tasks.
      • _should_filter_module: Uses the module's name and metadata (from _has_test_decorators) to determine if a module should be omitted from being listed in the sidebar (by filtering out entries starting with a lowercase letter that lack specific decorators).
    • The get_child_files function has been updated to accept the additional full_data parameter. It uses this parameter to look up module data for each file and conditionally filter out internal helper modules (those with names beginning with a lowercase letter and without test/task decorators).
    • A call to ensure_dir('docs/validmind') has been added to guarantee the existence of the directory where the version file is written.

These changes aim to provide a more precise and intelligent generation of documentation by excluding non-relevant modules based on their naming and decorator metadata.

Test Suggestions

  • Write unit tests for _has_test_decorators to verify it identifies modules with and without the specified decorators.
  • Create test cases for _should_filter_module to ensure modules with lowercase names are filtered if they don't include test/task decorators, and retained if they do.
  • Test get_child_files with a variety of file structures and module metadata to confirm that correct files are included or excluded based on the new filtering logic.
  • Verify that the ensure_dir function creates the expected directory structure as needed.
  • Test the integration of the new filtering logic in the generation of the sidebar to ensure that only the intended list of modules is displayed.

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 internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants