prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Prefect Markdown Artifacts: pass in a existing Markdown file or Jinja template

Open robfreedy opened this issue 1 year ago • 0 comments

First check

  • [X] I added a descriptive title to this issue.
  • [X] I used the GitHub search to find a similar request and didn't find it.
  • [X] I searched the Prefect documentation for this feature.

Prefect Version

2.x

Describe the current behavior

Currently, the create_markdown_artifact method can only take in a string for markdown.

Describe the proposed behavior

Being able to specify an existing markdown file to add to the artifact by file path and/or being able to use Jinja templating in a file to insert python values into an existing template would be useful when creating these types of artifacts.

Example Use

create_markdown_artifact(
    markdown_file_path = "/path/to/existing/markdown/test.md",
    key = "test-markdown-artifact",
    description = "This is the description for the test markdown artifact",
)

and/or

create_markdown_artifact(
   template_path="path/to/existing/template/template.md", 
   template_data=some_dict_of_data
   key = "test-markdown-artifact",
   description = "This is the description for the test markdown artifact",
)

Additional context

No response

robfreedy avatar May 17 '24 17:05 robfreedy