[ISSUE-03] Implement BuildOptions option groups#70
Merged
Conversation
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.
Motivation
full_buildclean-architecture refactor so later planner, executor, stage, inventory, adapter, and reporting components can consume typed option groups.Description
src/buildcompiler/api/options.pyimplementingProtocolModeand composed option dataclasses:CombinatorialOptions,Lvl2SearchOptions,PlanningOptions,ExecutionOptions,SelectionOptions,ProtocolOptions,ReportingOptions,ApprovalOptions,ReagentOptions,DomesticationOptions, andBuildOptions, usingfield(default_factory=...)for nested/mutable defaults.src/buildcompiler/api/__init__.pyto exportBuildOptions, the focused option-group dataclasses, andProtocolModefor lightweight imports.tests/unit/api/test_options.pythat validate required defaults and mutable-default isolation acrossBuildOptionsinstances.ApprovalStatus) in domain contracts and avoided importing or requiring optional automation packages in core option modules.Testing
PYTHONPATH=src python -c "from buildcompiler.api.options import BuildOptions; BuildOptions()"andPYTHONPATH=src python -c "from buildcompiler.api import BuildOptions; BuildOptions()", both of which succeeded.PYTHONPATH=src pytest tests/unit/api/test_options.py, which passed (2 passed), and broader package tests withPYTHONPATH=src pytest tests/unit/domain tests/unit/api, which also passed (5 passed).uv run pytest tests/unit/api/test_options.pyfailed here due to environment resolution of an optionalSBOLInventorydependency (git fetch returned HTTP 403), souv-based verification could not complete in this environment.ruff check .andruff format --check .which reported pre-existing repository issues unrelated to these changes (these lint/format failures are outside the scope of this PR).Closes #55
Codex Task