rda-python-dsarch 3.0.2__py3-none-any.whl → 3.0.5__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.
@@ -176,7 +176,7 @@ PgOPT.OPTS = { # (!= 0) - setting actions
176
176
  'OG' : [2, 'OriginGroup', 1],
177
177
  'OT' : [2, 'OriginType', 1],
178
178
  'PI' : [2, 'ParentIndex', 17],
179
- 'QF' : [2, 'QuasarFile', 0],
179
+ 'QF' : [2, 'QuasarFile', 0, ''],
180
180
  'QT' : [2, 'QuasarFileType', 129, 'BD'],
181
181
  'RF' : [2, 'OriginFile', 0],
182
182
  'SF' : [2, 'SavedFile', 0],
@@ -20,7 +20,7 @@ object that existing callers expect.
20
20
 
21
21
  from . import PgArch, PgMeta
22
22
 
23
- __version__ = "2.0.21"
23
+ __version__ = "2.0.22"
24
24
 
25
25
  __all__ = [
26
26
  "PgArch",
@@ -3846,6 +3846,7 @@ def delete_web_files():
3846
3846
  reorder = metatotal = metacnt = dcnt = mcnt = ocnt = wcnt = 0
3847
3847
  PgArch.cache_group_info(ALLCNT, 0)
3848
3848
  PgOPT.validate_multiple_options(ALLCNT, ["WT", 'VI', 'QF', 'LC'])
3849
+ if 'QF' in PgOPT.params: PgOPT.params['QF'] = PgArch.get_bid_numbers(PgOPT.params['QF'])
3849
3850
 
3850
3851
  if PgLOG.PGLOG['DSCHECK']:
3851
3852
  bidx = PgCMD.set_dscheck_fcount(ALLCNT, PgOPT.PGOPT['extlog'])
@@ -3898,7 +3899,7 @@ def delete_web_files():
3898
3899
  continue
3899
3900
  bid = PgOPT.params['QF'][i] if 'QF' in PgOPT.params else pgrec['bid']
3900
3901
  if bid:
3901
- PgLOG.pglog(wfile + ": Web file is Quasar backed up, add option -qf '' to force delete", PgOPT.PGOPT['errlog'])
3902
+ PgLOG.pglog(wfile + ": Web file is Quasar backed up, add option -qf 0 to force delete", PgOPT.PGOPT['errlog'])
3902
3903
  continue
3903
3904
  if PgOPT.PGOPT['GXTYP'].find(type) > -1 and ('DX' in PgOPT.params or pgrec and pgrec['meta_link'] and pgrec['meta_link'] != 'N'):
3904
3905
  metacnt += PgMeta.record_meta_delete('W', dsid, wfile)
@@ -4498,6 +4499,7 @@ def delete_saved_files():
4498
4499
  bidx = chksize = reorder = scnt = ocnt = dcnt = 0
4499
4500
  PgArch.cache_group_info(ALLCNT, 0)
4500
4501
  PgOPT.validate_multiple_options(ALLCNT, ["ST", 'VI', 'QF', 'LC'])
4502
+ if 'QF' in PgOPT.params: PgOPT.params['QF'] = PgArch.get_bid_numbers(PgOPT.params['QF'])
4501
4503
 
4502
4504
  if PgLOG.PGLOG['DSCHECK']:
4503
4505
  bidx = PgCMD.set_dscheck_fcount(ALLCNT, PgOPT.PGOPT['extlog'])
@@ -4550,7 +4552,7 @@ def delete_saved_files():
4550
4552
  continue
4551
4553
  bid = PgOPT.params['QF'][i] if 'QF' in PgOPT.params else pgrec['bid']
4552
4554
  if bid:
4553
- PgLOG.pglog(sfile + ": Saved file is Quasar backed up, add option -qf '' to force delete", PgOPT.PGOPT['errlog'])
4555
+ PgLOG.pglog(sfile + ": Saved file is Quasar backed up, add option -qf 0 to force delete", PgOPT.PGOPT['errlog'])
4554
4556
  continue
4555
4557
 
4556
4558
  if sdel:
@@ -3634,6 +3634,7 @@ class DsArch(PgArch, PgMeta):
3634
3634
  reorder = metatotal = metacnt = dcnt = mcnt = ocnt = wcnt = 0
3635
3635
  self.cache_group_info(self.ALLCNT, 0)
3636
3636
  self.validate_multiple_options(self.ALLCNT, ["WT", 'VI', 'QF', 'LC'])
3637
+ if 'QF' in self.params: self.params['QF'] = self.get_bid_numbers(self.params['QF'])
3637
3638
  if self.PGLOG['DSCHECK']:
3638
3639
  bidx = self.set_dscheck_fcount(self.ALLCNT, self.PGOPT['extlog'])
3639
3640
  if bidx > 0:
@@ -3681,7 +3682,7 @@ class DsArch(PgArch, PgMeta):
3681
3682
  continue
3682
3683
  bid = self.params['QF'][i] if 'QF' in self.params else pgrec['bid']
3683
3684
  if bid:
3684
- self.pglog(wfile + ": Web file is Quasar backed up, add option -qf '' to force delete", self.PGOPT['errlog'])
3685
+ self.pglog(wfile + ": Web file is Quasar backed up, add option -qf 0 to force delete", self.PGOPT['errlog'])
3685
3686
  continue
3686
3687
  if self.PGOPT['GXTYP'].find(type) > -1 and ('DX' in self.params or pgrec and pgrec['meta_link'] and pgrec['meta_link'] != 'N'):
3687
3688
  metacnt += self.record_meta_delete('W', dsid, wfile)
@@ -4224,6 +4225,7 @@ class DsArch(PgArch, PgMeta):
4224
4225
  bidx = chksize = reorder = scnt = dcnt = 0
4225
4226
  self.cache_group_info(self.ALLCNT, 0)
4226
4227
  self.validate_multiple_options(self.ALLCNT, ["ST", 'VI', 'QF', 'LC'])
4228
+ if 'QF' in self.params: self.params['QF'] = self.get_bid_numbers(self.params['QF'])
4227
4229
  if self.PGLOG['DSCHECK']:
4228
4230
  bidx = self.set_dscheck_fcount(self.ALLCNT, self.PGOPT['extlog'])
4229
4231
  if bidx > 0:
@@ -4260,7 +4262,7 @@ class DsArch(PgArch, PgMeta):
4260
4262
  continue
4261
4263
  bid = self.params['QF'][i] if 'QF' in self.params else pgrec['bid']
4262
4264
  if bid:
4263
- self.pglog(sfile + ": Saved file is Quasar backed up, add option -qf '' to force delete", self.PGOPT['errlog'])
4265
+ self.pglog(sfile + ": Saved file is Quasar backed up, add option -qf 0 to force delete", self.PGOPT['errlog'])
4264
4266
  continue
4265
4267
  if sdel:
4266
4268
  afile = self.get_saved_path(i, self.params['SF'][i], 1, type)
@@ -97,19 +97,23 @@ Only Web data files are placed under DOI/Version control. Saved data
97
97
  staged on disk for internal use or NCAR user access is not version-
98
98
  controlled and remains the responsibility of the dataset owner.
99
99
 
100
- This user guide is generated from this file. Opening a pull request that
101
- modifies it in the GitHub repository https://github.com/NCAR/rda-python-dsarch
102
- triggers an automated workflow that converts it into the RST source files,
103
- syncs the rda_python_dsarch version into the documentation, and opens a new
104
- pull request for review in the GitHub repository
100
+ The 'dsarch' user guide hosted on Read the Docs is generated from this
101
+ 'dsarch.usg' file. Opening a pull request that modifies this 'dsarch.usg'
102
+ file in the GitHub repository https://github.com/NCAR/rda-python-dsarch
103
+ triggers an automated workflow that converts the file into the RST source
104
+ files, syncs the rda_python_dsarch version into the documentation, and opens
105
+ a new pull request for review in the GitHub repository
105
106
  https://github.com/NCAR/gdex-docs-dsarch. Merging that pull request
106
- publishes the content as the 'latest' version at
107
+ publishes the user guide as the 'latest' version at
107
108
  https://gdex-docs-dsarch.readthedocs.io, and creating a GitHub release
108
109
  there publishes it as the 'stable' version.
109
110
 
110
- This document first covers general 'dsarch' usage, then describes each
111
- Action option in detail, followed by Mode and Information (Info for
112
- short) options. Examples are provided throughout each section.
111
+ The remainder of this document is organized as follows. Section 2 covers
112
+ general usage and conventions. Section 3 describes Action options grouped
113
+ by what they manipulate (dataset records, DOI/Version controls, groups,
114
+ files, all-information, and webpages). Section 4 lists Mode options that
115
+ modify how an action behaves. Section 5 lists Information options that
116
+ pass values into an action.
113
117
 
114
118
 
115
119
  2 GENERAL DSARCH USAGE
@@ -118,59 +122,85 @@ short) options. Examples are provided throughout each section.
118
122
  or
119
123
  dsarch [-(IF|InputFile)] InputFileNames
120
124
 
121
- Brackets [] indicate optional elements. A pipe '|' within parentheses,
122
- as in (A|B), means either A or B may be used. Options fall into three
123
- categories:
124
- Action options - specify the task to execute
125
- Mode options - modify how an action behaves
126
- Info options - supply values to the action
127
-
128
- Options may be given in short or long form (e.g., -DS or -Dataset). Some
129
- options have alias names; for example, -UseRDADB is an alias for -UD
130
- (-UseDSARCH). Option names are case-insensitive, but values following
131
- Info options are case-sensitive.
132
-
133
- Option -DS specifies the dataset number. It is listed separately because
134
- most actions require it. When -DS is the first argument after 'dsarch',
135
- the option name itself may be omitted — just supply the dataset number
136
- directly.
137
-
138
- Specify exactly one Action option per 'dsarch' invocation. Each action
139
- has its own set of required and optional Info options, and may accept
140
- specific Mode options that adjust its behavior.
141
-
142
- All options except -IF (-InputFile) may be given either on the command
143
- line or in input files. Input file names are specified via -IF and can
144
- only be supplied on the command line. See the -IF option description for
145
- details on how to format options in input files. One or more input files
146
- may be combined with command-line options. The -IF option name itself
147
- may be omitted when a single input file is given on the command line and
148
- all action and option information is contained within that file.
149
-
150
- Info options used with GET actions serve as query filters. Four special
151
- characters enable more precise filtering — they must be quoted or
152
- escaped on the command line to prevent shell interpretation:
153
- '!' - exclude matches; must appear immediately after the option name
154
- (may need escaping as '\!' in some shells due to history
155
- expansion)
156
- '<' - less-than comparison on the following value
157
- '>' - greater-than comparison on the following value
158
- '<>' - range between two values
159
-
160
- Combining '!' and '<' as "'!' '<' OptionValue" expresses a 'greater than
161
- or equal to OptionValue' condition.
162
-
163
- The description of an individual option is shown when 'dsarch' is run as
125
+ Notation:
126
+ [] - the enclosed element is optional.
127
+ (A|B) - either A or B may be used (a short form and a long form).
128
+ -<OPT> - OPT is an option name. Names are case-insensitive; values are not.
129
+
130
+ Every dsarch invocation has at most one Action option, which selects the
131
+ task to perform. Mode options change how the chosen action behaves. Info
132
+ options carry the data the action needs (file names, group indices, dates,
133
+ etc.). Each action documents which Info options are required and which are
134
+ optional.
135
+
136
+ Option -DS (-Dataset) supplies the dataset number. It is listed separately
137
+ because most actions require it. When -DS is the first argument after
138
+ 'dsarch', the option name itself may be omitted — just supply the dataset
139
+ number directly.
140
+
141
+ Many options have an alias for convenience; for example, -UseRDADB is an
142
+ alias for -UD (-UseDSARCH). Both short and long forms are accepted, and
143
+ aliases are noted with each option.
144
+
145
+ 2.1 Quick Start
146
+
147
+ Show the full document, paged through 'more':
148
+ dsarch
149
+
150
+ Show the description of a single option:
151
+ dsarch -h -AW
152
+
153
+ Retrieve a dataset record from GDEXDB:
154
+ dsarch d260001 -GD
155
+
156
+ Set the UseDSARCH flag so the dataset can be archived:
157
+ dsarch d260001 -SD -UD Y
158
+
159
+ Archive a local file as a Web file:
160
+ dsarch d260001 -AW -LF data.nc
161
+
162
+ Retrieve the Web file records for a dataset:
163
+ dsarch d260001 -GW
164
+
165
+ 2.2 Filters and Special Characters in Queries
166
+
167
+ For Get-style actions (-GD, -GV, -GG, -GS, -GW, -GH, -GQ), Info options are
168
+ interpreted as query filters. Four characters refine those filters; quote or
169
+ escape them on the command line so the shell does not consume them:
170
+
171
+ '!' - negate the match. Must appear immediately after the option name
172
+ (may need escaping as '\!' in some shells due to history expansion).
173
+ '<' - less-than comparison against the next value.
174
+ '>' - greater-than comparison against the next value.
175
+ '<>' - range between the next two values (inclusive).
176
+
177
+ The combination "'!' '<' value" expresses 'greater than or equal to value'.
178
+
179
+ 2.3 Input Files
180
+
181
+ Every option except -IF (-InputFile) may be supplied either on the command
182
+ line or in an input file. -IF is itself only valid on the command line. A
183
+ single dsarch invocation may combine command-line options with one or more
184
+ input files. If the only options are inside a single input file, the -IF
185
+ prefix may be omitted. See the description of -IF in Section 5.2 for the
186
+ input-file format (comments, action/mode markers, single-value assignments,
187
+ and tabular multi-value assignments, including delimiter overrides).
188
+
189
+ As a safeguard against operating on the wrong dataset, input file names must
190
+ begin with the dataset number in the format 'dNNNNNN.*', where '*' matches
191
+ one or more valid filename characters.
192
+
193
+ 2.4 Getting Help
164
194
 
165
195
  dsarch [Option] -(h|help) [Option]
166
196
 
167
- The description is shown for the option placed either before or after
168
- -(h|help). If no option is given, or 'dsarch' is run without arguments,
169
- the full document is displayed using the UNIX 'more' utility. A hard
170
- copy of this document can be printed from the saved file, dsarch.usg,
171
- in the rda_python_dsarch Python package.
197
+ The description of a single option is shown when -h (-help) is given with
198
+ that option, placed either before or after -h. With no option, or when
199
+ 'dsarch' is run without arguments, the full document is displayed through
200
+ the UNIX 'more' utility. A printable copy of this document is the file
201
+ dsarch.usg installed under the python package rda_python_dsarch.
172
202
 
173
- #The online version of this document is available at
203
+ #The online HTML version of this document is available at
174
204
  #https://gdex-docs-dsarch.readthedocs.io
175
205
 
176
206
 
@@ -2259,7 +2289,9 @@ They come in two forms:
2259
2289
  parent group for a subgroup. Groups can be nested to any depth.
2260
2290
 
2261
2291
  -QF or -QuasarFile, the name of the Quasar backup (tar) file,
2262
- required for -AQ (-ArchiveQuasarFile).
2292
+ required for -AQ (-ArchiveQuasarFile). Give -QF 0 with -DL
2293
+ (-DeleteFile) to force delete a Web or Saved file that is Quasar
2294
+ backed up.
2263
2295
 
2264
2296
  -QT or -QuasarFileType (Alias: -QuasarType|-BackupType), the
2265
2297
  backup scope: 'B' (backup only) or 'D' (backup plus disaster
@@ -192,7 +192,7 @@ class PgArch(PgOPT, PgCMD, PgSplit):
192
192
  'OG' : [2, 'OriginGroup', 1],
193
193
  'OT' : [2, 'OriginType', 1],
194
194
  'PI' : [2, 'ParentIndex', 17],
195
- 'QF' : [2, 'QuasarFile', 0],
195
+ 'QF' : [2, 'QuasarFile', 0, ''],
196
196
  'QT' : [2, 'QuasarFileType', 129, 'BD'],
197
197
  'RF' : [2, 'OriginFile', 0],
198
198
  'SF' : [2, 'SavedFile', 0],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 3.0.2
3
+ Version: 3.0.5
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
@@ -0,0 +1,14 @@
1
+ rda_python_dsarch/PgArch.py,sha256=ejk31T2F2AONR7ZF3fzRJjlqZZsVnQzyE_Gjo9XvyVM,59456
2
+ rda_python_dsarch/PgMeta.py,sha256=FV4GytgnJK00FUlyM6iHqpNd7-XTVHO1j5tZtcLTWgY,26845
3
+ rda_python_dsarch/__init__.py,sha256=-ympZMoYfvP0lxSq06GWQemQlj4HwV9tm1JNxKpSU90,812
4
+ rda_python_dsarch/ds_arch.py,sha256=PgS5wb4vTXJUBm7ADetCbm-eVYLqPVzQdiFEfe3QEns,233992
5
+ rda_python_dsarch/dsarch.py,sha256=socETNVY5DamCtxxjm__zNpd6nn2nmvbvgDIaib2_ac,255283
6
+ rda_python_dsarch/dsarch.usg,sha256=HNB9NFEkwi_EUsMjyN-hvpAao1DNtJ6WDXkgBax8imA,107740
7
+ rda_python_dsarch/pg_arch.py,sha256=3Dg_39o92o-9lzPaij-BjTJTrwNPepf9n5jkVNRHuj0,81061
8
+ rda_python_dsarch/pg_meta.py,sha256=FFEkphGAT--66zvMNDPfiFG4nZQpXed_yVGMARdZb-o,46981
9
+ rda_python_dsarch-3.0.5.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
10
+ rda_python_dsarch-3.0.5.dist-info/METADATA,sha256=ZXay9bDWIMzzKSdnSjMc0Kjny5JjIlyt80n9DF4IFMw,7165
11
+ rda_python_dsarch-3.0.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
+ rda_python_dsarch-3.0.5.dist-info/entry_points.txt,sha256=BA1iRAFIZExG0656Ri9f-_OKlSK31CuABWPQSsA9MsI,64
13
+ rda_python_dsarch-3.0.5.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
14
+ rda_python_dsarch-3.0.5.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- rda_python_dsarch/PgArch.py,sha256=d1Y87MT49tgQygLAffNff9Qs4c12KXspYyDG8liSnpQ,59452
2
- rda_python_dsarch/PgMeta.py,sha256=FV4GytgnJK00FUlyM6iHqpNd7-XTVHO1j5tZtcLTWgY,26845
3
- rda_python_dsarch/__init__.py,sha256=Y-s3WV6vKvLYuMy6oy0FB9DYNVaiEaSjZVJYBMVlD_8,812
4
- rda_python_dsarch/ds_arch.py,sha256=6bR0y6_rhIXyvbuYd-oZfL1YcaHhWBkojjzYz1yCrVg,233810
5
- rda_python_dsarch/dsarch.py,sha256=wQZS-mI4vyc7GDKOMl--_wQejx4_Wa77hegF_9deZX8,255105
6
- rda_python_dsarch/dsarch.usg,sha256=VWNqPYiALbglTWpQ0eWSE6TpVSjl8Xzl6MjoWZPTSAs,106715
7
- rda_python_dsarch/pg_arch.py,sha256=0mZGlQT9ecJr-92dloXDNtwF8EnPnY76IGLksqYsyYo,81057
8
- rda_python_dsarch/pg_meta.py,sha256=FFEkphGAT--66zvMNDPfiFG4nZQpXed_yVGMARdZb-o,46981
9
- rda_python_dsarch-3.0.2.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
10
- rda_python_dsarch-3.0.2.dist-info/METADATA,sha256=M64SImUspzEEA1GPDt1PbeAk7xdDkzFiioCe6t6rti0,7165
11
- rda_python_dsarch-3.0.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
- rda_python_dsarch-3.0.2.dist-info/entry_points.txt,sha256=BA1iRAFIZExG0656Ri9f-_OKlSK31CuABWPQSsA9MsI,64
13
- rda_python_dsarch-3.0.2.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
14
- rda_python_dsarch-3.0.2.dist-info/RECORD,,