rda-python-common 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
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.
Potentially problematic release.
This version of rda-python-common might be problematic. Click here for more details.
- rda_python_common/PgCMD.py +8 -7
- rda_python_common/PgDBI.py +4 -3
- rda_python_common/PgFile.py +7 -6
- rda_python_common/PgGLBS.py +9 -7
- rda_python_common/PgLOG.py +3 -2
- rda_python_common/PgLock.py +8 -7
- rda_python_common/PgOPT.py +7 -6
- rda_python_common/PgPGS.py +4 -3
- rda_python_common/PgSIG.py +5 -4
- rda_python_common/PgSplit.py +6 -5
- rda_python_common/PgUtil.py +3 -2
- {rda_python_common-1.0.1.dist-info → rda_python_common-1.0.2.dist-info}/METADATA +1 -1
- rda_python_common-1.0.2.dist-info/RECORD +17 -0
- rda_python_common-1.0.1.dist-info/RECORD +0 -17
- {rda_python_common-1.0.1.dist-info → rda_python_common-1.0.2.dist-info}/LICENSE +0 -0
- {rda_python_common-1.0.1.dist-info → rda_python_common-1.0.2.dist-info}/WHEEL +0 -0
- {rda_python_common-1.0.1.dist-info → rda_python_common-1.0.2.dist-info}/top_level.txt +0 -0
rda_python_common/PgCMD.py
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
# Title : PgCMD.py
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 08/25/2020
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : python library module for functions to record commands for delayed
|
|
8
10
|
# mode or command recovery
|
|
9
11
|
#
|
|
10
|
-
#
|
|
11
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
12
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
12
13
|
#
|
|
13
14
|
###############################################################################
|
|
14
15
|
#
|
|
@@ -16,11 +17,11 @@ import os
|
|
|
16
17
|
import re
|
|
17
18
|
import sys
|
|
18
19
|
import time
|
|
19
|
-
import PgLOG
|
|
20
|
-
import PgSIG
|
|
21
|
-
import PgUtil
|
|
22
|
-
import PgLock
|
|
23
|
-
import PgDBI
|
|
20
|
+
from . import PgLOG
|
|
21
|
+
from . import PgSIG
|
|
22
|
+
from . import PgUtil
|
|
23
|
+
from . import PgLock
|
|
24
|
+
from . import PgDBI
|
|
24
25
|
|
|
25
26
|
# cached dscheck info
|
|
26
27
|
DSCHK = {}
|
rda_python_common/PgDBI.py
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
# Title : PgDBI.py -- PostgreSQL DataBase Interface
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 06/07/2022
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : Python library module to handle query and manipulate PostgreSQL database
|
|
8
10
|
#
|
|
9
|
-
#
|
|
10
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
11
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
11
12
|
#
|
|
12
13
|
###############################################################################
|
|
13
14
|
|
|
@@ -19,7 +20,7 @@ import psycopg2 as PgSQL
|
|
|
19
20
|
from psycopg2.extras import execute_values
|
|
20
21
|
from psycopg2.extras import execute_batch
|
|
21
22
|
from os import path as op
|
|
22
|
-
import PgLOG
|
|
23
|
+
from . import PgLOG
|
|
23
24
|
|
|
24
25
|
pgdb = None # reference to a connected database object
|
|
25
26
|
curtran = 0 # 0 - no transaction, 1 - in transaction
|
rda_python_common/PgFile.py
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
# Title : PgFile.py
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 08/05/2020
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : python library module to copy, move and delete data files locally
|
|
8
10
|
# and remotely
|
|
9
11
|
#
|
|
10
|
-
#
|
|
11
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
12
|
+
# Github : https://github.com/NCAR/rda-python_common.git
|
|
12
13
|
#
|
|
13
14
|
###############################################################################
|
|
14
15
|
#
|
|
@@ -22,10 +23,10 @@ import re
|
|
|
22
23
|
import time
|
|
23
24
|
import glob
|
|
24
25
|
import json
|
|
25
|
-
import PgLOG
|
|
26
|
-
import PgUtil
|
|
27
|
-
import PgSIG
|
|
28
|
-
import PgDBI
|
|
26
|
+
from . import PgLOG
|
|
27
|
+
from . import PgUtil
|
|
28
|
+
from . import PgSIG
|
|
29
|
+
from . import PgDBI
|
|
29
30
|
|
|
30
31
|
CMDBTH = (0x0033) # return both stdout and stderr, 16 + 32 + 2 + 1
|
|
31
32
|
RETBTH = (0x0030) # return both stdout and stderr, 16 + 32
|
rda_python_common/PgGLBS.py
CHANGED
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
# Title : PgGLBS.py
|
|
5
5
|
# Author : Thomas Cram, tcram@ucar.edu
|
|
6
6
|
# Date : 12/10/2014
|
|
7
|
-
#
|
|
8
|
-
# Changes : 10/10/2020, Zaihua Ji, zji@ucar.edu:
|
|
7
|
+
# 10/10/2020, Zaihua Ji, zji@ucar.edu:
|
|
9
8
|
# converted from perl package to python module
|
|
9
|
+
# 2025-01-10, Zaihua Ji, zji@ucar.edu:
|
|
10
|
+
# transferred to package rda_python_common from
|
|
11
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
12
|
+
# Purpose : python library module for Globus functions and utilities
|
|
10
13
|
#
|
|
11
|
-
#
|
|
12
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
14
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
13
15
|
#
|
|
14
16
|
###############################################################################
|
|
15
17
|
#
|
|
16
18
|
import os
|
|
17
19
|
import re
|
|
18
|
-
import PgLOG
|
|
19
|
-
import PgUtil
|
|
20
|
+
from . import PgLOG
|
|
21
|
+
from . import PgUtil
|
|
20
22
|
from MyGlobus import MyGlobus, MyEndpoints, GLOBUS_REQUEST_DOMAIN
|
|
21
|
-
import PgDBI
|
|
23
|
+
from . import PgDBI
|
|
22
24
|
|
|
23
25
|
try:
|
|
24
26
|
from urllib.parse import urlencode
|
rda_python_common/PgLOG.py
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
# Title : PgLOG.py -- Module for logging messages.
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 03/02/2016
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : Python library module to log message and also do other things
|
|
8
10
|
# according to the value of logact, like display the error
|
|
9
11
|
# message on screen and exit script
|
|
10
12
|
#
|
|
11
|
-
#
|
|
12
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
13
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
13
14
|
#
|
|
14
15
|
###############################################################################
|
|
15
16
|
|
rda_python_common/PgLock.py
CHANGED
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
# Title : PgLock.py
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 08/118/2020
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : python library module for functions to lock RDADB records
|
|
8
10
|
#
|
|
9
|
-
#
|
|
10
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
11
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
11
12
|
#
|
|
12
13
|
###############################################################################
|
|
13
14
|
#
|
|
14
15
|
import re
|
|
15
16
|
import time
|
|
16
|
-
import PgLOG
|
|
17
|
-
import PgSIG
|
|
18
|
-
import PgUtil
|
|
19
|
-
import PgFile
|
|
20
|
-
import PgDBI
|
|
17
|
+
from . import PgLOG
|
|
18
|
+
from . import PgSIG
|
|
19
|
+
from . import PgUtil
|
|
20
|
+
from . import PgFile
|
|
21
|
+
from . import PgDBI
|
|
21
22
|
|
|
22
23
|
DOLOCKS = {-2 : 'Force Unlock', -1 : 'Unlock', 0 : 'Unlock', 1 : 'Relock', 2 : 'Force Relock'}
|
|
23
24
|
|
rda_python_common/PgOPT.py
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
#
|
|
6
6
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
7
7
|
# Date : 08/26/2020
|
|
8
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
9
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
8
10
|
# Purpose : python library module for holding global varaibles
|
|
9
11
|
# functions for processing options and other global functions
|
|
10
12
|
#
|
|
11
|
-
#
|
|
12
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
13
|
+
# Github : https://github.com/NCAR/rda-pyhon-common.git
|
|
13
14
|
#
|
|
14
15
|
###############################################################################
|
|
15
16
|
#
|
|
@@ -18,10 +19,10 @@ import sys
|
|
|
18
19
|
import re
|
|
19
20
|
import time
|
|
20
21
|
from os import path as op
|
|
21
|
-
import PgLOG
|
|
22
|
-
import PgUtil
|
|
23
|
-
import PgFile
|
|
24
|
-
import PgDBI
|
|
22
|
+
from . import PgLOG
|
|
23
|
+
from . import PgUtil
|
|
24
|
+
from . import PgFile
|
|
25
|
+
from . import PgDBI
|
|
25
26
|
|
|
26
27
|
OUTPUT = None
|
|
27
28
|
CMDOPTS = {}
|
rda_python_common/PgPGS.py
CHANGED
|
@@ -4,17 +4,18 @@
|
|
|
4
4
|
# Title : PgPGS.py -- PostgreSQL Interface for CDP DataBase Per psql
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 08/31/2020
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : python library module to handle sql scripts to retrieve info
|
|
8
10
|
# from cdp database per psql
|
|
9
11
|
#
|
|
10
|
-
#
|
|
11
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
12
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
12
13
|
#
|
|
13
14
|
###############################################################################
|
|
14
15
|
#
|
|
15
|
-
import PgLOG
|
|
16
16
|
import os
|
|
17
17
|
import re
|
|
18
|
+
from . import PgLOG
|
|
18
19
|
|
|
19
20
|
PGPGS = {}
|
|
20
21
|
PGPGS["PGSSERV"] = PgLOG.get_environment("PGSSERV", '-h vetsdbprod -p 5432 -U acadmin access_control');
|
rda_python_common/PgSIG.py
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
#
|
|
6
6
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
7
7
|
# Date : 08/05/2020
|
|
8
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
9
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
8
10
|
# Purpose : python library module for start and control daemon process
|
|
9
11
|
#
|
|
10
|
-
#
|
|
11
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
12
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
12
13
|
#
|
|
13
14
|
###############################################################################
|
|
14
15
|
#
|
|
@@ -19,8 +20,8 @@ import errno
|
|
|
19
20
|
import signal
|
|
20
21
|
import time
|
|
21
22
|
from contextlib import contextmanager
|
|
22
|
-
import PgLOG
|
|
23
|
-
import PgDBI
|
|
23
|
+
from . import PgLOG
|
|
24
|
+
from . import PgDBI
|
|
24
25
|
|
|
25
26
|
VUSERS = [] # allow users to start this daemon
|
|
26
27
|
CPIDS = {} # allow upto 'mproc' processes at one time for daemon
|
rda_python_common/PgSplit.py
CHANGED
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
# Title : PgSplit.py -- PostgreSQL DataBase Interface foe table wfile
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 09/010/2024
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : Python library module to handle query and manipulate table wfile
|
|
8
10
|
#
|
|
9
|
-
#
|
|
10
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
11
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
11
12
|
#
|
|
12
13
|
###############################################################################
|
|
13
14
|
|
|
14
15
|
import os
|
|
15
16
|
import re
|
|
16
17
|
from os import path as op
|
|
17
|
-
import PgLOG
|
|
18
|
-
import PgDBI
|
|
19
|
-
import PgUtil
|
|
18
|
+
from . import PgLOG
|
|
19
|
+
from . import PgDBI
|
|
20
|
+
from . import PgUtil
|
|
20
21
|
|
|
21
22
|
#
|
|
22
23
|
# compare wfile records between tables wfile and wfile_dNNNNNN,
|
rda_python_common/PgUtil.py
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
# Title : PgUtil.py -- module for misc utilities.
|
|
5
5
|
# Author : Zaihua Ji, zji@ucar.edu
|
|
6
6
|
# Date : 07/27/2020
|
|
7
|
+
# 2025-01-10 transferred to package rda_python_common from
|
|
8
|
+
# https://github.com/NCAR/rda-shared-libraries.git
|
|
7
9
|
# Purpose : python library module for global misc utilities
|
|
8
10
|
#
|
|
9
|
-
#
|
|
10
|
-
# Github : https://github.com/NCAR/rda-shared-libraries.git
|
|
11
|
+
# Github : https://github.com/NCAR/rda-python-common.git
|
|
11
12
|
#
|
|
12
13
|
###############################################################################
|
|
13
14
|
#
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
rda_python_common/PgCMD.py,sha256=dsFL_hiAHRZ-BwncgZhxQ7p9O10ox9lUSXOIePjZ-PQ,20487
|
|
2
|
+
rda_python_common/PgDBI.py,sha256=9u0B6dBwLYgVx2GNburifHzEs2npEbh-gsitBXLc_Ag,73746
|
|
3
|
+
rda_python_common/PgFile.py,sha256=FuAmumeiCBK1wUrMa7p0X7tpJcJqzlITz11ghEgLce8,96805
|
|
4
|
+
rda_python_common/PgGLBS.py,sha256=3vmCA5tUwpg3Xjq8rgo2WWkadLSGGbVyU9ScNGqucy8,6861
|
|
5
|
+
rda_python_common/PgLOG.py,sha256=Ja77nqFFObrucppL1gSaFEycdnm9a-2yCtp_Wkx6SuI,53724
|
|
6
|
+
rda_python_common/PgLock.py,sha256=12i84nsGBuifSyPnm8IR63LvHvRuVU573D5QKFlHdOI,22623
|
|
7
|
+
rda_python_common/PgOPT.py,sha256=KrFdTsIl_QZc53Kb5w8aVr11_1_h3HZ7C8t55lmqVwY,55378
|
|
8
|
+
rda_python_common/PgPGS.py,sha256=HuU21xlm5ewg1UuFDx4CCqTKcw_QzjBQthoPEl6ZpCo,5092
|
|
9
|
+
rda_python_common/PgSIG.py,sha256=oDXcSnnzW6wKm_cSpFxQZWAo2hpPPTcuNDYhPSNQcRc,35607
|
|
10
|
+
rda_python_common/PgSplit.py,sha256=QKPbF55m8KCTGmwVwL3uG_nuylCC4FSVfLuXeLjJHbE,8816
|
|
11
|
+
rda_python_common/PgUtil.py,sha256=F1CVuhsNhfuRfZ4mEx9ocrHrspjrCrLIFHX1hQsufVc,48730
|
|
12
|
+
rda_python_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
rda_python_common-1.0.2.dist-info/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
|
|
14
|
+
rda_python_common-1.0.2.dist-info/METADATA,sha256=DeOfRVfr5u2oRlmvMD07RexVfs7zPt8AAuNg6m5x4d0,629
|
|
15
|
+
rda_python_common-1.0.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
16
|
+
rda_python_common-1.0.2.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
|
|
17
|
+
rda_python_common-1.0.2.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
rda_python_common/PgCMD.py,sha256=ZjGuKv6ozloZlryIUww7qyL2fGy86G01dO2iazX7iyE,20364
|
|
2
|
-
rda_python_common/PgDBI.py,sha256=Y9aPLMdN1LGSUU2hu-_eO4R8z7uPG6n9k4Bq7Um5GbI,73651
|
|
3
|
-
rda_python_common/PgFile.py,sha256=Yv0vmjJdiTSdE8KGh6yM3fSuysHQB_OCpm4GfGI8thE,96690
|
|
4
|
-
rda_python_common/PgGLBS.py,sha256=5LeK8jVg_5NkMBARHLrFqfhjT08SWwREGB4XA3rV4wU,6713
|
|
5
|
-
rda_python_common/PgLOG.py,sha256=7QvMWwg_k-Dj8mMnpY1k_nQtTH944oQy2QEJMVER38w,53636
|
|
6
|
-
rda_python_common/PgLock.py,sha256=uqsJuMuykiGgtXdBhHZ2of-LADeNDIuUKm39Ym6pM2s,22501
|
|
7
|
-
rda_python_common/PgOPT.py,sha256=MLUYDCTYH-dwDKPzvlNwSMbtWicD8IctA5QqtqShDnI,55263
|
|
8
|
-
rda_python_common/PgPGS.py,sha256=P_Oy5BZEsLTA4c8Qs9FMNgnZijcf-sa-k-T1mXTm1dU,4997
|
|
9
|
-
rda_python_common/PgSIG.py,sha256=5B91l6ofuRR_kk_JlUO1pH15PHlhvKs_H6rfrMcwTGo,35505
|
|
10
|
-
rda_python_common/PgSplit.py,sha256=SQEQY305n__DfnOZnhqbNDTaLtgdFvRFYMi5KH3ecSY,8709
|
|
11
|
-
rda_python_common/PgUtil.py,sha256=XNdT_J1BhLZ0x2O8s8oV9IwWKEz-pyl8LKj--UlI3V0,48643
|
|
12
|
-
rda_python_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
rda_python_common-1.0.1.dist-info/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
|
|
14
|
-
rda_python_common-1.0.1.dist-info/METADATA,sha256=zKaX362Utgs5oNXIdnPYYN1q4vAQ79pbRdJcbpWbhpI,629
|
|
15
|
-
rda_python_common-1.0.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
16
|
-
rda_python_common-1.0.1.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
|
|
17
|
-
rda_python_common-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|