feat: Centralised configuration utility#17
Draft
nicoloesch wants to merge 9 commits into
Draft
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.
Summary
Adapts
omop-graphto theoa-configuratorconfiguration layer, replacing the previous environment-variable-based setup with a typed TOML-backed config and a first-classomop-config configure omop_graphsubcommand.Fixes: #15
Notes
Depends on the oa-configurator PR to pass.
Requires change in
pyproject.tomlto include the published PyPI package once changes have been approved:Changes
OmopGraphConfigsubclassesPackageConfigBase, exposing all package settings as typed Pydantic fields backed by[tools.omop_graph]in~/.config/omop/config.tomlomop.configsoomop-config configure omop_graphprompts for package extras interactively or via named flags (--max-depth,--max-paths); omop-graph owns no database resource directly — it relies on the CDM resource configured by omop-alchemyOmopGraphConfig.get_config()(inherited classmethod) replaces the old standaloneget_config()function; all internal call sites updatedResolver.from_active_config()replaces the old standaloneget_resolver()function; all engine-creation helpers updated (db/session.py,oaklib_interface/omop_factory.py)OmopGraphConfig.configure_logging(verbosity=…)(inherited classmethod) replaces the old standaloneconfigure_logging()wrapper;extra_logging_namespaces = ("omop_alchemy", "omop_emb")declares transitive dependencies whose logs are also configured (omop_embis optional but harmless to include)docker-compose.yamlupdated from--resource-set/--setflags to named flags matching the new CLITesting