refactor(applets): drop omegaconf for a dotted config lookup - #167
Open
singlerider wants to merge 1 commit into
Open
refactor(applets): drop omegaconf for a dotted config lookup#167singlerider wants to merge 1 commit into
singlerider wants to merge 1 commit into
Conversation
applets/base.py imported OmegaConf for exactly one call site, which ran OmegaConf.select against self.global_config. That object is a pydantic BBOTServerSettings, not a DictConfig, so it was the wrong API for the type. Replace it with select_dotted in utils/misc.py, which walks the dotted path over pydantic models and mappings alike and returns the default when a segment is missing or resolves to None. Drops omegaconf and antlr4-python3-runtime from the lock. Closes #166
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.
applets/base.pyimportedOmegaConffor exactly one call site, which ranOmegaConf.selectagainstself.global_config. That object is a pydanticBBOTServerSettings, not aDictConfig, so it was the wrong API for the type.Replace it with
select_dottedinutils/misc.py, which walks the dotted path over pydantic models and mappings alike and returns the default when a segment is missing or resolves to None.Drops omegaconf and antlr4-python3-runtime from the lock.
Based on
pin-bbot-v3.0.2(#165) since that branch declares the omegaconf dependency this removes. Retarget tostableonce #165 lands.Verified:
ruff checkpasses,ruff format --diffclean,uv sync --frozenexits 0, andselect_dottedresolves nested pydantic paths, dict paths, missing segments, and None values to the default.Closes #166