etna 0.1.18 → 0.1.23

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1e3987a14cd4cb5eb805c4573eb09a8a64a50c2e34e1c5ae011c8efb946ab3d
4
- data.tar.gz: 611e0df9d6f931adc14442c99adad44ebf899c16695d033618c094704e538126
3
+ metadata.gz: 6ae7868eeaa6de2a8701602929e642d381ccab2115c71cb18c216a362217645c
4
+ data.tar.gz: 9183c39484f21c330f1c0e14f4c9e355e8302805f71dbdbb5889f1e3eeb58bb4
5
5
  SHA512:
6
- metadata.gz: 93deb61017df46773b3449424589f7db51c65b4543c3203bf1a35fc2815bd6140bd04981e55413e0e91e47110b58d9f0a4d8f4566ab1bad99cd111e96d44bc76
7
- data.tar.gz: bda7d6c202366ddb2c5805091758aa2e978ab9bffb9fd364fdd12235567169453a7dfd97fddaf2e9a468b1ce025effa9ae79c8c0e97d46a7cf7315482ba9872c
6
+ metadata.gz: 20ae9fdf11e4da6e000be9308e5c3f8b5309d219aa5820b4a855ee43b80d2f4c6bc7f33e52e1844ab3bfe02ee67968cbb91f53737a0a6515ba870b08dffe854e
7
+ data.tar.gz: a43573a1a801e9d4be0aee3390997b68507b6bdcb626fc185264eb8cb884b7e14d92a4485df5ec494527bd8609d761a7f7e1ca5c9064181789506e756f8d4157
data/bin/etna CHANGED
@@ -9,55 +9,10 @@ require 'yaml'
9
9
  require_relative '../lib/etna'
10
10
  require_relative '../lib/commands'
11
11
 
12
- config = (
13
- if File.exists?(EtnaApp.config_file_path)
14
- YAML.load(File.read(EtnaApp.config_file_path))
15
- else
16
- {}
17
- end).update({
18
- production: {
19
- docker: {
20
- default_tag: 'latest',
21
- },
22
- magma: {
23
- host: 'https://magma.ucsf.edu'
24
- },
25
- metis: {
26
- host: 'https://metis.ucsf.edu',
27
- },
28
- janus: {
29
- host: 'https://janus.ucsf.edu',
30
- },
31
- timur: {},
32
- polyphemus: {},
33
- auth_redirect: 'https://janus.ucsf.edu',
34
- ignore_ssl: false,
35
- },
36
- stage: {
37
- docker: {
38
- default_tag: 'latest',
39
- },
40
- magma: {
41
- host: 'https://magma-stage.ucsf.edu'
42
- },
43
- metis: {
44
- host: 'https://metis-stage.ucsf.edu',
45
- },
46
- janus: {
47
- host: 'https://janus-stage.ucsf.edu',
48
- },
49
- timur: {},
50
- polyphemus: {},
51
- auth_redirect: 'https://janus-stage.ucsf.edu',
52
- ignore_ssl: true,
53
- },
54
- })
55
-
56
- EtnaApp.instance.run_command(config, *ARGV) do |cmd, args|
57
- if cmd.class.included_modules.include?(RequireConfirmation)
58
- puts "Attempting to run #{cmd.program_name} in environment #{EtnaApp.instance.environment} with args #{args}"
59
- StrongConfirmation.confirm
60
- else
61
- true
62
- end
12
+ config = if File.exists?(EtnaApp.config_file_path)
13
+ YAML.load(File.read(EtnaApp.config_file_path))
14
+ else
15
+ {}
63
16
  end
17
+
18
+ EtnaApp.instance.run_command(config, *ARGV)
@@ -23,30 +23,26 @@ return
23
23
  fi
24
24
  COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
25
25
  return
26
- elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
27
- return
28
- elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
29
- all_flag_completion_names="${all_flag_completion_names//$1\ /}"
30
- a=$1
26
+ elif [[ "$1" == "administrate" ]]; then
31
27
  shift
