Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds RBS (Ruby Signature) type definitions to enable static type checking and improved IDE support for the Classifier gem. The changes introduce type signatures for all public APIs across the codebase and integrate RBS validation into the CI pipeline.
Key changes:
- Complete RBS type definitions for core classifier classes (Bayes, LSI) and supporting components
- Type signatures for Ruby standard library extensions (String, Array, Vector, Matrix, Object)
- CI workflow enhancement to validate RBS types on each build
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sig/classifier.rbs | Root module declaration for Classifier namespace |
| sig/classifier/bayes.rbs | Type signatures for Bayesian classifier including training and classification methods |
| sig/classifier/lsi.rbs | Type signatures for LSI classifier with comprehensive API coverage |
| sig/classifier/lsi/content_node.rbs | Type definitions for LSI content node representation |
| sig/classifier/lsi/word_list.rbs | Type signatures for word indexing and lookup functionality |
| sig/classifier/extensions/object.rbs | Type signature for Object class extension |
| sig/classifier/extensions/string.rbs | Type signatures for String extensions including text processing methods |
| sig/classifier/extensions/vector.rbs | Type signatures for Vector/Matrix extensions and Array enhancements |
| .github/workflows/ruby.yml | Adds RBS validation step to CI workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The previous commit added RBS type signatures and CI validation, but the workflow failed because the rbs gem was not installed. This adds a gem install step before running the validation command.
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
Add RBS type signatures to enable static type checking and improved IDE support.
Closes #45
Changes
sig/directory with RBS type definitions for all public APIsFiles added
Test plan
rbs -I sig validatepasses locally