Return a sorted list of unique facet strings for `path` using the `facet_definitions` mapping of {pattern: [facet, facet]}.
(path, facet_definitions)
| 155 | |
| 156 | |
| 157 | def compute_path_facets(path, facet_definitions): |
| 158 | """ |
| 159 | Return a sorted list of unique facet strings for `path` using the |
| 160 | `facet_definitions` mapping of {pattern: [facet, facet]}. |
| 161 | """ |
| 162 | |
| 163 | if not path or not path.strip() or not facet_definitions: |
| 164 | return [] |
| 165 | |
| 166 | facets = set() |
| 167 | for matches in get_fileset_matches(path, facet_definitions, all_matches=True): |
| 168 | facets.update(matches) |
| 169 | return sorted(facets) |
| 170 | |
| 171 | |
| 172 | def build_facets(facets, known_facet_names=FACETS): |
no test coverage detected