Skip to content

Commit

Permalink
expand docstring for workspace constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-held committed Nov 24, 2021
1 parent 2e69b53 commit 4d7e86b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/pyhf/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,18 @@ class Workspace(_ChannelSummaryMixin, dict):
valid_joins = ['none', 'outer', 'left outer', 'right outer']

def __init__(self, spec, validate: bool = True, **config_kwargs):
"""Workspaces hold the model, data and measurements."""
"""
Workspaces hold the model, data and measurements.
Args:
spec (:obj:`jsonable`): The HistFactory JSON specification
validate (:obj:`bool`): Whether to validate against a JSON schema
config_kwargs: Possible keyword arguments for the workspace configuration
Returns:
model (:class:`~pyhf.workspace.Workspace`): The Workspace instance
"""
spec = copy.deepcopy(spec)
super().__init__(spec, channels=spec['channels'])
self.schema = config_kwargs.pop('schema', 'workspace.json')
Expand Down

0 comments on commit 4d7e86b

Please sign in to comment.