32
- if [[ "$string_flag_completion_names" =~ $a\ ]]; then
28
+ all_flag_completion_names="$all_flag_completion_names "
29
+ string_flag_completion_names="$string_flag_completion_names "
30
+ while [[ "$#" != "0" ]]; do
33
31
  if [[ "$#" == "1" ]]; then
34
- a="${a//--/}"
35
- a="${a//-/_}"
36
- i="_completions_for_$a"
37
- all_completion_names="${!i}"
38
- COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
32
+ all_completion_names="help models project"
33
+ all_completion_names="$all_completion_names $all_flag_completion_names"
34
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
39
35
  return
40
36
  fi
41
- shift
42
- fi
43
- elif [[ "$1" == "administrate" ]]; then
37
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
38
+ return
39
+ elif [[ "$1" == "help" ]]; then
44
40
  shift
45
41
  all_flag_completion_names="$all_flag_completion_names "
46
42
  string_flag_completion_names="$string_flag_completion_names "
47
43
  while [[ "$#" != "0" ]]; do
48
44
  if [[ "$#" == "1" ]]; then
49
- all_completion_names="help models project"
45
+ all_completion_names=""
50
46
  all_completion_names="$all_completion_names $all_flag_completion_names"
51
47
  if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
52
48
  return
@@ -70,12 +66,41 @@ return
70
66
  fi
71
67
  shift
72
68
  fi
73
- elif [[ "$1" == "help" ]]; then
69
+ else
70
+ return
71
+ fi
72
+ done
73
+ return
74
+ elif [[ "$1" == "models" ]]; then
74
75
  shift
75
76
  all_flag_completion_names="$all_flag_completion_names "
76
77
  string_flag_completion_names="$string_flag_completion_names "
77
78
  while [[ "$#" != "0" ]]; do
78
79
  if [[ "$#" == "1" ]]; then
80
+ all_completion_names="apply_template attributes copy_template help"
81
+ all_completion_names="$all_completion_names $all_flag_completion_names"
82
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
83
+ return
84
+ fi
85
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
86
+ return
87
+ elif [[ "$1" == "apply_template" ]]; then
88
+ shift
89
+ if [[ "$#" == "1" ]]; then
90
+ all_completion_names="__project_name__"
91
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
92
+ return
93
+ fi
94
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
95
+ return
96
+ fi
97
+ shift
98
+ all_flag_completion_names="$all_flag_completion_names --file --target-model "
99
+ string_flag_completion_names="$string_flag_completion_names --file --target-model "
100
+ declare _completions_for_file="__file__"
101
+ declare _completions_for_target_model="__target_model__"
102
+ while [[ "$#" != "0" ]]; do
103
+ if [[ "$#" == "1" ]]; then
79
104
  all_completion_names=""
80
105
  all_completion_names="$all_completion_names $all_flag_completion_names"
81
106
  if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
@@ -105,40 +130,50 @@ return
105
130
  fi
106
131
  done
107
132
  return
108
- elif [[ "$1" == "models" ]]; then
133
+ elif [[ "$1" == "attributes" ]]; then
109
134
  shift
110
135
  all_flag_completion_names="$all_flag_completion_names "
111
136
  string_flag_completion_names="$string_flag_completion_names "
112
137
  while [[ "$#" != "0" ]]; do
113
138
  if [[ "$#" == "1" ]]; then
114
- all_completion_names="apply_template attributes copy_template help"
139
+ all_completion_names="create_file_linking_csv help load_table_from_csv update_from_csv"
115
140
  all_completion_names="$all_completion_names $all_flag_completion_names"
116
141
  if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
117
142
  return
118
143
  fi
119
144
  COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
120
145
  return
121
- elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
146
+ elif [[ "$1" == "create_file_linking_csv" ]]; then
147
+ shift
148
+ if [[ "$#" == "1" ]]; then
149
+ all_completion_names="__project_name__"
150
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
122
151
  return
123
- elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
124
- all_flag_completion_names="${all_flag_completion_names//$1\ /}"
125
- a=$1
152
+ fi
153
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
154
+ return
155
+ fi
126
156
  shift
