Skip to content

Commit

Permalink
Added documentation example.
Browse files Browse the repository at this point in the history
  • Loading branch information
parth-kulkarni1 committed Dec 19, 2024
1 parent 3ae55ef commit 145a1bd
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/example-client-workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,46 @@
"print(\"Current job status:\", job_result.status) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Generating Report Functionality - Allows You To Generate Report (Word Document, .docx) For Study Close Out Reports from a Model Run Or Study. \n",
"\n",
"There are two potential approaches, you can take to generate the report: \n",
"\n",
" - 1- Default Path: If you don't provide a custom ```file_path``` parameter, it will store the generated word file in your relative directory (This is the directory where you are running the code from). \n",
"\n",
" - 2- Custom Path: If you provide a custom ```file_path``` parameter, even if the file path/directory does not exist, it will be automatically made and your file will be saved inside that directory. \n",
"\n",
" If you provide a file path, and the file path already exists your will be saved inside that existing directory as well. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from ProvenaInterfaces.ProvenanceAPI import GenerateReportRequest\n",
"from ProvenaInterfaces.RegistryModels import ItemSubType\n",
"\n",
"\n",
"# Generate's report document in your relative directory.\n",
"await client.prov_api.generate_report(report_request = GenerateReportRequest(\n",
" id = \"10378.1/1968661\", \n",
" item_subtype=ItemSubType.STUDY,\n",
" depth=1\n",
" ))\n",
"\n",
"# Generate's report document in a specified directory\n",
"await client.prov_api.generate_report(report_request = GenerateReportRequest(\n",
" id = \"10378.1/1968661\", \n",
" item_subtype=ItemSubType.STUDY,\n",
" depth=1\n",
" ), file_path=\"./idontexistpath/butinhere/\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 145a1bd

Please sign in to comment.