Skip to content

Commit a70a7cc

Browse files
committed
docs: add docstring
1 parent 4716e4d commit a70a7cc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/api-reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
supermirror
3434
types
3535
tools
36+
workflow
3637
```
3738

3839
## Amor

src/ess/reflectometry/workflow.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ def _concatenate_lists(*x):
4545
def with_filenames(
4646
workflow, runtype: Hashable, runs: Sequence[Filename[RunType]]
4747
) -> sciline.Pipeline:
48+
'''Sets a number of :code:`Filename[runtype]` simultaneously.
49+
The events from all listed files are concatenated in the workflow.
50+
51+
Arguments
52+
----------
53+
workflow:
54+
the workflow to copy and add the filenames to
55+
runtype:
56+
the kind of runtype to add the files as.
57+
Example: :code:`SampleRun` or :code:`ReferenceRun`.
58+
runs:
59+
the list of filenames to map over
60+
61+
Returns
62+
---------
63+
A copy of the original workflow mapping over the provided files.
64+
'''
4865
axis_name = f'{str(runtype).lower()}_runs'
4966
df = pd.DataFrame({Filename[runtype]: runs}).rename_axis(axis_name)
5067
wf = workflow.copy()

0 commit comments

Comments
 (0)