rda-python-metrics 1.0.16__py3-none-any.whl → 1.0.18__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-metrics might be problematic. Click here for more details.

@@ -22,18 +22,18 @@ from rda_python_common import PgDBI
22
22
  from . import PgView
23
23
 
24
24
  VUSG = {
25
- 'SNMS' : "ABCDEFGHMNOPQRSTUVWY", # all available short field names in FLDS
26
- 'OPTS' : 'AabcCdDeEfghHImnLMNoOqsStTUvVwyz', # all available options, used for params
27
- 'NOPT' : 'abhwz', # stand alone option without inputs
28
- 'ACND' : 'cdefgmMoqStvy', # available array condition options
29
- 'RCND' : 'DsNT', # available range condition options
30
- 'CNDS' : 'acdDeEfgmMnNoqsStTvVy', # condition options, ACND, RCND and 'a'
31
- 'HCND' : 'N', # condition options for having clause
32
- 'ECND' : 'my', # condition options need evaluating
33
- 'TCND' : 'dDmy', # temporal condition options
34
- 'SFLD' : 'DEFGNOPTVW', # string fields, to be quoted in condition
35
- 'UFLD' : 'GNOVW', # string fields must be in upper case
36
- 'LFLD' : 'EPT' # string fields must be in lower case
25
+ 'SNMS' : "ABCDEFGHKMNOPQRSTUVWY", # all available short field names in FLDS
26
+ 'OPTS' : 'AabcCdDeEfghHIkmnLMNoOqsStTUvVwyz', # all available options, used for params
27
+ 'NOPT' : 'abhwz', # stand alone option without inputs
28
+ 'ACND' : 'cdefgkmMoqStvy', # available array condition options
29
+ 'RCND' : 'DsNT', # available range condition options
30
+ 'CNDS' : 'acdDeEfgkmMnNoqsStTvVy', # condition options, ACND, RCND and 'a'
31
+ 'HCND' : 'N', # condition options for having clause
32
+ 'ECND' : 'my', # condition options need evaluating
33
+ 'TCND' : 'dDmy', # temporal condition options
34
+ 'SFLD' : 'DEFGKNOPTVW', # string fields, to be quoted in condition
35
+ 'UFLD' : 'GNOVW', # string fields must be in upper case
36
+ 'LFLD' : 'EPT' # string fields must be in lower case
37
37
  }
38
38
 
39
39
  # keys FLDS - short field names
