rda-python-dsarch 1.0.19__tar.gz → 1.0.20__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 (18) hide show
  1. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/PKG-INFO +1 -1
  2. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/pyproject.toml +1 -1
  3. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/PgArch.py +25 -0
  4. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/PKG-INFO +1 -1
  5. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/LICENSE +0 -0
  6. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/MANIFEST.in +0 -0
  7. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/README.md +0 -0
  8. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/setup.cfg +0 -0
  9. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/PgMeta.py +0 -0
  10. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/__init__.py +0 -0
  11. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/dsarch.py +0 -0
  12. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch/dsarch.usg +0 -0
  13. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/SOURCES.txt +0 -0
  14. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/dependency_links.txt +0 -0
  15. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/entry_points.txt +0 -0
  16. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/requires.txt +0 -0
  17. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/src/rda_python_dsarch.egg-info/top_level.txt +0 -0
  18. {rda_python_dsarch-1.0.19 → rda_python_dsarch-1.0.20}/tests/test_dsarch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_dsarch"
7
- version = "1.0.19"
7
+ version = "1.0.20"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -693,6 +693,7 @@ def check_enough_options(cact, acts):
693
693
  if 'EM' not in PgOPT.params: PgLOG.PGLOG['LOGMASK'] &= ~PgLOG.EMLALL # turn off email if not yet
694
694
  PgOPT.PGOPT['emerol'] |= PgLOG.EXITLG
695
695
  # set command line Batch options
696
+ set_qsub_walltime()
696
697
  PgCMD.set_batch_options(PgOPT.params, 1)
697
698
  PgCMD.init_dscheck(0, '', "dsarch", PgOPT.params['DS'], cact, PgLOG.PGLOG['CURDIR'], PgOPT.params['LN'],
698
699
  PgOPT.params['BP'], PgOPT.PGOPT['emerol'])
@@ -700,6 +701,30 @@ def check_enough_options(cact, acts):
700
701
 
701
702
  PgSIG.start_none_daemon('dsarch', PgOPT.PGOPT['CACT'], PgOPT.params['LN'], 1, PgOPT.params['WI'], 1, PgOPT.params['AL'])
702
703
 
704
+ #
705
+ # set qsub walltime if needed
706
+ #
707
+ def set_qsub_walltime():
708
+
709
+ fcnt = 0
710
+ if 'LF' in PgOPT.params:
711
+ fcnt = len(PgOPT.params['LF'])
712
+ elif 'WF' in PgOPT.params:
713
+ fcnt = len(PgOPT.params['WF'])
714
+ else:
715
+ return
716
+
717
+ if 'GX' in PgOPT.params: fcnt *= 30
718
+ hr = int(fcnt/30000)
719
+ if hr == 6: return
720
+
721
+ if hr < 2:
722
+ hr = 2
723
+ elif hr > 24:
724
+ hr = 24
725
+ PgCMD.set_one_boption('qoptions', '-l walltime={}:00:00'.format(hr), 1)
726
+ return
727
+
703
728
  #
704
729
  # build local file list for given local directory and reset file sizes
705
730
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch