https://prefect.io logo
Title
c

Chris Bowen

07/09/2021, 5:11 PM
Hello, I'm not sure if this is more of a Prefect server question or a UI question, but I'm running Prefect server, so figured I'd start here. I read through the documentation page and the code styling page and I don't completely understand how to utilize the doc strings to auto-generate documentation. I see that I can add a Markdown description to each flow via the UI, but I'd rather keep my documentation in DevOps and do it via code. On the documentation page, I see it says, "_Modules, functions, and classes must be explicitly added to the auto-generated documentation_" and I should reference the "_generated Markdown file_" in the
TOML
file. I'm not sure where/what generates the referenced Markdown file though. I put some docstrings into some of my flows and registered them, but I don't see a Markdown file generated anywhere, nor do I see any change on the UI that displays my doc string. Feels like I might be missing something (or another Prefect Docs page). Any advice is greatly appreciated! Thank you.
z

Zach Angell

07/09/2021, 5:46 PM
Hi @Chris Bowen the documentation page and code styling are for Prefect development purposes only. The explanations given refer to how the Prefect python library auto-generates its documentation (basically everything on docs.prefect.io). Sorry for the confusion here. Happy to chat about strategies for documenting your code to generate a README, but this is not a Prefect feature
c

Chris Bowen

07/09/2021, 8:03 PM
Thanks @Zach Angell, appreciate the clarification. I saw a couple threads on using the Markdown option in the UI, doesn't seem to currently be a "code" method to approach managing the Markdown? Any idea where the Markdown writes to once you've created it in the UI?
z

Zach Angell

07/09/2021, 8:25 PM
At the moment the markdown text is saved to the Prefect Cloud/Server database. Let me check with the team on whether or not it can be managed programmatically
So more specifically, the markdown is saved on the
FlowGroup
model as the
description
field To update the markdown programatically, you can run the mutation
mutation {
  set_flow_group_description(input:{description:"<<All about my flow here>>"}) {
    success
  }
}