Skip to content

Commit

Permalink
Fixing config and updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazim-crim committed Nov 29, 2023
1 parent 9f8e8f6 commit fbe120f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ sync_permissions:
- name: thredds
type: service
- type: directory
regex: '(?<=:)[\w\/]+' # Match everything after ":" but before last "/" (ex: thredds:birdhouse/testdata/xclim/cmip6/sic_SImon_CCCma-CanESM5_ssp245_r13i1p2f1_2020.nc
regex: '(?<=:).*\/?(?=\/)' # Match everything after ":" but before last "/" (ex: thredds:birdhouse/testdata/xclim/cmip6/sic_SImon_CCCma-CanESM5_ssp245_r13i1p2f1_2020.nc
# will match to : birdhouse/testdata/xclim/cmip6). It would be equivalent as matching any number of directory using "**".
thredd_item:
- name: thredds
Expand Down
8 changes: 5 additions & 3 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ multiple choices of matching are possible.
We could match ``seg1/seg2`` with the first token, and ``seg3`` with the second token,
we could also match ``seg1`` with the first token, and ``seg2/seg3`` with the second token, etc.

In addition of using the name of the segment it is possible to use instead a key found in `Magpie`_ resource schema
with the :key:`field`. This is useful when we want to be able to have a different mapping between resources.
The :key:`field` : This is useful when we want to have a different mapping between resources. The resource_name
is used by default, but another key from the `Magpie`_ resource schema can be used, if specified by using the
:key:`field`.

A regular expression :key:`regex` may be used to extract the desired information from the ``nametype_path``.
This will override the default behaviour of matching each segment with other segment and will instead use
This will override the default behaviour of matching each segment with another segment and will instead use
what is extracted from the segment and prioritize the longest match. When used in the target, the :key:`regex`
extracts each resource in the segment with the same type.

Expand Down

0 comments on commit fbe120f

Please sign in to comment.