127
- if [[ "$string_flag_completion_names" =~ $a\ ]]; then
128
157
  if [[ "$#" == "1" ]]; then
129
- a="${a//--/}"
130
- a="${a//-/_}"
131
- i="_completions_for_$a"
132
- all_completion_names="${!i}"
158
+ all_completion_names="__bucket_name__"
159
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
160
+ return
161
+ fi
133
162
  COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
134
163
  return
135
164
  fi
136
165
  shift
166
+ if [[ "$#" == "1" ]]; then
167
+ all_completion_names="__attribute_name__"
168
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
169
+ return
170
+ fi
171
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
172
+ return
137
173
  fi
138
- elif [[ "$1" == "apply_template" ]]; then
139
174
  shift
140
175
  if [[ "$#" == "1" ]]; then
141
- all_completion_names="__project_name__"
176
+ all_completion_names="__extension__"
142
177
  if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
143
178
  return
144
179
  fi
@@ -146,10 +181,11 @@ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
146
181
  return
147
182
  fi
148
183
  shift
149
- all_flag_completion_names="$all_flag_completion_names --file --target-model "
150
- string_flag_completion_names="$string_flag_completion_names --file --target-model "
184
+ all_flag_completion_names="$all_flag_completion_names --collection --file --regex --folder "
185
+ string_flag_completion_names="$string_flag_completion_names --file --regex --folder "
151
186
  declare _completions_for_file="__file__"
152
- declare _completions_for_target_model="__target_model__"
187
+ declare _completions_for_regex="__regex__"
188
+ declare _completions_for_folder="__folder__"
153
189
  while [[ "$#" != "0" ]]; do
154
190
  if [[ "$#" == "1" ]]; then
155
191
  all_completion_names=""
@@ -181,13 +217,13 @@ return
181
217
  fi
182
218
  done
183
219
  return
184
- elif [[ "$1" == "attributes" ]]; then
220
+ elif [[ "$1" == "help" ]]; then
185
221
  shift
186
222
  all_flag_completion_names="$all_flag_completion_names "
187
223
  string_flag_completion_names="$string_flag_completion_names "
188
224
  while [[ "$#" != "0" ]]; do
189
225
  if [[ "$#" == "1" ]]; then
190
- all_completion_names="help update_from_csv"
226
+ all_completion_names=""
191
227
  all_completion_names="$all_completion_names $all_flag_completion_names"
192
228
  if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
193
229
  return
@@ -211,9 +247,41 @@ return
211
247
  fi
212
248
  shift
213
249
  fi
214
- elif [[ "$1" == "help" ]]; then
250
+ else
251
+ return
252
+ fi
253
+ done
254
+ return
255
+ elif [[ "$1" == "load_table_from_csv" ]]; then
215
256
  shift
216
- all_flag_completion_names="$all_flag_completion_names "
257
+ if [[ "$#" == "1" ]]; then
258
+ all_completion_names="__project_name__"
259
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
260
+ return
261
+ fi
262
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
263
+ return
264
+ fi
265
+ shift
266
+ if [[ "$#" == "1" ]]; then
267
+ all_completion_names="__model_name__"
268
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
269
+ return
270
+ fi
271
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
272
+ return
273
+ fi
274
+ shift
275
+ if [[ "$#" == "1" ]]; then
276
+ all_completion_names="__file_path__"
277
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
278
+ return
279
+ fi
280
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
281
+ return
282
+ fi
283
+ shift
284
+ all_flag_completion_names="$all_flag_completion_names --execute "
217
285
  string_flag_completion_names="$string_flag_completion_names "
218
286
  while [[ "$#" != "0" ]]; do
219
287
  if [[ "$#" == "1" ]]; then
@@ -275,8 +343,9 @@ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
275
343
  return
276
344
  fi
277
345
  shift
278
- all_flag_completion_names="$all_flag_completion_names "
279
- string_flag_completion_names="$string_flag_completion_names "
346
+ all_flag_completion_names="$all_flag_completion_names --json-values --hole-value "
347
+ string_flag_completion_names="$string_flag_completion_names --hole-value "
348
+ declare _completions_for_hole_value="__hole_value__"
280
349
  while [[ "$#" != "0" ]]; do
