rda-python-common 2.0.19__tar.gz → 2.1.1__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.
Files changed (33) hide show
  1. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/PKG-INFO +1 -1
  2. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/pyproject.toml +1 -1
  3. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_cmd.py +1 -1
  4. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_dbi.py +9 -8
  5. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/PKG-INFO +1 -1
  6. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/LICENSE +0 -0
  7. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/README.md +0 -0
  8. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/setup.cfg +0 -0
  9. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgCMD.py +0 -0
  10. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgDBI.py +0 -0
  11. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgFile.py +0 -0
  12. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgLOG.py +0 -0
  13. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgLock.py +0 -0
  14. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgOPT.py +0 -0
  15. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgSIG.py +0 -0
  16. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgSplit.py +0 -0
  17. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/PgUtil.py +0 -0
  18. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/__init__.py +0 -0
  19. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_file.py +0 -0
  20. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_lock.py +0 -0
  21. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_log.py +0 -0
  22. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_opt.py +0 -0
  23. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_password.py +0 -0
  24. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_sig.py +0 -0
  25. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_split.py +0 -0
  26. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pg_util.py +0 -0
  27. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common/pgpassword.py +0 -0
  28. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
  29. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
  30. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/entry_points.txt +0 -0
  31. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/requires.txt +0 -0
  32. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/top_level.txt +0 -0
  33. {rda_python_common-2.0.19 → rda_python_common-2.1.1}/test/test_common.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.0.19
3
+ Version: 2.1.1
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_common"
7
- version = "2.0.19"
7
+ version = "2.1.1"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -265,7 +265,7 @@ class PgCMD(PgLock):
265
265
  if otype: cmd += ' ' + otype
266
266
  ret = options = ''
267
267
  for loop in range(3):
268
- ret = self.pgsystem(cmd, self.LOGWRN, 279) # 1+2+4+16+256
268
+ ret = self.pgsystem(cmd, self.LOGWRN, 1299) # 1+2+16+256+1024
269
269
  if loop < 2 and self.PGLOG['SYSERR'] and 'Connection timed out' in self.PGLOG['SYSERR']:
270
270
  time.sleep(self.PGSIG['ETIME'])
271
271
  else:
@@ -20,17 +20,18 @@ from os import path as op
20
20
  from .pg_log import PgLOG
21
21
 
22
22
  class PgDBI(PgLOG):
23
-
24
- # PostgreSQL specified query timestamp format
25
- fmtyr = lambda fn: "extract(year from {})::int".format(fn)
26
- fmtqt = lambda fn: "extract(quarter from {})::int".format(fn)
27
- fmtmn = lambda fn: "extract(month from {})::int".format(fn)
28
- fmtdt = lambda fn: "date({})".format(fn)
29
- fmtym = lambda fn: "to_char({}, 'yyyy-mm')".format(fn)
30
- fmthr = lambda fn: "extract(hour from {})::int".format(fn)
31
23
 
32
24
  def __init__(self):
33
25
  super().__init__() # initialize parent class
26
+
27
+ # PostgreSQL specified query timestamp format
28
+ self.fmtyr = lambda fn=self: "extract(year from {})::int".format(fn)
29
+ self.fmtqt = lambda fn=self: "extract(quarter from {})::int".format(fn)
30
+ self.fmtmn = lambda fn=self: "extract(month from {})::int".format(fn)
31
+ self.fmtdt = lambda fn=self: "date({})".format(fn)
32
+ self.fmtym = lambda fn=self: "to_char({}, 'yyyy-mm')".format(fn)
33
+ self.fmthr = lambda fn=self: "extract(hour from {})::int".format(fn)
34
+
34
35
  self.pgdb = None # reference to a connected database object
35
36
  self.curtran = 0 # 0 - no transaction, 1 - in transaction
36
37
  self.NMISSES = [] # array of mising userno
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.0.19
3
+ Version: 2.1.1
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