Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request replaces Enum-based parameter types with Literal type hints, transitioning from HyperPrior, ReportedProperty, and TieSolver enums to string literals. The change aims to simplify the API by using plain strings instead of enum values, while maintaining type safety through Literal annotations and runtime validation.
Changes:
- Removed
HyperPrior,ReportedProperty, andTieSolverenums from the public API - Introduced new
Literaltype definitions (HyperPriorType,TieSolverType,ReportedPropertyColumnType) in_types.py - Added parameter validation decorator and distribution helper in
_utils.py - Updated all code and tests to use string literals instead of enum values
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| bbttest/bbt/_types.py | New file defining Literal types for parameters and column names |
| bbttest/bbt/_utils.py | New file with parameter validation decorator and distribution factory function |
| bbttest/bbt/py_bbt.py | Updated to use Literal types, removed enum conversions, improved docstring formatting |
| bbttest/bbt/model.py | Updated to use string parameter instead of HyperPrior enum |
| bbttest/bbt/alg.py | Updated to use string parameter instead of TieSolver enum |
| bbttest/bbt/params.py | Deleted file containing enum definitions |
| bbttest/bbt/init.py | Removed enum exports, only exports PyBBT |
| bbttest/init.py | Removed enum exports, only exports PyBBT |
| tests/bbt/test_py_bbt.py | Updated tests to use string literals, removed parametrized enum tests |
| tests/bbt/test_alg.py | Updated to use string literals for tie_solver |
| tests/regression/test_benchmarking_mol.py | Updated to use string literals and simplified column specification |
| Makefile | Renamed target from full-test to test-all |
| .gitignore | Added .DS_Store exclusion |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.