Commit 0c4bff7
authored
feat(copy): add exclude_from parameter for rsync-based copy in Singularity builds (#526)
* feat(copy): add exclude_from parameter for rsync-based copy in Singularity builds
* refactor(copy): rename exclude_from to _exclude_from and reorder docstring alphabetically
Renamed the parameter `exclude_from` to `_exclude_from` to follow HPCCM
convention that container framework-specific options begin with an underscore
(e.g., `_chown`, `_mkdir`, `_post`).
Also reordered the parameter documentation block in `copy.py` to maintain
alphabetical order within the class docstring for consistency.
* chore(copy): remove unnecessary info log for rsync exclude_from
Removes the redundant `logging.info()` statement in the rsync exclusion
branch of the copy primitive to keep logging output minimal and consistent
with other primitives.
* test(copy): improve _exclude_from tests
Refactors the _exclude_from tests to use assertEqual() with full expected
recipe strings instead of multiple substring checks. This aligns the test
style with other HPCCM copy primitive tests.
Note:
When `_exclude_from` is used, an empty %files section is still emitted after
the rsync-based %setup block. This is intentional to preserve compatibility
with the existing copy control flow. The extra section is harmless and may
be removed in a future cleanup.
* refactor(copy): simplify _exclude_from initialization with default []1 parent 1238f2e commit 0c4bff7
2 files changed
+57
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| |||
80 | 91 | | |
81 | 92 | | |
82 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
| |||
96 | 111 | | |
97 | 112 | | |
98 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
| |||
211 | 232 | | |
212 | 233 | | |
213 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
214 | 242 | | |
215 | 243 | | |
216 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
0 commit comments