Observed since 20 Oct, 16:34 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
a2r
Archive (safe)-Removal Rolling Toolbox
The name a2r, pronounced as a double r, stands for Archive safe-Remove Rolling. It's a toolbox that provides different tool for:
pip install a2r
mamba install a2r
Usage: a2r [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
rolling
saferm
update-md5
To keep a directory under rolling, use the command:
Usage: cli.py rolling [OPTIONS]
Options:
-c, --config PATH [required]
--dry-run Dry run mode.
-d, --debug Enable debug mode.
--help Show this message and exit.
Here a template of a rolling configuration file:
- !CleanPath
path: $PATH_UNDER_ROLLING
fmt: ???????? # YYYYMMDD
safe:
to_keep: X
reference_paths:
- <REF1>
- <REF2>
conditional:
to_keep: Y
expected_files:
- file.exe
- tmp.nc
force:
to_keep: Z
let's comment each section.
With this, we start to declare a list of !CleanPath objects with two mandatory attributes:
- !CleanPath
path: $PATH_UNDER_ROLLING
fmt: ???????? # YYYYMMDD
path: it's the path to keep under rollingfmt: it's a string bash that represent the format of file/dir to delete. It can contains jolly characters ? or * safe:
to_keep: X
reference_paths:
- <REF1>
- <REF2>
safe: means for safe rolling, which means delete a file only if an identical local copy already existsto_keep: how much dir/file to not include in the rollingreference_paths: a list of path where to find if a local copy already existsTo consider that the safe mode doesn't remove the dir under rolling.
conditional:
to_keep: Y
expected_files:
- file.exe
- tmp.nc
conditional: specify to remove a dir if some conditions are meetto_keep: how much dir/file to not include in the rollingexpected_files: specify the exact list of files expected to find in rolling path to trigger the rm operations. The
filename can contains jolly character ? and * force: # optional
to_keep: Z
force: Enable path rm without any checkto_keep: how much dir/file to not include in the rollingA requirement to safe clean, is to compute in advance the md5 of all files in the rolling path using the command:
update-md5 [OPTIONS]
Options:
-p, --path PATH [required]
-d, --debug Enable debug mode.
--help Show this message and exit.
The command will create in the directory a file called .dir_md5.txt with the following structure:
md5hash filename1
md5hash filename2
Safe Rm command is the equivalent of safe rm rolling section: it removes files from clean path only if exists an identical copy in keep path
Usage: cli.py saferm [OPTIONS]
Options:
--keep PATH [required]
--clean PATH [required]
-f, --force Delete files without confirm request
-d, --dry-run Disable file removal
-d, --debug Enable debug mode.
--help Show this message and exit.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
clickEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.10",
"evaluation": "NOT_EVALUATED"
} | click<9.0.0,>=8.1.7 | runtime |
pydanticEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.10",
"evaluation": "NOT_EVALUATED"
} | pydantic<3.0.0,>=2.8.2 | runtime |
pytestEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest<9.0.0,>=8.3.2 | runtime |
pytest-mockEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest-mock<4.0.0,>=3.14.0 | runtime |
pyyamlEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.10",
"evaluation": "NOT_EVALUATED"
} | pyyaml<7.0.0,>=6.0.2 | runtime |
richEnvironment{
"extras": "",
"marker": null,
"requires_python": "<4.0,>=3.10",
"evaluation": "NOT_EVALUATED"
} | rich<14.0.0,>=13.7.1 | runtime |
bdist_wheel · 17.56 KB · Python py3
sdist · 14.48 KB · Python source
Observed since 20 Oct, 16:34 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:1d13563fbd4689e761d677ad00565d5248e4541c8bcff56300988e91cf9b409a