281
350
  if [[ "$#" == "1" ]]; then
282
351
  all_completion_names=""
@@ -308,6 +377,23 @@ return
308
377
  fi
309
378
  done
310
379
  return
380
+ elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
381
+ return
382
+ elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
383
+ all_flag_completion_names="${all_flag_completion_names//$1\ /}"
384
+ a=$1
385
+ shift
386
+ if [[ "$string_flag_completion_names" =~ $a\ ]]; then
387
+ if [[ "$#" == "1" ]]; then
388
+ a="${a//--/}"
389
+ a="${a//-/_}"
390
+ i="_completions_for_$a"
391
+ all_completion_names="${!i}"
392
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
393
+ return
394
+ fi
395
+ shift
396
+ fi
311
397
  else
312
398
  return
313
399
  fi
@@ -393,23 +479,6 @@ return
393
479
  fi
394
480
  done
395
481
  return
396
- else
397
- return
398
- fi
399
- done
400
- elif [[ "$1" == "project" ]]; then
401
- shift
402
- all_flag_completion_names="$all_flag_completion_names "
403
- string_flag_completion_names="$string_flag_completion_names "
404
- while [[ "$#" != "0" ]]; do
405
- if [[ "$#" == "1" ]]; then
406
- all_completion_names="create help"
407
- all_completion_names="$all_completion_names $all_flag_completion_names"
408
- if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
409
- return
410
- fi
411
- COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
412
- return
413
482
  elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
414
483
  return
415
484
  elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
@@ -427,6 +496,23 @@ return
427
496
  fi
428
497
  shift
429
498
  fi
499
+ else
500
+ return
501
+ fi
502
+ done
503
+ elif [[ "$1" == "project" ]]; then
504
+ shift
505
+ all_flag_completion_names="$all_flag_completion_names "
506
+ string_flag_completion_names="$string_flag_completion_names "
507
+ while [[ "$#" != "0" ]]; do
508
+ if [[ "$#" == "1" ]]; then
509
+ all_completion_names="create help"
510
+ all_completion_names="$all_completion_names $all_flag_completion_names"
511
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
512
+ return
513
+ fi
514
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
515
+ return
430
516
  elif [[ "$1" == "create" ]]; then
431
517
  shift
432
518
  if [[ "$#" == "1" ]]; then
@@ -515,27 +601,27 @@ return
515
601
  fi
516
602
  done
517
603
  return
518
- else
519
- return
520
- fi
521
- done
522
- else
604
+ elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
523
605
  return
524
- fi
525
- done
526
- elif [[ "$1" == "config" ]]; then
606
+ elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
607
+ all_flag_completion_names="${all_flag_completion_names//$1\ /}"
608
+ a=$1
527
609
  shift
528
- all_flag_completion_names="$all_flag_completion_names "
529
- string_flag_completion_names="$string_flag_completion_names "
530
- while [[ "$#" != "0" ]]; do
610
+ if [[ "$string_flag_completion_names" =~ $a\ ]]; then
531
611
  if [[ "$#" == "1" ]]; then
532
- all_completion_names="help set show"
533
- all_completion_names="$all_completion_names $all_flag_completion_names"
534
- if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
612
+ a="${a//--/}"
613
+ a="${a//-/_}"
614
+ i="_completions_for_$a"
615
+ all_completion_names="${!i}"
616
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
535
617
  return
536
618
  fi
537
- COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
619
+ shift
620
+ fi
621
+ else
538
622
  return
623
+ fi
624
+ done
539
625
  elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
540
626
  return
541
627
  elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
@@ -553,6 +639,23 @@ return
553
639
  fi
554
640
  shift
555
641
  fi
