Skip to content

Commit

Permalink
Procc docstr example (#96)
Browse files Browse the repository at this point in the history
* Example of new processors docstring

Signed-off-by: George <[email protected]>

* Example of processor docstr [new style], on DuplicateFields

Signed-off-by: George <[email protected]>

---------

Signed-off-by: George <[email protected]>
  • Loading branch information
Jorjeous authored Dec 17, 2024
1 parent caad20f commit 420e18a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sdp/processors/modify_manifest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,17 @@ class DuplicateFields(BaseParallelProcessor):
Returns:
The same data as in the input manifest with duplicated fields
as specified in the ``duplicate_fields`` input dictionary.
"""
as specified in the ``duplicate_fields`` input dictionary.
Example:
.. code-block:: yaml
- _target_: sdp.processors.modify_manifest.common.DuplicateFields
input_manifest_file: ${workspace_dir}/test1.json
output_manifest_file: ${workspace_dir}/test2.json
duplicate_fields: {"text":"answer"}
"""
def __init__(
self,
duplicate_fields: Dict,
Expand Down

0 comments on commit 420e18a

Please sign in to comment.