@@ -52,6 +52,7 @@ FLDS = {
52
52
  'F' : ['FORMAT', "data_format", 'data_format', 'dataset', 0, 0, 'G'],
53
53
  'M' : ['MONTH', PgDBI.fmtym("date"), 'date', 'allusage', 7, 0, 'G'],
54
54
  'N' : ['COUNTRY', "country", 'country', 'allusage', 0, 0, 'G'],
55
+ 'K' : ['REGION', "region", 'region', 'allusage', 0, 0, 'G'],
55
56
  'G' : ['GROUP', "source", 'source', 'allusage', 0, 0, 'G'],
56
57
  'O' : ['ORGTYPE', "org_type", 'org_type', 'allusage', 7, 0, 'G'],
57
58
  'P' : ['DSOWNER', "specialist", 'specialist', 'dsowner', 8, 0, 'G'],
@@ -82,10 +83,10 @@ EXPAND = {
82
83
  'Q' : ["TIME", "dDmy"],
83
84
  'Y' : ["TIME", "dDmy"],
84
85
 
85
- 'E' : ["USER", "ecgo", "email", "wuser", "user"],
86
- 'O' : ["USER", "ecgo", "org_type", "wuser", "user"],
87
- 'N' : ["USER", "ecgo", "country", "wuser", "user"],
88
- 'G' : ["USER", "ecgo", "region", "wuser", "user"],
86
+ 'E' : ["USER", "ecko", "email", "wuser", "user"],
87
+ 'O' : ["USER", "ecko", "org_type", "wuser", "user"],
88
+ 'N' : ["USER", "ecko", "country", "wuser", "user"],
89
+ 'K' : ["USER", "ecko", "region", "wuser", "user"],
89
90
 
90
91
  'R' : ["DSID", "fFsStT", "search.datasets.title", "search.datasets"],
91
92
  'T' : ["DSID", "fFsStT", "dataset.dsid", "dataset"],
@@ -109,6 +110,7 @@ EXPAND = {
109
110
  # h -- for give emails, include their histical emails registered before
110
111
  # H -- a string of report title to replace the default one
111
112
  # I -- use given email IDs for email notice of data update
113
+ # k -- array of specified region names
112
114
  # L -- column delimiter for output
113
115
  # m -- array of specified months
114
116
  # M -- array of specified download methods
@@ -131,8 +133,9 @@ params = {}
131
133
  # relationship between parameter options and short field names, A option is not
132
134
  # related to a field name if it is not in keys SNS
133
135
  SNS = {
134
- 'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'f' : 'F', 'g' : 'G', 'm' : 'M', 'M' : 'W', 'N' : 'H',
135
- 'o' : 'O', 'q' : 'Q', 's' : 'S', 'S' : 'P', 't' : 'T', 'T' : 'T', 'u' : 'U', 'v' : 'V', 'V' : 'V', 'y' : 'Y'
136
+ 'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'f' : 'F', 'g' : 'G', 'm' : 'M',
137
+ 'M' : 'W', 'N' : 'H', 'k' : 'K', 'o' : 'O', 'q' : 'Q', 's' : 'S', 'S' : 'P',
138
+ 't' : 'T', 'T' : 'T', 'u' : 'U', 'v' : 'V', 'V' : 'V', 'y' : 'Y'
136
139
  }
137
140
 
138
141
  tablenames = fieldnames = condition = ''
@@ -6,10 +6,9 @@
6
6
  [-A RowLimit] [-c CountryCodes] [-d DateList] \
7
7
  [-D StartDate [EndDate]] [-e EMailList] -h \
8
8
  [-E StartNoticeDate [EndNoticeDate]] [-f DataFormats] \
9
- [-g SourceGroups] [-I EmailIDList] [-m MonthList] \
10
- [-M MethodList] [-N MinNumberRead [MaxNumberRead]] \
11
- [-o OrganizationTypes] \
12
- [-q QuaterList] [-s MinSize [MaxSize]] \
9
+ [-g SourceGroups] [-I EmailIDList] [-k RegionLost] \
10
+ [-m MonthList] [-M MethodList] [-N MinNumberRead [MaxNumberRead]] \
11
+ [-o OrganizationTypes] [-q QuaterList] [-s MinSize [MaxSize]] \
13
12
  [-S SpecialistLoginNames] [-t DatasetList] \
14
13
  [-T MinDataset [MaxDataset]] [-y YearList] \
15
14
  [-v IPAddressList] [-V MinIPAddress [MaxIPAddress]] \
@@ -18,7 +17,7 @@
18
17
 
19
18
  Specify [-C] ColumnNames, refer to Option -C section for detail
20
19
  description, and choose at least one of the condition options, -a, -c,
21
- -d, -D, -e, -E, -f, -g, -I, -m, -M, -N, -o, -q, -s, -S -t, -T, -v, -V
20
+ -d, -D, -e, -E, -f, -g, -I, -k, -m, -M, -N, -o, -q, -s, -S -t, -T, -v, -V
22
21
  and -y, to run this application.
23
22
 
24
23
  For all condition options, except option -a, an '!' sign can be added
@@ -28,10 +27,10 @@
28
27
  OrganizationTypes. Refer to the example given at the end of this help
29
28
  document for how to select excluding condition.
30
29
 
31
- String condition options, -c, -e, -f, -g, -M, -o, -S, -t and -v, allow wildcard
32
- inputs. '%' matches any number of characters and '_' matches any one
33
- character. Refer to the example given at the end of this help document
34
- for how to use wildcard for string condition options.
30
+ String condition options, -c, -e, -f, -g, -k, -M, -o, -S, -t and -v, allow
31
+ wildcard inputs. '%' matches any number of characters and '_' matches
32
+ any one character. Refer to the example given at the end of this help
33
+ document for how to use wildcard for string condition options.
35
34
 
36
35
  Output of this application is defaulted to page format with a page
37
36
  header on each page. A page header includes main title, sub titles and
@@ -55,6 +54,7 @@
55
54
  F*- FORMAT - dataset default data format
56
55
  G*- GROUP - data usage source group: W - Web log, G - Globus,
57
56
  T - Thredds, O - Order, and A - AWS log
57
+ K*- REGION - Region Name users from
58
58
  M*- MONTH - format as YYYY-MM, for example 2004-04
59
59
  N*- COUNTRY - country codes users from
60
60
  O*- ORGTYPE - organization types (DSS, NCAR, UNIV and OTHER)
@@ -64,7 +64,20 @@
64
64
  S - BSIZE - size of data read each time, default to Bytes
65
65
  T*- DATASET - format as dsnnn.n, for example d540001
66
66
  V*- IPADDRESS - format as n.n.n.n (n = 0 - 999)
67
- W*- METHOD - method of data transfer (FTP, Tape, etc.)
67
+ W*- METHOD - method of data transfer:
68
+ AIOBT - aiobotocore on AWS
69
+ CDG - CDG data metrics gathered from GDEX
70
+ CURL - curl
71
+ GLOB - Globus
72
+ OSDF - OSDF downloads
73
+ PYTHON - python
74
+ R-C - Customized requests
75
+ RCLON - rclone on AWS
76
+ R-S - Subset Requests
77
+ R-T - Subset+Format Conversion requests
78
+ TDS - RDA THREDDS server
79
+ WEB - General Web downloads
80
+ WGET - wget
68
81
  Y*- YEAR - format as YYYY, for example 2004
69
82
 
70
83
  * - field names can processed with zero usages
@@ -127,6 +140,8 @@
127
140
  - Option -h, works with Option -e to include historical user emails
128
141
  registered before;
129
142
 
143
+ - Option -k, for data read by users from given region names;
144
+
130
145
  - Option -m, for data read in given months, in format YYYY-MM;
131
146
 
132
147
  - Option -M, for data read via given medium methods;
@@ -22,16 +22,16 @@ from rda_python_common import PgDBI
22
22
  from . import PgView
23
23
 
24
24
  VUSG = {
25
- 'SNMS' : "ABCDEGHIJMNOPQRSTUVY", # cod available short field names in FLDS
26
- 'OPTS' : 'AabcCdDeEghHiLmnoOqStTUwyz', # cod available options, used for params
27
- 'NOPT' : 'abhwz', # stand alone option without inputs
28
- 'ACND' : 'cdegiImoqSty', # available array condition options
29
- 'RCND' : 'DET', # available range condition options
30
- 'CNDS' : 'acdDeEgiImMnoqStTy', # condition options, ACND, RCND and 'a'
31
- 'ECND' : 'my', # condition options need evaluating
32
- 'SFLD' : 'DEGINOTU', # string fields, to be quoted in condition
33
- 'UFLD' : 'NO', # string fields must be in upper case
34
- 'LFLD' : 'EMPT' # string fields must be in lower case
25
+ 'SNMS' : "ABCDEGHIJKMNOPQRSTUVY", # cod available short field names in FLDS
26
+ 'OPTS' : 'AabcCdDeEghHikLmnoOqStTUwyz', # cod available options, used for params
27
+ 'NOPT' : 'abhwz', # stand alone option without inputs
28
+ 'ACND' : 'cdegiIkmoqSty', # available array condition options
29
+ 'RCND' : 'DET', # available range condition options
30
+ 'CNDS' : 'acdDeEgiIkmMnoqStTy', # condition options, ACND, RCND and 'a'
31
+ 'ECND' : 'my', # condition options need evaluating
32
+ 'SFLD' : 'DEGIKNOTU', # string fields, to be quoted in condition
33
+ 'UFLD' : 'NO', # string fields must be in upper case
34
+ 'LFLD' : 'EMPT' # string fields must be in lower case
35
35
  }
36
36
 
37
37
  # keys FLDS - short field names
@@ -51,6 +51,7 @@ FLDS = {
51
51
  'I' : ['IP', "ip", 'ip', 'codusage', 0, 0, 'G'],
52
52
  'M' : ['MONTH', PgDBI.fmtym("date"), 'date', 'codusage', 7, 0, 'G'],
53
53
  'N' : ['COUNTRY', "country", 'country', 'codusage', 0, 0, 'G'],
54
+ 'K' : ['REGION', "region", 'region', 'codusage', 0, 0, 'G'],
54
55
  'O' : ['ORGTYPE', "org_type", 'org_type', 'codusage', 7, 0, 'G'],
55
56
  'P' : ['DSOWNER', "specialist", 'specialist', 'dsowner', 8, 0, 'G'],
56
57
  'Q' : ['QUARTER', "quarter", 'quarter', 'codusage', 7, 0, 'G'],
@@ -80,9 +81,10 @@ EXPAND = {
80
81
  'Q' : ["TIME", "dDmy"],
81
82
  'Y' : ["TIME", "dDmy"],
82
83
 
83
- 'E' : ["USER", "eco", "email", "wuser", "user"],
84
- 'O' : ["USER", "eco", "org_type", "wuser", "user"],
85
- 'N' : ["USER", "eco", "country", "wuser", "user"],
84
+ 'E' : ["USER", "ecko", "email", "wuser", "user"],
85
+ 'O' : ["USER", "ecko", "org_type", "wuser", "user"],
86
+ 'N' : ["USER", "ecko", "country", "wuser", "user"],
87
+ 'K' : ["USER", "ecko", "region", "wuser", "user"],
86
88
 
87
89
  'R' : ["DSID", "fFsStT", "search.datasets.title", "search.datasets"],
88
90
  'T' : ["DSID", "fFsStT", "dataset.dsid", "dataset"],
@@ -103,6 +105,7 @@ EXPAND = {
103
105
  # H -- a string of report title to replace the default one
104
106
  # i -- array of specified IP addresses
105
107
  # I -- use given email IDs for email notice of data update
108
+ # k -- array of specified region names
106
109
  # L -- column delimiter for output
107
110
  # m -- array of specified months
108
111
  # o -- array of specified orginization types
@@ -121,8 +124,8 @@ params = {}
121
124
  # relationship between parameter options and short field names, A option is not
122
125
  # related to a field name if it is not in keys SNS
123
126
  SNS = {
124
- 'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'g' : 'G', 'i' : 'I', 'm' : 'M',
125
- 'o' : 'O', 'q' : 'Q', 'S' : 'P', 't' : 'T', 'T' : 'T', 'y' : 'Y'
127
+ 'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'g' : 'G', 'i' : 'I', 'k' : 'K',
128
+ 'm' : 'M', 'o' : 'O', 'q' : 'Q', 'S' : 'P', 't' : 'T', 'T' : 'T', 'y' : 'Y'
126
129
  }
127
130
 
128
131
  tablenames = fieldnames = condition = ''
@@ -7,7 +7,7 @@
7
7
  [-D StartDate [EndDate]] [-e EMailList] -h \
8
8
  [-E StartNoticeDate [EndNoticeDate]] \
9
9
  [-g AggregationIDs] [-i IPAddresses] \
10
- [-I EmailIDList] [-m MonthList] \
10
+ [-I EmailIDList] [-k RegionNames] [-m MonthList] \
11
11
  [-N MinNumberRead [MaxNumberRead]] \
12
12
  [-o OrganizationTypes] [-q QuaterList] \
13
13
  [-S SpecialistLoginNames] [-t DatasetList] \
@@ -17,7 +17,7 @@
17
17
 
18
18
  Specify [-C] ColumnNames, refer to Option -C section for detail
19
19
  description, and choose at least one of the condition options, -a, -c,
20
- -d, -D, -e, -E, -g, -i, -I, -m, -N, -o, -q, -S -t, -T, and -y, to
20
+ -d, -D, -e, -E, -g, -i, -I, -k, -m, -N, -o, -q, -S -t, -T, and -y, to
21
21
  run this application.
22
22
 
23
23
  For all condition options, except option -a, an '!' sign can be added
@@ -27,7 +27,7 @@
27
27
  OrganizationTypes. Refer to the example given at the end of this help
28
28
  document for how to select excluding condition.
29
29
 
30
- String condition options, -c, -e, -g, -i, -o, -S, and -t, allow wildcard
30
+ String condition options, -c, -e, -g, -i, -k, -o, -S, and -t, allow wildcard
31
31
  inputs. '%' matches any number of characters and '_' matches any one
32
32
  character. Refer to the example given at the end of this help document
33
33
  for how to use wildcard for string condition options.
@@ -55,6 +55,7 @@
55
55
  I*- IP - user IP address
56
56
  M*- MONTH - format as YYYY-MM, for example 2004-04
57
57
  N*- COUNTRY - country codes users from
58
+ K*- REGION - region names users from
58
59
  O*- ORGTYPE - organization types (DSS, NCAR, UNIV and OTHER)
59
60
  P*- DSOWNER - login names of specialists who own the datasets
60
61
  Q*- QUARTER - quarter of year, 1, 2, 3, or 4
@@ -122,6 +123,8 @@
122
123
 
123
124
  - Option -i, for data read from machines with given IP addresses;
124
125
 
126
+ - Option -k, for files read by users from given region names;
127
+
125
128
  - Option -m, for data read in given months, in format YYYY-MM;
126
129
 
127
130
  - Option -N, for files for numbers of read by each group between
@@ -22,14 +22,14 @@ from rda_python_common import PgDBI
22
22
 
23
23
  VUSG = {
24
24
  'SNMS' : "ABCDEFGHIJKLMNOPQRSTVWYZ", # all available short field names in FLDS
25
- 'OPTS' : 'AabcCdDeEghHijlLmMnNoOpqsStTUvwyz', # all available options, used for %params
25
+ 'OPTS' : 'AabcCdDeEghHijklLmMnNoOqsStTUvwyz', # all available options, used for %params
26
26
  'NOPT' : 'abhwz', # stand alone option without inputs
27
- 'ACND' : 'cdegijlmMnopqStvy', # available array condition options
27
+ 'ACND' : 'cdegijlkmMnoqStvy', # available array condition options
28
28
  'RCND' : 'DsNT', # available range condition options
29
- 'CNDS' : 'acdDegijlmMnNopqsStTvy', # condition options, ACND, RCND and 'a'
29
+ 'CNDS' : 'acdDegijlkmMnNoqsStTvy', # condition options, ACND, RCND and 'a'
30
30
  'HCND' : 'N', # condition options for having clause
31
31
  'ECND' : 'my', # condition options need evaluating
32
- 'SFLD' : 'DEGIJLNOPTVW', # string fields, to be quoted in condition
32
+ 'SFLD' : 'DEGIJKLNOPTVW', # string fields, to be quoted in condition
33
33
  'UFLD' : 'ILNOW', # string fields must be in upper case
34
34
  'LFLD' : 'ETP' # string fields must be in lower case
35
35
  }
@@ -50,10 +50,10 @@ FLDS = {
50
50
  'G' : ['ORGNAME', "org_name", 'org_name', 'wuser', 0, 0, 'G'],
51
51
  'I' : ['FIRSTNAME', "fstname", 'fstname', 'wuser', 0, 0, 'G'],
52
52
  'J' : ['PROJECT', "project", 'project', 'ousage', 7, 0, 'G'],
53
- 'K' : ['PAYMENT', "pay_method", 'pay_method', 'ousage', 0, 0, 'G'],
54
53
  'L' : ['LASTNAME', "lstname", 'lstname', 'wuser', 0, 0, 'G'],
55
54
  'M' : ['MONTH', PgDBI.fmtym("date_request"), 'date_request','ousage', 7, 0, 'G'],
56
55
  'N' : ['COUNTRY', "country", 'country', 'wuser', 0, 0, 'G'],
56
+ 'K' : ['REGION', "region", 'region', 'wuser', 0, 0, 'G'],
57
57
  'O' : ['ORGTYPE', "org_type", 'org_type', 'wuser', 5, 0, 'G'],
58
58
  'P' : ['PROCESSBY', "dss_uname", 'dss_uname', 'ousage', 9, 0, 'G'],
59
59
  'Q' : ['QUARTER', "quarter", 'quarter', 'ousage', 7, 0, 'G'],
@@ -90,6 +90,7 @@ EXPAND = {
90
90
  'G' : ["USER", "eilgco", "org_name", "wuser"],
91
91
  'O' : ["USER", "eilgco", "org_type", "wuser"],
92
92
  'N' : ["USER", "eilgco", "country", "wuser"],
93
+ 'K' : ["USER", "eilgcko", "region", "wuser"],
93
94
 
94
95
  'T' : ["DSID", "fFsStT", "dataset.dsid", "dataset"],
95
96
  'R' : ["DSID", "fFsStT", "search.datasets.title", "search.datasets"],
@@ -114,6 +115,7 @@ EXPAND = {
114
115
  # H -- a string of report title to replace the default one
115
116
  # i -- array of specified first names
116
117
  # j -- array of specified projects
118
+ # k -- array of specified regions
117
119
  # l -- array of specified last names
118
120
  # L -- column delimiter for output
119
121
  # m -- array of specified months
@@ -122,7 +124,6 @@ EXPAND = {
122
124
  # N -- number request range, arrage of 1 or 2 integers
123
125
  # o -- array of specified orginization types
124
126
  # O -- a string of short field names for sorting on
125
- # p -- array of specified payment methods
126
127
  # s -- output data size range, arrage of 1 or 2 sizes in unit of MByte
127
128
  # S -- array of login names of specialists who processed the orders
128
129
  # t -- array of specified dataset names
@@ -138,7 +139,7 @@ params = {}
138
139
  # related to a field name if it is not in keys %SNS
139
140
  SNS = {
140
141
  'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'g' : 'G', 'i' : 'I', 'j' : 'J',
141
- 'l' : 'L', 'm' : 'M', 'M' : 'W', 'n' : 'V', 'N' : 'H', 'o' : 'O', 'p' : 'K',
142
+ 'k' : 'K', 'l' : 'L', 'm' : 'M', 'M' : 'W', 'n' : 'V', 'N' : 'H', 'o' : 'O',
142
143
  'q' : 'Q', 's' : 'S', 'S' : 'P', 't' : 'T', 'T' : 'T', 'y' : 'Y'
143
144
  }
144
145
 
@@ -6,11 +6,10 @@
6
6
  [-A RowLimit] [-c CountryCodes] [-d DataRequestDates] \
7
7
  [-D StartRquestDate [EndRequestDate]] \
8
8
  [-e EMailList] -h [-E StartNoticeDate [EndNoticeDate]] \
9
- [-g OrganizationNames] \
10
- [-i FirstNamelist] [-j Projects] [-l LastNameList] \
9
+ [-g OrganizationNames] [-i FirstNamelist] [-j Projects] \
10
+ [-k Region Names] [-l LastNameList] \
11
11
  [-m MonthList] [-M MethodList] [-n OrderNumberList] \
12
- [-o OrganizationTypes] [-p PaymentMethods] \
13
- [-s MinInputSize [MaxInputSize]] \
12
+ [-o OrganizationTypes] [-s MinInputSize [MaxInputSize]] \
14
13
  [-S SpecialistLoginNames] [-t DatasetList] \
15
14
  [-T MinDataset [MaxDataset]] [-u ProcessSpecialists] \
16
15
  [-v OrderNumbers] [-y YearList] \
@@ -19,7 +18,7 @@
19
18
 
20
19
  Specify [-C] ColumnNames, refer to Option -C section for detail
21
20
  description, and choose at least one of the condition options, -a, -c,
22
- -d, -D, -e, -g, -i, -j, -l, -m, -M, -N, -n, -o, -p, -s, -S, -t, -T, -u
21
+ -d, -D, -e, -g, -i, -j, -k, -l, -m, -M, -N, -n, -o, -s, -S, -t, -T, -u
23
22
  -v and -y, to run this application.
24
23
 
25
24
  For all condition options, except option -a, an '!' sign can be added
@@ -29,7 +28,7 @@
29
28
  OrganizationList. Refer to the example given at the end of this help
30
29
  document for how to select excluding condition.
31
30
 
32
- String condition options, -c, -e, -g, -i, -j, -l, -n, -o, -p, -S, -t, -u
31
+ String condition options, -c, -e, -g, -i, -j, -k, -l, -n, -o, -S, -t, -u
33
32
  and -v, allow wildcard inputs. '%' matches any number of characters and '_'
34
33
  matches any one character. Refer to the example given at the end of
35
34
  this help document for how to use wildcard for string condition options.
@@ -56,13 +55,13 @@
56
55
  G*- ORGNAME - organization name
57
56
  I*- FIRSTNAME - user first name
58
57
  J - PROJECT - project id, i.e, icoads, era40, tigge
59
- K - PAYMENT - payment methods (free, invce, etc.)
60
58
  L*- LASTNAME - user last name
61
59
  M*- MONTH - format as YYYY-MM, for example 2004-04
62
60
  N*- ORDERNO - order number
63
61
  O*- ORGTYPE - organization types (DSS, NCAR, UNIV and OTHER)
64
62
  P - PROCESSBY - specialist login names who own the orders
65
63
  Q*- COUNTRY - user country names
64
+ K - REGION - user region names
66
65
  R*- DSTITLE - dataset titles
67
66
  S*- OUTSIZE - requested data size in MB
68
67
  T*- DATASET - format as dsnnn.n, for example d540001
@@ -132,6 +131,8 @@
132
131
 
133
132
  - Option -j, for order data requested for specified projects;
134
133
 
134
+ - Option -k, for order data requested by users from given regions;
135
+
135
136
  - Option -l, for order data requested by users with given last names;
136
137
 
137
138
  - Option -m, for data requested in given months, in format YYYY-MM;
@@ -148,8 +149,6 @@
148
149
  types. It defaults to -o ! DSS to exclude usage from DSS specialists;
149
150
  Set it to ALL to include all orgnization types;
150
151
 
151
- - Option -p, for order data via given payment methods;
152
-
153
152
  - Option -s, for output data with sizes, in unit of MByte, between
154
153
  MinInputSize and MaxInputSize. Omit MaxInputSize for no upper limit;
155
154
 
@@ -22,16 +22,16 @@ from rda_python_common import PgDBI
22
22
  from . import PgView
23
23
 
24
24
  VUSG = {
25
- 'SNMS' : "ABCDEFHIMNOPQRSTUWY", # all available short field names in %FLDS
26
- 'OPTS' : 'AabcCdDeEfhHiLmMnoOqsStTUwyz', # all available options, used for %params
27
- 'NOPT' : 'abhnwz', # stand alone option without inputs
28
- 'ACND' : 'cdefiImMoqSty', # available array condition options
29
- 'RCND' : 'DEsT', # available range condition options
30
- 'CNDS' : 'acdDeEfiImMnoqsStTy', # condition options, ACND, RCND and 'a'
31
- 'ECND' : 'my', # condition options need evaluating
32
- 'SFLD' : 'DEFINOTUW', # string fields, to be quoted in condition
33
- 'UFLD' : 'FNO', # string fields must be in upper case
34
- 'LFLD' : 'EMPT' # string fields must be in lower case
25
+ 'SNMS' : "ABCDEFHIKMNOPQRSTUWY", # all available short field names in %FLDS
26
+ 'OPTS' : 'AabcCdDeEfhHikLmMnoOqsStTUwyz', # all available options, used for %params
27
+ 'NOPT' : 'abhnwz', # stand alone option without inputs
28
+ 'ACND' : 'cdefiIkmMoqSty', # available array condition options
29
+ 'RCND' : 'DEsT', # available range condition options
30
+ 'CNDS' : 'acdDeEfiIkmMnoqsStTy', # condition options, ACND, RCND and 'a'
31
+ 'ECND' : 'my', # condition options need evaluating
32
+ 'SFLD' : 'DEFIKNOTUW', # string fields, to be quoted in condition
33
+ 'UFLD' : 'FNO', # string fields must be in upper case
34
+ 'LFLD' : 'EMPT' # string fields must be in lower case
35
35
  }
36
36
 
37
37
  # keys %FLDS - short field names
@@ -51,6 +51,7 @@ FLDS = {
51
51
  'I' : ['IP', "ip", 'ip', 'tdsusage', 0, 0, 'G'],
52
52
  'M' : ['MONTH', PgDBI.fmtym("date"), 'date', 'tdsusage', 7, 0, 'G'],
53
53
  'N' : ['COUNTRY', "country", 'country', 'tdsusage', 0, 0, 'G'],
54
+ 'K' : ['REGION', "region", 'region', 'tdsusage', 0, 0, 'G'],
54
55
  'O' : ['ORGTYPE', "org_type", 'org_type', 'tdsusage', 7, 0, 'G'],
55
56
  'P' : ['DSOWNER', "specialist", 'specialist', 'dsowner', 8, 0, 'G'],
56
57
  'Q' : ['QUARTER', "quarter", 'quarter', 'tdsusage', 7, 0, 'G'],
@@ -79,9 +80,10 @@ EXPAND = {
79
80
  'Q' : ["TIME", "dDmy"],
80
81
  'Y' : ["TIME", "dDmy"],
81
82
 
82
- 'E' : ["USER", "eco", "email", "wuser", "user"],
83
- 'O' : ["USER", "eco", "org_type", "wuser", "user"],
84
- 'N' : ["USER", "eco", "country", "wuser", "user"],
83
+ 'E' : ["USER", "ecko", "email", "wuser", "user"],
84
+ 'O' : ["USER", "ecko", "org_type", "wuser", "user"],
85
+ 'N' : ["USER", "ecko", "country", "wuser", "user"],
86
+ 'K' : ["USER", "ecko", "region", "wuser", "user"],
85
87
 
86
88
  'R' : ["DSID", "fFsStT", "search.datasets.title", "search.datasets"],
87
89
  'T' : ["DSID", "fFsStT", "dataset.dsid", "dataset"],
@@ -105,6 +107,7 @@ EXPAND = {
105
107
  # H -- a string of report title to replace the default one
106
108
  # i -- array of specified IP addresses
107
109
  # I -- use given email IDs for email notice of data update
110
+ # k -- array of specified region names
108
111
  # L -- column delimiter for output
109
112
  # m -- array of specified months
110
113
  # M -- array of specified download methods
@@ -125,7 +128,7 @@ params = {}
125
128
  # relationship between parameter options and short field names, A option is not
126
129
  # related to a field name if it is not in keys %SNS
127
130
  SNS = {
128
- 'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'f' : 'F', 'i' : 'I', 'm' : 'M',
131
+ 'c' : 'N', 'd' : 'D', 'D' : 'D', 'e' : 'E', 'f' : 'F', 'i' : 'I', 'k' : 'K', 'm' : 'M',
129
132
  'M' : 'W', 'o' : 'O', 'q' : 'Q', 's' : 'S', 'S' : 'P', 't' : 'T', 'T' : 'T', 'y' : 'Y'
130
133
  }
131
134
 
@@ -6,8 +6,8 @@
6
6
  [-A RowLimit] [-c CountryCodes] [-d DateList] \
7
7
  [-D StartDate [EndDate]] [-e EMailList] -h \
8
8
  [-E StartNoticeDate [EndNoticeDate]] \
9
- [-f EndTypeFlags] [-i IPAddresses] \
10
- [-I EmailIDList] [-m MonthList] [-M AccessMethods] \
9
+ [-f EndTypeFlags] [-i IPAddresses] [-I EmailIDList] \
10
+ [-RegionNamess] [-m MonthList] [-M AccessMethods] \
11
11
  [-N MinNumberRead [MaxNumberRead]] \
12
12
  [-o OrganizationTypes] \
13
13
  [-q QuaterList] [-s MinSize [MaxSize]] \
@@ -18,8 +18,8 @@
18
18
 
19
19
  Specify [-C] ColumnNames, refer to Option -C section for detail
20
20
  description, and choose at least one of the condition options, -a, -c,
21
- -d, -D, -e, -E, -f, -i, -I, -m, -M, -N, -o, -q, -s, -S -t, -T, and -y, to
22
- run this application.
21
+ -d, -D, -e, -E, -f, -i, -I, -k, -m, -M, -N, -o, -q, -s, -S -t, -T, and -y,
22
+ to run this application.
23
23
 
24
24
  For all condition options, except option -a, an '!' sign can be added
25
25
  between an option flag and its option values to get an excluding
@@ -28,8 +28,8 @@
28
28
  OrganizationTypes. Refer to the example given at the end of this help
29
29
  document for how to select excluding condition.
30
30
 
31
- String condition options, -c, -e, -f, -g, -i, -M, -o, -S, and -t, allow wildcard
32
- inputs. '%' matches any number of characters and '_' matches any one
31
+ String condition options, -c, -e, -f, -g, -i, -k, -M, -o, -S, and -t, allow
32
+ wildcard inputs. '%' matches any number of characters and '_' matches any one
33
33
  character. Refer to the example given at the end of this help document
34
34
  for how to use wildcard for string condition options.
35
35
 
@@ -56,6 +56,7 @@
56
56
  I*- IP - user IP address
57
57
  M*- MONTH - format as YYYY-MM, for example 2004-04
58
58
  N*- COUNTRY - country codes users from
59
+ K*- REGION - region names users from
59
60
  O*- ORGTYPE - organization types (DSS, NCAR, UNIV and OTHER)
60
61
  P*- DSOWNER - login names of specialists who own the datasets
61
62
  Q*- QUARTER - quarter of year, 1, 2, 3, or 4
@@ -124,6 +125,8 @@
124
125
 
125
126
  - Option -i, for data read from machines with given IP addresses;
126
127
 
128
+ - Option -k, for files read by users from given region names;
129
+
127
130
  - Option -m, for data read in given months, in format YYYY-MM;
128
131
 
129
132
  - Option -M, for data read via access methods;
@@ -22,7 +22,7 @@ from rda_python_common import PgUtil
22
22
  from . import PgView
23
23
 
24
24
  VUSG = {
25
- 'SNMS' : "ABCDEFGHIJKLMNOPRQTUVWYZ", # all available short field names in %FLDS
25
+ 'SNMS' : "ABCDEFGHIJKLMNOPQRTUVWYZ", # all available short field names in %FLDS
26
26
  'OPTS' : 'AabcCdDeEfFhHiIklLmMNoOStTUvVwyz', # all available options, used for %params
27
27
  'NOPT' : 'abhRwz', # stand alone option without inputs
28
28
  'ACND' : 'cdefiklmMoStvy', # available array condition options
@@ -52,11 +52,11 @@ FLDS = {
52
52
  'F' : ['FILENAME', "wfile", 'wfile', 'wfile', 0, 0, 'G'],
53
53
  'G' : ['PRODUCT', "tindex", 'tindex', 'wfile', 0, 0, 'G'],
54
54
  'I' : ['FIRSTNAME', "fstname", 'fstname', 'wuser', 0, 0, 'G'],
55
- 'K' : ['ORGNAME', "org_name", 'org_name', 'wuser', 0, 0, 'G'],
56
55
  'Z' : ['TIME', "time_read", 'time_read', 'wusage', 8, 0, 'G'],
57
56
  'L' : ['LASTNAME', "lstname", 'lstname', 'wuser', 0, 0, 'G'],
58
- 'M' : ['MONTH', PgDBI.fmtym("date_read"), 'date_read', 'wusage', 7, 0, 'G'],
57
+ 'M' : ['MONTH', PgDBI.fmtym("date_read"), 'date_read', 'wusage', 7, 0, 'G'],
59
58
  'N' : ['COUNTRY', "country", 'country', 'wuser', 0, 0, 'G'],
59
+ 'K' : ['REGION', "region", 'region', 'wuser', 0, 0, 'G'],
60
60
  'O' : ['ORGTYPE', "org_type", 'org_type', 'wuser', 7, 0, 'G'],
61
61
  'P' : ['DSOWNER', "specialist", 'specialist', 'dsowner', 8, 0, 'G'],
62
62
  'Q' : ['QUARTER', "quarter", 'quarter', 'wusage', 7, 0, 'G'],
@@ -89,7 +89,7 @@ EXPAND = {
89
89
  'E' : ["USER", "eilkco", "email", "wuser"],
90
90
  'I' : ["USER", "eilkco", "fstname", "wuser"],
91
91
  'L' : ["USER", "eilkco", "lstname", "wuser"],
92
- 'K' : ["USER", "eilkco", "org_name", "wuser"],
92
+ 'K' : ["USER", "eilkco", "region", "wuser"],
93
93
  'O' : ["USER", "eilkco", "org_type", "wuser"],
94
94
  'N' : ["USER", "eilkco", "country", "wuser"],
95
95
 
@@ -116,7 +116,7 @@ EXPAND = {
116
116
  # H -- a string of report title to replace the default one
117
117
  # i -- array of specified first names
118
118
  # I -- use given email IDs for email notice of data update
119
- # k -- array of specified orginization names
119
+ # k -- array of specified region names
120
120
  # l -- array of specified last names
121
121
  # L -- column delimiter for output
122
122
  # m -- array of specified months
@@ -8,7 +8,7 @@
8
8
  [-E StartNoticeDate [EndNoticeDate]] \
9
9
  [-f FileNameList] [-F MinFileName [MaxFileName]] \
10
10
  [-i FirstNamelist] [-I EmailIDList] \
11
- [-j] [-J] [-k OrganizationNames] [-l LastNameList] \
11
+ [-j] [-J] [-k RegionNames] [-l LastNameList] \
12
12
  [-m MonthList] [-M DownloadMethodList] \
13
13
  [-N MinNumberRead [MaxNumberRead]] \
14
14
  [-o OrganizationTypes] [-q QuaterList] \
@@ -57,10 +57,10 @@
57
57
  F*- FILENAME - WEB file name accessed
58
58
  G*- PRODUCT - product (top group) information
59
59
  I*- FIRSTNAME - user first name
60
- K*- ORGNAME - organization name
61
60
  L*- LASTNAME - user last name
62
61
  M*- MONTH - format as YYYY-MM, for example 2004-04
63
62
  N*- COUNTRY - country codes users from
63
+ K*- REGION - region names users from
64
64
  O*- ORGTYPE - organization types (DSS, NCAR, UNIV and OTHER)
65
65
  P*- DSOWNER - login names of specialists who own the datasets
66
66
  Q*- QUARTER - quarter of year, 1, 2, 3, or 4
@@ -140,7 +140,7 @@
140
140
 
141
141
  - Option -J, includes Group Titles in column PRODUCT;
142
142
 
143
- - Option -k, for WEB files read by users from given organization names;
143
+ - Option -k, for files read by users from given region names;
144
144
 
145
145
  - Option -l, for WEB files read by users with given last names;
146
146
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_metrics
3
- Version: 1.0.16
3
+ Version: 1.0.18
4
4
  Summary: RDA Python Package to gather and view data usage metrics
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-metrics
@@ -16,6 +16,7 @@ Requires-Dist: rda_python_setuid
16
16
  Requires-Dist: geoip2
17
17
  Requires-Dist: ipinfo
18
18
  Requires-Dist: httplib2
19
+ Requires-Dist: dnspython
19
20
  Dynamic: license-file
20
21
 
21
22
  RDA Python Package to gather and view data usage metrics.