rda-python-miscs 3.0.9__tar.gz → 3.0.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rda_python_miscs-3.0.9/src/rda_python_miscs.egg-info → rda_python_miscs-3.0.10}/PKG-INFO +2 -2
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/pyproject.toml +2 -2
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexcp.py +35 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexcp.usg +6 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10/src/rda_python_miscs.egg-info}/PKG-INFO +2 -2
- rda_python_miscs-3.0.10/src/rda_python_miscs.egg-info/requires.txt +2 -0
- rda_python_miscs-3.0.9/src/rda_python_miscs.egg-info/requires.txt +0 -2
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/LICENSE +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/MANIFEST.in +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/README.md +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/setup.cfg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/__init__.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/bash_qsub.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/bashqsub.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/bashqsub.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/decsdata_restore.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/decsdata_restore.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/decsdata_storage.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/decsdata_storage.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdex_ls.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexdrop.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexdrop.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexdrop_standalone.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexkill.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexkill.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexls.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexls.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexls_standalone.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexmod.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexmod.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexown.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexown.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexps.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexps.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexsub.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexsub.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexzip.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexzip.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/pg_docs.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/pg_rst.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/pg_rst.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/pg_wget.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/pgwget.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/pgwget.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_cp.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_kill.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_mod.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_own.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_ps.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_sub.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rda_zip.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rdals.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rdals.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rst_templates/appendix.rst.temp +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rst_templates/index.rst.temp +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rst_templates/section.rst.temp +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/tcsh_qsub.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/tcshqsub.py +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/tcshqsub.usg +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/SOURCES.txt +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/dependency_links.txt +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/entry_points.txt +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/top_level.txt +0 -0
- {rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/tests/test_miscs.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_miscs
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.10
|
|
4
4
|
Summary: RDA Python package to hold RDA miscellaneous utility programs
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-miscs
|
|
@@ -11,7 +11,7 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Requires-Python: >=3.7
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: rda_python_common
|
|
14
|
+
Requires-Dist: rda_python_common>=3.0.28
|
|
15
15
|
Requires-Dist: rda_python_setuid
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "rda_python_miscs"
|
|
9
|
-
version = "3.0.
|
|
9
|
+
version = "3.0.10"
|
|
10
10
|
authors = [
|
|
11
11
|
{ name="Zaihua Ji", email="zji@ucar.edu" },
|
|
12
12
|
]
|
|
@@ -20,7 +20,7 @@ classifiers = [
|
|
|
20
20
|
"Development Status :: 5 - Production/Stable",
|
|
21
21
|
]
|
|
22
22
|
dependencies = [
|
|
23
|
-
"rda_python_common",
|
|
23
|
+
"rda_python_common>=3.0.28",
|
|
24
24
|
"rda_python_setuid",
|
|
25
25
|
]
|
|
26
26
|
|
|
@@ -254,12 +254,47 @@ class GdexCp(PgFile):
|
|
|
254
254
|
self.CINFO['fpath'] = (file if dosub else op.dirname(file)) + "/"
|
|
255
255
|
if info['isfile']:
|
|
256
256
|
self.CINFO['tcnt'] += self.dispatch_copy(file, info)
|
|
257
|
+
elif self.RDACP['r'] and self.can_upload_directory():
|
|
258
|
+
self.CINFO['tcnt'] += self.upload_directory(file, dosub)
|
|
257
259
|
elif dosub or self.RDACP['R']:
|
|
258
260
|
flist = self.gdex_glob(file, self.RDACP['fh'], 0, self.LGWNEX)
|
|
259
261
|
if flist: self.copy_list(flist, 1, file)
|
|
260
262
|
else:
|
|
261
263
|
self.pglog("{}{}: Add option -r to copy directory".format(self.CINFO['fhost'], file), self.LGEREX)
|
|
262
264
|
|
|
265
|
+
# check if a local directory can go to the Object Store in one recursive upload
|
|
266
|
+
def can_upload_directory(self):
|
|
267
|
+
"""Return True when a -r directory copy can be one recursive Object Store upload.
|
|
268
|
+
|
|
269
|
+
Needs a local source, an Object Store target and a key prefix from -t; with
|
|
270
|
+
the default target '.' the keys would start with '/', so such a copy goes
|
|
271
|
+
file by file instead.
|
|
272
|
+
"""
|
|
273
|
+
if self.RDACP['fh'] or not self.RDACP['th']: return False
|
|
274
|
+
if self.pgcmp(self.strip_host_name(self.RDACP['th']), self.OHOST, 1): return False
|
|
275
|
+
return (self.CINFO['tpath'] != '.')
|
|
276
|
+
|
|
277
|
+
# upload a local directory to the Object Store in one recursive call
|
|
278
|
+
def upload_directory(self, fromdir, dosub):
|
|
279
|
+
"""Upload a whole local directory to the Object Store with one isd_s3_cli call.
|
|
280
|
+
|
|
281
|
+
The files keep their layout under the -t key prefix: with the trailing '/'
|
|
282
|
+
form (dosub) they land at '{prefix}/{relative path}', otherwise the directory
|
|
283
|
+
name is kept too, at '{prefix}/{dirname}/{relative path}', the same keys a
|
|
284
|
+
file-by-file copy gives. -m is not used; isd_s3_cli uploads in parallel
|
|
285
|
+
threads of its own.
|
|
286
|
+
|
|
287
|
+
Args:
|
|
288
|
+
fromdir (str): Absolute source directory path.
|
|
289
|
+
dosub (int): 1 to upload the directory contents without the directory name.
|
|
290
|
+
|
|
291
|
+
Returns:
|
|
292
|
+
int: 1 if the directory was uploaded, 0 otherwise.
|
|
293
|
+
"""
|
|
294
|
+
todir = self.CINFO['tpath'] if dosub else self.join_paths(self.CINFO['tpath'], op.basename(fromdir))
|
|
295
|
+
logact = self.LGWNEX | (self.OVRIDE if self.RDACP['O'] else 0)
|
|
296
|
+
return (1 if self.local_copy_object_directory(todir, fromdir, None, None, logact) else 0)
|
|
297
|
+
|
|
263
298
|
# recursively copy directory/file
|
|
264
299
|
def copy_list(self, tlist, level, cdir):
|
|
265
300
|
"""Recursively copy a directory listing up to the configured depth limit.
|
|
@@ -57,6 +57,12 @@
|
|
|
57
57
|
COPY BEHAVIOR
|
|
58
58
|
|
|
59
59
|
-r Copy directories and files recursively, with no depth limit.
|
|
60
|
+
A local directory copied to an Object Store bucket (-tb) with -r and a
|
|
61
|
+
-t key prefix is uploaded in a single isd_s3_cli call, which uploads
|
|
62
|
+
in parallel threads of its own (-m is not used for it). Its files
|
|
63
|
+
keep their layout under the prefix. The directory is skipped when
|
|
64
|
+
all its files are already in the bucket at the same size; otherwise
|
|
65
|
+
the whole directory is uploaded again.
|
|
60
66
|
|
|
61
67
|
-R RecursiveLevel
|
|
62
68
|
Copy recursively up to the given depth. -R 1 copies only the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_miscs
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.10
|
|
4
4
|
Summary: RDA Python package to hold RDA miscellaneous utility programs
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-miscs
|
|
@@ -11,7 +11,7 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Requires-Python: >=3.7
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: rda_python_common
|
|
14
|
+
Requires-Dist: rda_python_common>=3.0.28
|
|
15
15
|
Requires-Dist: rda_python_setuid
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/decsdata_restore.usg
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/decsdata_storage.usg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexdrop_standalone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/gdexls_standalone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs/rst_templates/index.rst.temp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{rda_python_miscs-3.0.9 → rda_python_miscs-3.0.10}/src/rda_python_miscs.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|