@@ -68,28 +68,34 @@ method.
6868Supported log parsers
6969+++++++++++++++++++++
7070
71- - :class: `~wfcommons.wfinstances.logs.pegasusrec.HierarchicalPegasusLogsParser `
7271- :class: `~wfcommons.wfinstances.logs.makeflow.MakeflowLogsParser `
7372- :class: `~wfcommons.wfinstances.logs.nextflow.NextflowLogsParser `
7473- :class: `~wfcommons.wfinstances.logs.pegasus.PegasusLogsParser `
74+ - :class: `~wfcommons.wfinstances.logs.snakemake.SnakemakeLogsParser `
75+ - :class: `~wfcommons.wfinstances.logs.ro_create.ROCrateLogsParser `
7576- :class: `~wfcommons.wfinstances.logs.taskvine.TaskVineLogsParser `
7677
7778Examples
7879++++++++
7980
80- Hierarchical Pegasus
81- ++++++++++++++++++++
81+ Below we give basic examples for using the log parsers. Review the specific documentation
82+ of each log parser for more details, such as additional parameters that configure the behavior
83+ of the log parser.
8284
83- This parser targets Pegasus submit directories that contain hierarchical workflows.
84- It recursively parses sub-workflows and rebuilds a coherent workflow instance::
85+ ..
86+ Hierarchical Pegasus
87+ ++++++++++++++++++++
8588
86- import pathlib
87- from wfcommons.wfinstances import HierarchicalPegasusLogsParser
89+ This parser targets Pegasus submit directories that contain hierarchical workflows.
90+ It recursively parses sub-workflows and rebuilds a coherent workflow instance::
91+
92+ import pathlib
93+ from wfcommons.wfinstances import HierarchicalPegasusLogsParser
8894
89- submit_dir = pathlib.Path('/path/to/pegasus/hierarchical/submit/dir/')
90- parser = HierarchicalPegasusLogsParser(submit_dir=submit_dir)
91- workflow = parser.build_workflow('pegasus-hierarchical-workflow-test')
92- workflow.write_json(pathlib.Path('./pegasus-hierarchical-workflow.json'))
95+ submit_dir = pathlib.Path('/path/to/pegasus/hierarchical/submit/dir/')
96+ parser = HierarchicalPegasusLogsParser(submit_dir=submit_dir)
97+ workflow = parser.build_workflow('pegasus-hierarchical-workflow-test')
98+ workflow.write_json(pathlib.Path('./pegasus-hierarchical-workflow.json'))
9399
94100Makeflow
95101++++++++
@@ -192,6 +198,43 @@ class: ::
192198 workflow_path = pathlib.Path('./pegasus-workflow.json')
193199 workflow.write_json(workflow_path)
194200
201+
202+
203+ RO-Crate
204+ +++++++++
205+ `RO-Crate <https://www.researchobject.org/ro-crate/ >`_ is a format for packaging research data so as to promote
206+ open and reproducible science. The RO-Crate logs parses processes RO-Crate artifacts created by executing workflows
207+ using the `Streamflow <https://streamflow.di.unito.it/ >`_ workflow management system. It may work
208+ for RO-Crate generated using other systems, but has not been tested.
209+ It takes as input the path of the RO-Crate directory, which contains the `ro-crate-metadata.json ` file. It
210+ generates workflow instances compatible with :ref: `json-format-label `::
211+
212+ import pathlib
213+ from wfcommons.wfinstances import ROCrateLogsParser
214+
215+ execution_dir = pathlib.Path('/path/to/snakemake/execution/dir/')
216+ parser = ROCrateLogsParser(execution_dir=execution_dir)
217+ workflow = parser.build_workflow('ro-crate-workflow-test')
218+ workflow.write_json(pathlib.Path('./ro-crate-workflow.json'))
219+
220+ Snakemake
221+ +++++++++
222+ `Snakemake <https://snakemake.readthedocs.io >`_ is a popular and easy-to-use workflow system.
223+ The Snakemake logs parser processes execution logs generated by the Snakemake
224+ `snkmt plugin <https://snakemake.github.io/snakemake-plugin-catalog/plugins/logger/snkmt.html >`_.
225+ It takes as input the path of the directory where all workflow data files reside (input and output
226+ of workflow tasks), and the path of the sqlite database created by the snkmt plugin. It
227+ generates workflow instances compatible with :ref: `json-format-label `::
228+
229+ import pathlib
230+ from wfcommons.wfinstances import SnakemakeLogsParser
231+
232+ execution_dir = pathlib.Path('/path/to/snakemake/execution/dir/')
233+ snkmt_db = pathlib.Path('/path/to/snkmt/sqlite/databasefile/')
234+ parser = SnakemakeLogsParser(execution_dir=execution_dir, snkmt_db=snkmt_db)
235+ workflow = parser.build_workflow('snakemake-workflow-test')
236+ workflow.write_json(pathlib.Path('./snakemake-workflow.json'))
237+
195238TaskVine
196239++++++++
197240
0 commit comments