rda-python-dsarch 3.0.3__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)
@@ -108,9 +108,12 @@ publishes the user guide as the 'latest' version at
108
108
  https://gdex-docs-dsarch.readthedocs.io, and creating a GitHub release
109
109
  there publishes it as the 'stable' version.
110
110
 
111
- This document first covers general 'dsarch' usage, then describes each
112
- Action option in detail, followed by Mode and Information (Info for
113
- 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.
114
117
 
115
118
 
116
119
  2 GENERAL DSARCH USAGE
@@ -119,59 +122,85 @@ short) options. Examples are provided throughout each section.
119
122
  or
120
123
  dsarch [-(IF|InputFile)] InputFileNames
121
124
 
122
- Brackets [] indicate optional elements. A pipe '|' within parentheses,
123
- as in (A|B), means either A or B may be used. Options fall into three
124
- categories:
125
- Action options - specify the task to execute
126
- Mode options - modify how an action behaves
127
- Info options - supply values to the action
128
-
129
- Options may be given in short or long form (e.g., -DS or -Dataset). Some
130
- options have alias names; for example, -UseRDADB is an alias for -UD
131
- (-UseDSARCH). Option names are case-insensitive, but values following
132
- Info options are case-sensitive.
133
-
134
- Option -DS specifies the dataset number. It is listed separately because
135
- most actions require it. When -DS is the first argument after 'dsarch',
136
- the option name itself may be omitted — just supply the dataset number
137
- directly.
138
-
139
- Specify exactly one Action option per 'dsarch' invocation. Each action
140
- has its own set of required and optional Info options, and may accept
141
- specific Mode options that adjust its behavior.
142
-
143
- All options except -IF (-InputFile) may be given either on the command
144
- line or in input files. Input file names are specified via -IF and can
145
- only be supplied on the command line. See the -IF option description for
146
- details on how to format options in input files. One or more input files
147
- may be combined with command-line options. The -IF option name itself
148
- may be omitted when a single input file is given on the command line and
149
- all action and option information is contained within that file.
150
-
151
- Info options used with GET actions serve as query filters. Four special
152
- characters enable more precise filtering — they must be quoted or
153
- escaped on the command line to prevent shell interpretation:
154
- '!' - exclude matches; must appear immediately after the option name
155
- (may need escaping as '\!' in some shells due to history
156
- expansion)
157
- '<' - less-than comparison on the following value
158
- '>' - greater-than comparison on the following value
159
- '<>' - range between two values
160
-
161
- Combining '!' and '<' as "'!' '<' OptionValue" expresses a 'greater than
162
- or equal to OptionValue' condition.
163
-
164
- 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
165
194
 
166
195
  dsarch [Option] -(h|help) [Option]
167
196
 
168
- The description is shown for the option placed either before or after
169
- -(h|help). If no option is given, or 'dsarch' is run without arguments,
170
- the full document is displayed using the UNIX 'more' utility. A hard
171
- copy of this document can be printed from the saved file, dsarch.usg,
172
- 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.
173
202
 
174
- #The online version of this document is available at
203
+ #The online HTML version of this document is available at
175
204
  #https://gdex-docs-dsarch.readthedocs.io
176
205
 
177
206
 
@@ -2260,7 +2289,9 @@ They come in two forms:
2260
2289
  parent group for a subgroup. Groups can be nested to any depth.
2261
2290
 
2262
2291
  -QF or -QuasarFile, the name of the Quasar backup (tar) file,
2263
- 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.
2264
2295
 
2265
2296
  -QT or -QuasarFileType (Alias: -QuasarType|-BackupType), the
2266
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.3
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=GBjaGaXFislaJO-s8lxcNdddJ7A5NUNreT2xgiP-Emg,106789
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.3.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
10
- rda_python_dsarch-3.0.3.dist-info/METADATA,sha256=eXobD0DFxXfPHuneCSPb_uEKSJZYzZUMPtnbyKMdwtY,7165
11
- rda_python_dsarch-3.0.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
- rda_python_dsarch-3.0.3.dist-info/entry_points.txt,sha256=BA1iRAFIZExG0656Ri9f-_OKlSK31CuABWPQSsA9MsI,64
13
- rda_python_dsarch-3.0.3.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
14
- rda_python_dsarch-3.0.3.dist-info/RECORD,,