-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
448318f
commit 8e05ebc
Showing
69 changed files
with
638 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
``uwtools.api.fs`` | ||
================== | ||
|
||
.. automodule:: uwtools.api.fs | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ API | |
driver | ||
esg_grid | ||
execute | ||
file | ||
filter_topo | ||
fs | ||
fv3 | ||
global_equiv_resol | ||
ioda | ||
|
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
docs/sections/user_guide/cli/tools/file/copy-exec-no-target-dir-err.cmd
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
docs/sections/user_guide/cli/tools/file/copy-exec-no-target-dir-err.out
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
docs/sections/user_guide/cli/tools/file/copy-exec-timedep.cmd
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
docs/sections/user_guide/cli/tools/file/link-exec-no-target-dir-err.cmd
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
docs/sections/user_guide/cli/tools/file/link-exec-no-target-dir-err.out
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
docs/sections/user_guide/cli/tools/file/link-exec-timedep.cmd
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
``fs`` | ||
====== | ||
|
||
.. _cli_fs_mode: | ||
|
||
The ``uw`` mode for handling filesystem items (files and directories). | ||
|
||
.. literalinclude:: fs/help.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/help.out | ||
:language: text | ||
|
||
``copy`` | ||
-------- | ||
|
||
The ``copy`` action stages files in a target directory by copying files. Any ``KEY`` positional arguments are used to navigate, in the order given, from the top of the config to the :ref:`file block <files_yaml>`. | ||
|
||
.. literalinclude:: fs/copy-help.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/copy-help.out | ||
:language: text | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
Given ``copy-config.yaml`` containing | ||
|
||
.. literalinclude:: fs/copy-config.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/copy-exec.cmd | ||
:emphasize-lines: 2 | ||
.. literalinclude:: fs/copy-exec.out | ||
:language: text | ||
|
||
Here, ``foo`` and ``bar`` are copies of their respective source files. | ||
|
||
The ``--cycle`` and ``--leadtime`` options can be used to make Python ``datetime`` and ``timedelta`` objects, respectively, available for use in Jinja2 expression in the config. For example: | ||
|
||
.. literalinclude:: fs/copy-config-timedep.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/copy-exec-timedep.cmd | ||
:emphasize-lines: 2 | ||
.. literalinclude:: fs/copy-exec-timedep.out | ||
:language: text | ||
|
||
The ``--target-dir`` option need not be specified when all destination paths are absolute, and will never be applied to absolute destination paths. If any destination paths are relative, however, it is an error not to provide a target directory: | ||
|
||
.. literalinclude:: fs/copy-config.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/copy-exec-no-target-dir-err.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/copy-exec-no-target-dir-err.out | ||
:language: text | ||
|
||
``link`` | ||
-------- | ||
|
||
The ``link`` action stages files in a target directory by linking files, directories, or other symbolic links. Any ``KEY`` positional arguments are used to navigate, in the order given, from the top of the config to the :ref:`file block <files_yaml>`. | ||
|
||
.. literalinclude:: fs/link-help.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/link-help.out | ||
:language: text | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
Given ``link-config.yaml`` containing | ||
|
||
.. literalinclude:: fs/link-config.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/link-exec.cmd | ||
:emphasize-lines: 2 | ||
.. literalinclude:: fs/link-exec.out | ||
:language: text | ||
|
||
Here, ``foo`` and ``bar`` are symbolic links. | ||
|
||
The ``--cycle`` and ``--leadtime`` options can be used to make Python ``datetime`` and ``timedelta`` objects, respectively, available for use in Jinja2 expression in the config. For example: | ||
|
||
.. literalinclude:: fs/link-config-timedep.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/link-exec-timedep.cmd | ||
:emphasize-lines: 2 | ||
.. literalinclude:: fs/link-exec-timedep.out | ||
:language: text | ||
|
||
The ``--target-dir`` option need not be specified when all linkname paths are absolute, and will never be applied to absolute linkname paths. If any linkname paths are relative, however, it is an error not to provide a target directory: | ||
|
||
.. literalinclude:: fs/link-config.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/link-exec-no-target-dir-err.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/link-exec-no-target-dir-err.out | ||
:language: text | ||
|
||
``makedirs`` | ||
------------ | ||
|
||
The ``makedirs`` action creates directories. Any ``KEY`` positional arguments are used to navigate, in the order given, from the top of the config to the :ref:`makedirs block <makedirs_yaml>`. | ||
|
||
.. literalinclude:: fs/makedirs-help.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/makedirs-help.out | ||
:language: text | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
Given ``makedirs-config.yaml`` containing | ||
|
||
.. literalinclude:: fs/makedirs-config.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/makedirs-exec.cmd | ||
:emphasize-lines: 2 | ||
.. literalinclude:: fs/makedirs-exec.out | ||
:language: text | ||
|
||
The ``--cycle`` and ``--leadtime`` options can be used to make Python ``datetime`` and ``timedelta`` objects, respectively, available for use in Jinja2 expression in the config. For example: | ||
|
||
.. literalinclude:: fs/makedirs-config-timedep.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/makedirs-exec-timedep.cmd | ||
:emphasize-lines: 2 | ||
.. literalinclude:: fs/makedirs-exec-timedep.out | ||
:language: text | ||
|
||
The ``--target-dir`` option need not be specified when all directory paths are absolute, and will never be applied to absolute paths. If any paths are relative, however, it is an error not to provide a target directory: | ||
|
||
.. literalinclude:: fs/makedirs-config.yaml | ||
:language: yaml | ||
.. literalinclude:: fs/makedirs-exec-no-target-dir-err.cmd | ||
:emphasize-lines: 1 | ||
.. literalinclude:: fs/makedirs-exec-no-target-dir-err.out | ||
:language: text |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
docs/sections/user_guide/cli/tools/fs/copy-exec-no-target-dir-err.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw fs copy --config-file copy-config.yaml config files |
3 changes: 3 additions & 0 deletions
3
docs/sections/user_guide/cli/tools/fs/copy-exec-no-target-dir-err.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[2024-08-14T15:19:59] INFO Validating config against internal schema: files-to-stage | ||
[2024-08-14T15:19:59] INFO 0 UW schema-validation errors found | ||
[2024-08-14T15:19:59] ERROR Relative path 'foo' requires the target directory to be specified |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rm -rf copy-dst-timedep | ||
uw fs copy --target-dir copy-dst-timedep --config-file copy-config-timedep.yaml --cycle 2024-05-29T12 --leadtime 6 config files | ||
echo | ||
tree copy-dst-timedep |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rm -rf copy-dst | ||
uw fs copy --target-dir copy-dst --config-file copy-config.yaml config files | ||
echo | ||
tree copy-dst |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw fs copy --help |
8 changes: 4 additions & 4 deletions
8
...s/user_guide/cli/tools/file/copy-help.out → ...ons/user_guide/cli/tools/fs/copy-help.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw fs --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
docs/sections/user_guide/cli/tools/fs/link-exec-no-target-dir-err.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw fs link --config-file link-config.yaml config files |
3 changes: 3 additions & 0 deletions
3
docs/sections/user_guide/cli/tools/fs/link-exec-no-target-dir-err.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[2024-08-14T15:19:57] INFO Validating config against internal schema: files-to-stage | ||
[2024-08-14T15:19:57] INFO 0 UW schema-validation errors found | ||
[2024-08-14T15:19:57] ERROR Relative path 'foo' requires the target directory to be specified |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rm -rf link-dst-timedep | ||
uw fs link --target-dir link-dst-timedep --config-file link-config-timedep.yaml --cycle 2024-05-29T12 --leadtime 6 config files | ||
echo | ||
tree link-dst-timedep |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rm -rf link-dst | ||
uw fs link --target-dir link-dst --config-file link-config.yaml config files | ||
echo | ||
tree link-dst |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uw fs link --help |
8 changes: 4 additions & 4 deletions
8
...s/user_guide/cli/tools/file/link-help.out → ...ons/user_guide/cli/tools/fs/link-help.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.