Skip to content

Add inline_methods config option#139

Merged
rich-iannone merged 8 commits into
posit-dev:mainfrom
bschwedler:inline-methods-config
Apr 29, 2026
Merged

Add inline_methods config option#139
rich-iannone merged 8 commits into
posit-dev:mainfrom
bschwedler:inline-methods-config

Conversation

@bschwedler
Copy link
Copy Markdown
Contributor

@bschwedler bschwedler commented Apr 24, 2026

Summary

  • Add inline_methods setting to great-docs.yml to control whether class methods get their own pages or stay inline on the class page
  • Replace three hardcoded > 5 threshold checks in core.py with a single should_split_methods() method on GreatDocsConfig

Usage

# great-docs.yml
inline_methods: true    # always inline (never split)
inline_methods: false   # always split to separate pages
inline_methods: 10      # inline up to 10, split above (default: 5)

The default behavior (split above 5 methods) is unchanged.

Details

  • Non-class items (functions, constants) with 0 methods are never split regardless of setting
  • Invalid config values (e.g., null, "abc") fall back to the default threshold of 5

@bschwedler bschwedler force-pushed the inline-methods-config branch from cec94ac to 3888169 Compare April 24, 2026 21:06
Control whether class methods get their own pages or stay inline
on the class page via the inline_methods setting in great-docs.yml:

  inline_methods: true   # always inline (never split)
  inline_methods: false  # always split to separate pages
  inline_methods: 10     # inline up to 10, split above (default: 5)

Replaces three hardcoded threshold = 5 checks with a single
config-driven method on GreatDocsConfig.
@bschwedler bschwedler force-pushed the inline-methods-config branch from 3888169 to 698e047 Compare April 27, 2026 16:06
@rich-iannone
Copy link
Copy Markdown
Member

Thanks @bschwedler for submitting this PR! I'm going to take it from here and add some more testing before final review and merging.

@rich-iannone rich-iannone merged commit 28eb63b into posit-dev:main Apr 29, 2026
7 checks passed
@rich-iannone
Copy link
Copy Markdown
Member

Merged, thanks @bschwedler !

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