642
+ else
643
+ return
644
+ fi
645
+ done
646
+ elif [[ "$1" == "config" ]]; then
647
+ shift
648
+ all_flag_completion_names="$all_flag_completion_names "
649
+ string_flag_completion_names="$string_flag_completion_names "
650
+ while [[ "$#" != "0" ]]; do
651
+ if [[ "$#" == "1" ]]; then
652
+ all_completion_names="help set show"
653
+ all_completion_names="$all_completion_names $all_flag_completion_names"
654
+ if [[ -z "$(echo $all_completion_names | xargs)" ]]; then
655
+ return
656
+ fi
657
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
658
+ return
556
659
  elif [[ "$1" == "help" ]]; then
557
660
  shift
558
661
  all_flag_completion_names="$all_flag_completion_names "
@@ -634,7 +737,7 @@ done
634
737
  return
635
738
  elif [[ "$1" == "show" ]]; then
636
739
  shift
637
- all_flag_completion_names="$all_flag_completion_names --all "
740
+ all_flag_completion_names="$all_flag_completion_names "
638
741
  string_flag_completion_names="$string_flag_completion_names "
639
742
  while [[ "$#" != "0" ]]; do
640
743
  if [[ "$#" == "1" ]]; then
@@ -667,6 +770,23 @@ return
667
770
  fi
668
771
  done
669
772
  return
773
+ elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
774
+ return
775
+ elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
776
+ all_flag_completion_names="${all_flag_completion_names//$1\ /}"
777
+ a=$1
778
+ shift
779
+ if [[ "$string_flag_completion_names" =~ $a\ ]]; then
780
+ if [[ "$#" == "1" ]]; then
781
+ a="${a//--/}"
782
+ a="${a//-/_}"
783
+ i="_completions_for_$a"
784
+ all_completion_names="${!i}"
785
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
786
+ return
787
+ fi
788
+ shift
789
+ fi
670
790
  else
671
791
  return
672
792
  fi
@@ -719,23 +839,6 @@ return
719
839
  fi
720
840
  COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
721
841
  return
722
- elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
723
- return
724
- elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
725
- all_flag_completion_names="${all_flag_completion_names//$1\ /}"
726
- a=$1
727
- shift
728
- if [[ "$string_flag_completion_names" =~ $a\ ]]; then
729
- if [[ "$#" == "1" ]]; then
730
- a="${a//--/}"
731
- a="${a//-/_}"
732
- i="_completions_for_$a"
733
- all_completion_names="${!i}"
734
- COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
735
- return
736
- fi
737
- shift
738
- fi
739
842
  elif [[ "$1" == "attribute_actions" ]]; then
740
843
  shift
741
844
  all_flag_completion_names="$all_flag_completion_names "
@@ -806,6 +909,23 @@ return
806
909
  fi
807
910
  done
808
911
  return
912
+ elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
913
+ return
914
+ elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
915
+ all_flag_completion_names="${all_flag_completion_names//$1\ /}"
916
+ a=$1
917
+ shift
918
+ if [[ "$string_flag_completion_names" =~ $a\ ]]; then
919
+ if [[ "$#" == "1" ]]; then
920
+ a="${a//--/}"
921
+ a="${a//-/_}"
922
+ i="_completions_for_$a"
923
+ all_completion_names="${!i}"
924
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
925
+ return
926
+ fi
927
+ shift
928
+ fi
809
929
  else
810
930
  return
811
931
  fi
@@ -916,6 +1036,23 @@ return
916
1036
  fi
917
1037
  done
918
1038
  return
1039
+ elif [[ -z "$(echo $all_flag_completion_names | xargs)" ]]; then
1040
+ return
1041
+ elif [[ "$all_flag_completion_names" =~ $1\ ]]; then
1042
+ all_flag_completion_names="${all_flag_completion_names//$1\ /}"
1043
+ a=$1
1044
+ shift
1045
+ if [[ "$string_flag_completion_names" =~ $a\ ]]; then
1046
+ if [[ "$#" == "1" ]]; then
1047
+ a="${a//--/}"
1048
+ a="${a//-/_}"
1049
+ i="_completions_for_$a"
1050
+ all_completion_names="${!i}"
1051
+ COMPREPLY=($(compgen -W "$all_completion_names" -- "$1"))
1052
+ return
1053
+ fi
1054
+ shift
1055
+ fi
919
1056
  else
920
1057
  return
921
1058
  fi