-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix code block formatting in automations concepts docs #13959
Conversation
expect={"animal.walked"}, | ||
match={ | ||
"genus": "Marmota", | ||
"species": "monax", | ||
expect={"animal.walked"}, | ||
match={ | ||
"genus": "Marmota", | ||
"species": "monax", | ||
}, | ||
posture="Reactive", | ||
threshold=3, | ||
), | ||
actions=[CancelFlowRun()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This previously looks like actions is part of the trigger rather than being a sibling
@@ -171,7 +169,7 @@ Both the `event` and `metric` triggers support matching events for specific reso | |||
|
|||
Consider the `resource` and `related` fields on the following `prefect.flow-run.Completed` event, truncated for the sake of example. Its primary resource is a flow run, and since that flow run was started via a deployment, it is related to both its flow and its deployment: | |||
|
|||
```python | |||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this'll render any better/differently 🤔
as-is works fine except in one block further down where //
is used as comments but the block is marked as python
.
tho json usually doesn't actually support comments so idk how mintlify will render those as JSON either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try it and see how it looks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah i just noticed while making changes for 2.x these were previously already json/yaml/bash in 2.x. 🤔 wonder if there was a reason these changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rah the preview's blocks look much better to me! 👍
not sure why these would've all changed to python when they were moved over 🤷
table = Table(table_name) | ||
|
||
if not table.exists(): | ||
emit_event( | ||
event="table-missing", | ||
resource={"prefect.resource.id": "etl-events.transform"} | ||
) | ||
elif table.is_empty(): | ||
emit_event( | ||
event="table-empty", | ||
resource={"prefect.resource.id": "etl-events.transform"} | ||
if not table.exists(): | ||
emit_event( | ||
event="table-missing", | ||
resource={"prefect.resource.id": "etl-events.transform"} | ||
) | ||
else: | ||
# transform data | ||
|
||
elif table.is_empty(): | ||
emit_event( | ||
event="table-empty", | ||
resource={"prefect.resource.id": "etl-events.transform"} | ||
) | ||
else: | ||
# transform data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 spaces -> 4 spaces
for consistency w/ rest of the page's python blocks.
This PR includes minor tweaks to code blocks within the concepts/automations docs page.
json
/yaml
for code fences where relevant rather thanpython
PR for 2.x - #13962