Skip to content

Commit

Permalink
feat: add include regex
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfouquet committed Aug 31, 2023
1 parent f52b71b commit 5e5c4a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
13 changes: 7 additions & 6 deletions workflows/util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ Upon completion all standardised TIFF and STAC files will be located within the

## Workflow Input Parameters

| Parameter | Type | Default | Description |
| ----------- | ---- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | str | s3://linz-topgraphic/maps/topo50/ | the uri (path) to the input tiffs |
| target | str | s3://linz- | the target uri (path) to copy the input and thumbnails |
| transform | str | f | String to be transformed from source to target to renamed filenames, e.g. `f.replace("text to replace", "new_text_to_use")`. Leave as `f` for no transformation. |
| copy-option | str | no-clobber | `--no-clobber` Skip overwriting existing files. `--force` Overwrite all files. `--force-no-clobber` Overwrite only changed files, skip unchanged files. tiffs |
| Parameter | Type | Default | Description |
| ----------- | ----- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | str | s3://linz-topgraphic/maps/topo50/ | the uri (path) to the input tiffs |
| target | str | s3://linz- | the target uri (path) to copy the input and thumbnails |
| include | regex | .\*.\*.tif?$ | A regular expression to match object path(s) or name(s) from within the source path to include. |
| transform | str | f | String to be transformed from source to target to renamed filenames, e.g. `f.replace("text to replace", "new_text_to_use")`. Leave as `f` for no transformation. |
| copy-option | str | no-clobber | `--no-clobber` Skip overwriting existing files. `--force` Overwrite all files. `--force-no-clobber` Overwrite only changed files, skip unchanged files. tiffs |

## Workflow Outputs

Expand Down
6 changes: 4 additions & 2 deletions workflows/util/create-thumbnails.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ spec:
value: "s3://linz-topographic-upload/maps/topo50/"
- name: target
value: "s3://linz-"
- name: include
value: ".*.*.tif?$"
- name: transform
value: "f"
- name: copy-option
Expand Down Expand Up @@ -57,7 +59,7 @@ spec:
- name: source
value: "{{workflow.parameters.source}}"
- name: include
value: ".*.*.tif?$"
value: "{{workflow.parameters.include}}"
- name: group
value: "1000"
- name: group-size
Expand Down Expand Up @@ -94,7 +96,7 @@ spec:
"list",
"--verbose",
"--include",
".*.*.tif?$",
"{{workflow.parameters.include}}",
"--group",
"2000",
"--output",
Expand Down

0 comments on commit 5e5c4a5

Please sign in to comment.