Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wildcard support to fs copy and link actions #677

Open
5 tasks
maddenp-noaa opened this issue Dec 12, 2024 · 0 comments
Open
5 tasks

Add wildcard support to fs copy and link actions #677

maddenp-noaa opened this issue Dec 12, 2024 · 0 comments
Assignees

Comments

@maddenp-noaa
Copy link
Collaborator

maddenp-noaa commented Dec 12, 2024

Description

Add support for glob and regex wildcards in fs copy and link actions.

Currently, the fs config key-value pair

/dst/<foo>: /src/foo.*

would be interpreted, when fed to uw fs copy, to mean:

Copy the file literally named foo.* in the /src/ directory as a file named <foo> in the /dst/ directory.

With support for a !glob UW YAML tag, key-value pair

/dst/<foo>: !glob /src/foo.*

would be interpreted to mean

Find all files in the /src/ directory matching glob pattern foo.* and copy them, retaining their names, to the directory /dst/.

Note that the <foo> element of the destination path is discarded. It is just a placeholder and can be anything, but is necessary to support multiple key-value pairs targeting the /dst/ directory, since keys must be unique.

Source paths tagged !regex would receive the same treatment, except that the patterns would be treated as regular expressions.

The uw fs link action would behave similarly, but create symlinks instead of copies.

AC

  • Implement the tags.
  • Appropriate (possible debug-level) messages are logged.
  • Add/update unit tests.
  • Update docs, both the UW YAML tags page and the fs mode page.
  • Update Jupyter fs notebook with examples.
@maddenp-noaa maddenp-noaa self-assigned this Dec 12, 2024
@maddenp-noaa maddenp-noaa converted this from a draft issue Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant