Skip to content

Commit

Permalink
add lint example
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonlee5 committed Sep 5, 2024
1 parent dfcfcea commit 925c6d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/app/flows/NodeEditor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,17 @@ You can save notebooks in a few ways:

Executing any of these actions will lint the pipeline cell(s), and then commit and deploy the pipeline code to the workflow orchestrator. A pop-up will box will appear for each of these actions; lint warnings/errors will be displayed in the initial pop-up, and commit confirmation will be displayed on the second pop-up.

:::info

A more detailed view of lint issues in pipeline cells can be observed by running `lint()` in a notebook cell.

<div style={{textAlign: 'center'}}>
<img width="800" alt="Full lint output" src="https://ganymede-bio.mo.cloudinary.net/apiServer/Example_Lint_Output_20240905.png"
/>
</div>

:::

:::note

Code is committed and deployed upon saving, even if it does not pass linting, and even if it is not executed prior to saving. This allows you to step outside the structure enforced by black and ruff if desired.
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/markdowns/AgentModelsAndMethods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def execute(new_file: FileParam, **kwargs) -> None:

default_path = "C:/Users/dev/liquid_handler/worklist/"

# The vars parameter can be updated by adding variables on the associated [Connection page](../../app/agents/AgentMonitoring#updating-connections) or upon [Connection installation](../../app/agents/Agent#windows-installation) using a -v flag for each variable.
# The vars parameter can be updated by adding variables on the associated Connection page or upon Connection installation using a -v flag for each variable.
path = Path(kwargs.get("vars", {}).get("output_path", default_path))

# add experiment ID to the path variable
Expand All @@ -232,7 +232,7 @@ def execute(new_file: FileParam, **kwargs) -> None:
full_path = path / filename

# Write file to full_path
try
try:
with open(full_path, "wb") as fp:
fp.write(new_file.body)
except FileNotFoundError:
Expand Down

0 comments on commit 925c6d3

Please sign in to comment.