diff --git a/src/cdf/nextgen/workspace.py b/src/cdf/nextgen/workspace.py index 46b0bf2..a48cd46 100644 --- a/src/cdf/nextgen/workspace.py +++ b/src/cdf/nextgen/workspace.py @@ -114,12 +114,13 @@ def get_config_sources(self): # Create an instance of the workspace datateam = DataTeamWorkspace() - @injector.map_values(b="a.b.c") - def c(b: int) -> int: - return b * 10 + @injector.map_values(secret_number="a.b.c") + def c(secret_number: int) -> int: + return secret_number * 10 # Imperatively add dependencies datateam.add_dependency("c", injector.Dependency(c)) + datateam.config_resolver.import_({"a.b.c": 10}) def source_a(a: int, prod_bigquery: str): print(f"Source A: {a=}, {prod_bigquery=}") @@ -129,6 +130,7 @@ def source_a(a: int, prod_bigquery: str): print(datateam.name) print(datateam.config_resolver["sfdc.username"]) print(datateam.injector.get_or_raise("sfdc")) + print(datateam.config_resolver(c)) # Run the autogenerated CLI datateam.cli()