Skip to content

Commit fb1197f

Browse files
expand docstring for workspace constructor
1 parent be6e14a commit fb1197f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/pyhf/workspace.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,18 @@ class Workspace(_ChannelSummaryMixin, dict):
287287
valid_joins = ['none', 'outer', 'left outer', 'right outer']
288288

289289
def __init__(self, spec, validate: bool = True, **config_kwargs):
290-
"""Workspaces hold the model, data and measurements."""
290+
"""
291+
Workspaces hold the model, data and measurements.
292+
293+
Args:
294+
spec (:obj:`jsonable`): The HistFactory JSON specification
295+
validate (:obj:`bool`): Whether to validate against a JSON schema
296+
config_kwargs: Possible keyword arguments for the workspace configuration
297+
298+
Returns:
299+
model (:class:`~pyhf.workspace.Workspace`): The Workspace instance
300+
301+
"""
291302
spec = copy.deepcopy(spec)
292303
super().__init__(spec, channels=spec['channels'])
293304
self.schema = config_kwargs.pop('schema', 'workspace.json')

0 commit comments

Comments
 (0)