dev(hansbug): Upgrade documentation system with automated RST generation and add Claude Code guidance - #125
Merged
Conversation
…eneration - Remove old manually-maintained RST documentation files across all API modules - Add automated RST generation scripts (auto_rst.py, auto_rst_top_index.py) - Update Makefile with new targets for automated documentation generation: - rst_auto: generates RST files from Python source using pattern rules - docs_auto: generates Python docstrings using hbllmutils - todos_auto: generates TODO comments - tests_auto: generates unit tests - Integrate hbllmutils for LLM-powered documentation generation - Update docs/source/index.rst to use generated api_doc.rst include - Add .llmconfig.yaml to .gitignore - Update requirements-dev.txt with sphinx, natsort, build, and hbllmutils dependencies This modernizes the documentation workflow by replacing manual RST maintenance with automated generation from source code, reducing maintenance burden and ensuring documentation stays in sync with code changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> dev(hansbug): add automated RST generation scripts and generated documentation files - Add auto_rst.py script for generating RST files from Python source code - Add auto_rst_top_index.py script for generating top-level API documentation index - Add generated api_doc.rst as entry point for API documentation - Generate complete RST documentation tree for all modules (algorithm, binary, collection, color, concurrent, config, design, encoding, expression, file, logging, model, random, reflection, scale, string, system, testing) These files complete the automated documentation system introduced in the previous commit, providing the actual generation scripts and initial generated documentation structure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ake docs_auto Regenerated comprehensive docstrings across the entire hbutils codebase using the automated documentation system with gpt-5.2-codex model. This update improves documentation quality, consistency, and completeness for all modules: - Enhanced module-level documentation with better structure and cross-references - Improved function and class docstrings with detailed parameter descriptions - Added comprehensive examples and usage notes where applicable - Standardized documentation format across all 122 Python files - Better Sphinx integration with proper :mod:, :func:, :class: references All modules updated: algorithm, binary, collection, color, concurrent, config, design, encoding, expression, file, logging, model, random, reflection, scale, string, system, and testing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added CLAUDE.md to provide future Claude Code instances with essential commands, architecture overview, and development workflow guidance. Updated .gitignore to exclude .claude directory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #125 +/- ##
==========================================
- Coverage 96.99% 96.94% -0.06%
==========================================
Files 121 121
Lines 4497 4515 +18
==========================================
+ Hits 4362 4377 +15
- Misses 135 138 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed ModuleNotFoundError for pkg_resources on Python 3.12+ by adding conditional import and skip decorator. The tests now skip gracefully on Python 3.12+ where pkg_resources is deprecated and unavailable, while continuing to run normally on Python 3.11 and below. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces significant improvements to the documentation infrastructure and developer experience:
auto_rst.pyandauto_rst_top_index.py) that streamline the documentation build process and ensure consistency across all API documentation filesmake docs_auto, resulting in improved documentation quality, consistency, and completeness for all 264 modified filesCLAUDE.mdto provide future Claude Code instances with essential commands, architecture overview, and development workflow guidance, improving AI-assisted development efficiencyChanges Overview
Documentation Infrastructure (New Files)
auto_rst.py(477 lines): Automated RST file generation from Python source filesauto_rst_top_index.py(77 lines): Automated top-level index generation for API documentationdocs/source/api_doc.rst(23 lines): New top-level API documentation indexDeveloper Experience
CLAUDE.md(122 lines): Comprehensive guide for Claude Code with:Build System
Makefilewith new targets for automated RST generation (rst_auto)Documentation Quality
hbutils/algorithm/- Algorithm implementationshbutils/binary/- Binary I/O utilitieshbutils/collection/- Data structures and sequence manipulationhbutils/color/- Color model calculationshbutils/concurrent/- Concurrency utilitieshbutils/config/- Package metadatahbutils/design/- Design patternshbutils/encoding/- Encoding and hashinghbutils/expression/- Function compositionhbutils/file/- File stream managementhbutils/logging/- Enhanced logginghbutils/model/- Class enhancement decoratorshbutils/random/- Random generation utilitieshbutils/reflection/- Object introspectionhbutils/scale/- Scaled value parsinghbutils/string/- String processinghbutils/system/- OS and filesystem operationshbutils/testing/- Testing utilitiesConfiguration Updates
.gitignoreto exclude.claudedirectory and.llmconfig.yamlrequirements-dev.txtwith development dependenciesStatistics
Key Benefits
Test Plan
make docsmake rst_automake unittest.gitignoreproperly excludes.claudedirectoryBreaking Changes
None. This PR is purely additive and improves documentation infrastructure without changing any public APIs or functionality.