Skip to content

Conversation

@leavesster
Copy link
Contributor

@leavesster leavesster commented Apr 2, 2025

fix #257

add plotly and matplotlib preview

use block preview event to check plotly and matplotlib lib

@leavesster leavesster requested a review from Copilot April 2, 2025 03:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a matplotlib-based test case along with the supporting task and package configuration for the "plot" flow.

  • Added a new test case in flow-examples/test/flow.test.ts to run and validate the plot flow.
  • Introduced task configuration files and a Python task implementation to generate a basic matplotlib plot.
  • Added a bootstrap script in the plot package configuration to set up dependencies.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
flow-examples/test/flow.test.ts New test case for executing the plot flow and validating exit code.
flow-examples/packages/plot/tasks/show/task.oo.yaml YAML configuration for the show task using matplotlib.
flow-examples/packages/plot/tasks/show/init.py Python task implementation that generates and displays a plot.
flow-examples/packages/plot/package.oo.yaml Package configuration with bootstrap script for dependency setup.
flow-examples/flows/plot/flow.oo.yaml Flow definition that includes the new plot task.
Files not reviewed (1)
  • flow-examples/packages/plot/requirements.txt: Language not supported
Comments suppressed due to low confidence (2)

flow-examples/test/flow.test.ts:98

  • It is recommended to assert that the result of events.find is not undefined to ensure the 'BlockPreview' event is actually emitted.
events.find(e => e.event === "BlockPreview");

flow-examples/packages/plot/tasks/show/init.py:16

  • Using plt.show() in a non-interactive or headless test environment may block execution; consider using an alternative backend or saving the plot to a file.
plt.show()

@leavesster leavesster force-pushed the extra-lib-support-test-case branch from 48e6737 to 318d26d Compare April 2, 2025 03:42
@leavesster leavesster force-pushed the extra-lib-support-test-case branch from 318d26d to eed4bbb Compare April 2, 2025 03:44
@leavesster leavesster changed the title chore(test): add matplotlib test case chore(test): add matplotlib and plotly test case Apr 2, 2025
@leavesster leavesster merged commit 42028c4 into main Apr 2, 2025
5 checks passed
@leavesster leavesster deleted the extra-lib-support-test-case branch April 2, 2025 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

增加 matplot 测试用例

2 participants