Skip to content

Commit

Permalink
Fixup XXXSource docs (#7629)
Browse files Browse the repository at this point in the history
Summary:
This code did not run. Now it runs.

Test Plan: Run these docblocks code locally
  • Loading branch information
gibsondan committed Apr 28, 2022
1 parent ee4cb0e commit 98fe635
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/sphinx/sections/api/apidocs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ builtin types above.
secret_job.execute_in_process(
run_config={
'graph': {'secret_op': {'config': 'test_value'}}
'ops': {'secret_op': {'config': 'test_value'}}
}
)
secret_job.execute_in_process(
run_config={
'graph': {'secret_op': {'config': {'env': 'VERY_SECRET_ENV_VARIABLE'}}}
'ops': {'secret_op': {'config': {'env': 'VERY_SECRET_ENV_VARIABLE'}}}
}
)
Expand All @@ -78,22 +78,22 @@ builtin types above.
from dagster import job, op, IntSource
@op(config_schema=IntSource)
def secret_int_op(context) -> str:
def secret_int_op(context) -> int:
return context.op_config
@job
def secret_job():
secret_op()
secret_int_op()
secret_job.execute_in_process(
run_config={
'graph': {'secret_int_op': {'config': 'test_value'}}
'ops': {'secret_int_op': {'config': 1234}}
}
)
secret_job.execute_in_process(
run_config={
'graph': {'secret_int_op': {'config': {'env': 'VERY_SECRET_ENV_VARIABLE_INT'}}}
'ops': {'secret_int_op': {'config': {'env': 'VERY_SECRET_ENV_VARIABLE_INT'}}}
}
)
Expand All @@ -111,22 +111,22 @@ builtin types above.
from dagster import job, op, BoolSource
@op(config_schema=BoolSource)
def secret_bool_op(context) -> str:
def secret_bool_op(context) -> bool:
return context.op_config
@job
def secret_job():
secret_op()
secret_bool_op()
secret_job.execute_in_process(
run_config={
'graph': {'secret_bool_op': {'config': 'test_value'}}
'ops': {'secret_bool_op': {'config': False}}
}
)
secret_job.execute_in_process(
run_config={
'graph': {'secret_bool_op': {'config': {'env': 'VERY_SECRET_ENV_VARIABLE_BOOL'}}}
'ops': {'secret_bool_op': {'config': {'env': 'VERY_SECRET_ENV_VARIABLE_BOOL'}}}
}
)
Expand Down

1 comment on commit 98fe635

@vercel
Copy link

@vercel vercel bot commented on 98fe635 Apr 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.