Skip to content

Commit

Permalink
Set site=facility if no separate site
Browse files Browse the repository at this point in the history
  • Loading branch information
jl-wynen committed Jan 24, 2025
1 parent 81ac2df commit 7fa45b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scippneutron/metadata/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ class Beamline(BaseModel):
... site='PSI',
... )
If there is no separate facility and site, omit ``site``:
If there is no separate facility and site, either omit ``site`` or use the same
value for both ``facility`` and ``site``. For example:
>>> beamline = Beamline(
... name='ESTIA',
... facility='ESS',
... site=None, # can be omitted
... site='ESS', # can be omitted
... )
If the beamline has been upgraded, provide a revision to indicate
Expand Down Expand Up @@ -401,4 +402,4 @@ def _guess_facility_and_site(
case (facility, site):
return facility, site
case facility:
return facility, None
return facility, facility

0 comments on commit 7fa45b0

Please sign in to comment.