-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathoptions.py
1713 lines (1400 loc) · 44.1 KB
/
options.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""Click definitions for various shared options and arguments."""
from __future__ import absolute_import
import functools
import os
import click
from galaxy.tools.deps import docker_util
from .config import planemo_option
def force_option(what="files"):
return planemo_option(
"-f",
"--force",
is_flag=True,
help="Overwrite existing %s if present." % what,
)
def skip_venv_option():
return planemo_option(
"--skip_venv",
is_flag=True,
help=("Do not create or source a virtualenv environment for Galaxy, "
"this should be used or instance to preserve an externally "
"configured virtual environment or conda environment.")
)
def run_engine_option():
return planemo_option(
"--engine",
type=click.Choice(["galaxy", "docker_galaxy", "cwltool", "toil", "external_galaxy"]),
default="galaxy",
use_global_config=True,
help=("Select an engine to run or test aritfacts such as tools "
"and workflows. Defaults to a local Galaxy, but running Galaxy within "
"a Docker container or the CWL reference implementation 'cwltool' and "
"be selected.")
)
def non_strict_cwl_option():
return planemo_option(
"--non_strict_cwl",
default=False,
is_flag=True,
help="Disable strict validation of CWL.",
)
def serve_engine_option():
return planemo_option(
"--engine",
type=click.Choice(["galaxy", "docker_galaxy", "external_galaxy"]),
default="galaxy",
use_global_config=True,
use_env_var=True,
help=("Select an engine to serve aritfacts such as tools "
"and workflows. Defaults to a local Galaxy, but running Galaxy within "
"a Docker container.")
)
def ignore_dependency_problems_option():
return planemo_option(
"--ignore_dependency_problems",
is_flag=True,
default=False,
use_global_config=True,
help=("When installing shed repositories for workflows, ignore dependency issues. "
"These likely indicate a problem but in some cases may not prevent a workflow "
"from successfully executing.")
)
def cwltool_no_container_option():
return planemo_option(
"--no-container",
"--no_container",
is_flag=True,
default=False,
use_global_config=True,
help=("If cwltool engine is used, disable Docker container usage.")
)
def test_data_option():
return planemo_option(
"--test_data",
type=click.Path(exists=True, file_okay=False, resolve_path=True),
help="test-data directory to for specified tool(s).",
)
def extra_tools_option():
return planemo_option(
"--extra_tools",
type=click.Path(exists=True,
file_okay=True,
dir_okay=True,
resolve_path=True),
multiple=True,
help=("Extra tool sources to include in Galaxy's tool panel (file or "
"directory). These will not be linted/tested/etc... but they "
"will be available to workflows and for interactive use.")
)
def tool_data_table_option():
return planemo_option(
"--tool_data_table",
type=click.Path(exists=True, file_okay=True, resolve_path=True),
help="tool_data_table_conf.xml file to for specified tool(s).",
)
def galaxy_email_option():
return planemo_option(
"--galaxy_email",
type=str,
default="[email protected]",
use_global_config=True,
use_env_var=True,
help="E-mail address to use when launching single-user Galaxy server.",
)
def galaxy_root_option():
return planemo_option(
"--galaxy_root",
use_global_config=True,
extra_global_config_vars=["galaxy_root"],
use_env_var=True,
type=click.Path(exists=True, file_okay=False, resolve_path=True),
help="Root of development galaxy directory to execute command with.",
)
def galaxy_database_seed_option():
return planemo_option(
"--galaxy_database_seed",
default=None,
use_global_config=True,
use_env_var=True,
type=click.Path(exists=True, file_okay=True, resolve_path=True),
help="Preseeded Galaxy sqlite database to target.",
)
def galaxy_cwl_root_option():
return planemo_option(
"--cwl_galaxy_root",
use_global_config=True,
extra_global_config_vars=["cwl_galaxy_root"],
use_env_var=True,
type=click.Path(exists=True, file_okay=False, resolve_path=True),
help=("Root of development galaxy directory to execute command with"
" (must be branch of Galaxy with CWL support, this option"
" is experimental and will be replaced with --galaxy_root when"
" and if CWL support is merged into Galaxy."),
)
def galaxy_port_option():
return planemo_option(
"--port",
type=int,
default="9090",
use_global_config=True,
help="Port to serve Galaxy on (default is 9090).",
)
def galaxy_host_option():
return planemo_option(
"--host",
type=str,
default="127.0.0.1",
use_global_config=True,
help=("Host to bind Galaxy to. Default is 127.0.0.1 that is "
"restricted to localhost connections for security reasons "
"set to 0.0.0.0 to bind Galaxy to all ports including "
"potentially publicly accessible ones."),
)
def dependency_resolvers_option():
return planemo_option(
"--dependency_resolvers_config_file",
type=click.Path(
exists=True,
file_okay=True,
dir_okay=False,
resolve_path=True
),
use_global_config=True,
help="Dependency resolver configuration for Galaxy to target.",
)
def enable_cwl_option():
return planemo_option(
"--cwl",
is_flag=True,
help=("Configure Galaxy for use with CWL tool."
" (this option is experimental and will be replaced when"
" and if CWL support is merged into Galaxy)."),
)
def build_cwl_option():
return planemo_option(
"--cwl",
is_flag=True,
help="Build a CWL tool instead of a Galaxy tool.",
)
def run_output_directory_option():
return planemo_option(
"output_directory",
"--output_directory",
"--outdir",
type=click.Path(
file_okay=False,
dir_okay=True,
resolve_path=True,
),
default=None,
help=("Where to store outputs of a 'run' task."),
)
def run_output_json_option():
return planemo_option(
"output_json",
"--output_json",
type=click.Path(
file_okay=True,
dir_okay=False,
resolve_path=True,
),
default=None,
help=("Where to store JSON dictionary describing outputs of "
"a 'run' task."),
)
def no_dependency_resolution():
return planemo_option(
"--no_dependency_resolution",
is_flag=True,
help="Configure Galaxy with no dependency resolvers.",
)
def brew_dependency_resolution():
return planemo_option(
"--brew_dependency_resolution",
is_flag=True,
help="Configure Galaxy to use plain brew dependency resolution.",
)
def conda_dependency_resolution():
return planemo_option(
"--conda_dependency_resolution",
is_flag=True,
help="Configure Galaxy to use only conda for dependency resolution.",
)
def shed_dependency_resolution():
return planemo_option(
"--shed_dependency_resolution",
is_flag=True,
help=("Configure Galaxy to use brewed Tool Shed dependency"
" resolution."),
)
def file_path_option():
return planemo_option(
"--file_path",
type=click.Path(
file_okay=False,
dir_okay=True,
resolve_path=True
),
help="Location for files created by Galaxy (e.g. database/files).",
default=None,
use_global_config=True,
)
def database_connection_option():
return planemo_option(
"--database_connection",
type=str,
help="Database connection string to use for Galaxy.",
default=None,
use_global_config=True,
)
def shed_tools_conf_option():
return planemo_option(
"--shed_tool_conf",
type=str,
help="Location of shed tools conf file for Galaxy.",
default=None,
use_global_config=True,
)
def shed_tools_directory_option():
return planemo_option(
"--shed_tool_path",
type=str,
help="Location of shed tools directory for Galaxy.",
default=None,
use_global_config=True,
)
def tool_dependency_dir_option():
return planemo_option(
"--tool_dependency_dir",
type=click.Path(
exists=True,
file_okay=False,
dir_okay=True,
resolve_path=True
),
default=None,
use_global_config=True,
help="Tool dependency dir for Galaxy to target.",
)
def job_config_option():
return planemo_option(
"--job_config_file",
type=click.Path(
exists=True,
file_okay=True,
dir_okay=False,
resolve_path=True
),
help="Job configuration file for Galaxy to target.",
default=None,
use_global_config=True,
)
def mulled_containers_option():
return planemo_option(
"mulled_containers",
"--mulled_containers",
"--biocontainers",
is_flag=True,
help="Test tools against mulled containers (forces --docker).",
)
def install_galaxy_option():
return planemo_option(
"--install_galaxy",
is_flag=True,
help="Download and configure a disposable copy of Galaxy from github."
)
def docker_galaxy_image_option():
return planemo_option(
"--docker_galaxy_image",
default="quay.io/bgruening/galaxy",
use_global_config=True,
help=("Docker image identifier for docker-galaxy-flavor used if "
"engine type is specified as ``docker-galaxy``. Defaults to "
"quay.io/bgruening/galaxy.")
)
def docker_extra_volume_option():
arg_type = click.Path(
exists=True,
file_okay=True,
dir_okay=True,
readable=True,
resolve_path=True,
)
return planemo_option(
"--docker_extra_volume",
type=arg_type,
default=None,
use_global_config=True,
help=("Extra path to mount if --engine docker.")
)
def galaxy_url_option():
return planemo_option(
"--galaxy_url",
use_global_config=True,
extra_global_config_vars=["galaxy_url"],
use_env_var=True,
type=str,
help="Remote Galaxy URL to use with external Galaxy engine.",
)
def galaxy_admin_key_option():
return planemo_option(
"--galaxy_admin_key",
use_global_config=True,
extra_global_config_vars=["admin_key"],
use_env_var=True,
type=str,
help="Admin key to use with external Galaxy engine.",
)
def galaxy_user_key_option():
return planemo_option(
"--galaxy_user_key",
use_global_config=True,
extra_global_config_vars=["admin_key"],
use_env_var=True,
type=str,
help="User key to use with external Galaxy engine.",
)
def no_cache_galaxy_option():
return planemo_option(
"--no_cache_galaxy",
is_flag=True,
help=("Skip caching of Galaxy source and dependencies obtained with "
"--install_galaxy. Not caching this results in faster "
"downloads (no git) - so is better on throw away instances such "
"with TravisCI. ")
)
def galaxy_branch_option():
return planemo_option(
"--galaxy_branch",
default=None,
use_global_config=True,
use_env_var=True,
help=("Branch of Galaxy to target (defaults to master) if a Galaxy "
"root isn't specified.")
)
def galaxy_source_option():
return planemo_option(
"--galaxy_source",
default=None,
use_global_config=True,
help=("Git source of Galaxy to target (defaults to the official "
"galaxyproject github source if a Galaxy root isn't "
"specified.")
)
def skip_install_option():
return planemo_option(
"--skip_install",
is_flag=True,
help="Skip installation - only source requirements already available."
)
def brew_option():
return planemo_option(
"--brew",
use_global_config=True,
type=click.Path(exists=True, file_okay=True, dir_okay=False),
help="Homebrew 'brew' executable to use."
)
def conda_prefix_option():
return planemo_option(
"--conda_prefix",
use_global_config=True,
use_env_var=True,
type=click.Path(file_okay=False, dir_okay=True),
help="Conda prefix to use for conda dependency commands."
)
def conda_exec_option():
return planemo_option(
"--conda_exec",
use_global_config=True,
type=click.Path(exists=True, file_okay=True, dir_okay=False),
help="Location of conda executable."
)
def conda_debug_option():
return planemo_option(
"--conda_debug",
is_flag=True,
help="Enable more verbose conda logging."
)
def conda_use_local_option():
return planemo_option(
"--conda_use_local",
is_flag=True,
help="Use locally built packages while building Conda environments."
)
def conda_ensure_channels_option():
return planemo_option(
"conda_ensure_channels",
"--conda_channels",
"--conda_ensure_channels",
type=str,
use_global_config=True,
use_env_var=True,
help=("Ensure conda is configured with specified comma separated "
"list of channels."),
default="iuc,bioconda,conda-forge,defaults",
)
def conda_copy_dependencies_option():
return planemo_option(
"--conda_copy_dependencies",
is_flag=True,
help=("Conda dependency resolution for Galaxy will copy dependencies "
"instead of attempting to link them.")
)
def conda_auto_install_option():
return planemo_option(
"--conda_auto_install/--no_conda_auto_install",
is_flag=True,
default=True,
help=("Conda dependency resolution for Galaxy will attempt to install "
"requested but missing packages.")
)
def conda_auto_init_option():
return planemo_option(
"--conda_auto_init/--no_conda_auto_init",
is_flag=True,
default=True,
help=("Conda dependency resolution for Galaxy will auto install "
"conda itself using miniconda if not availabe on conda_prefix.")
)
def conda_global_option():
return planemo_option(
"--global",
is_flag=True,
default=False,
help=("Install Conda dependencies globally instead of in requirement specific "
"environments packaged for tools. If the Conda bin directory is on your "
"PATH, tools may still use binaries but this is more designed for "
"interactive testing and debugging.")
)
def required_tool_arg(allow_uris=False):
""" Decorate click method as requiring the path to a single tool.
"""
arg_type_class = click.Path if not allow_uris else UriLike
arg_type = arg_type_class(
exists=True,
file_okay=True,
dir_okay=False,
readable=True,
resolve_path=True,
)
if allow_uris:
name = "uri"
metavar = "TOOL_URI"
else:
name = "path"
metavar = "TOOL_PATH"
return click.argument(name, metavar=metavar, type=arg_type)
def paste_test_data_paths_option():
return planemo_option(
"--paste_test_data_paths/--no_paste_test_data_paths",
is_flag=True,
default=None,
help=("By default Planemo will use or not use Galaxy's path paste option to load "
"test data into a history based on the engine type it is targeting. This can "
"override the logic to explicitly enable or disable path pasting.")
)
def required_workflow_arg():
arg_type = click.Path(
exists=True,
file_okay=True,
dir_okay=False,
readable=True,
resolve_path=False,
)
return click.argument("workflow_path", metavar="WORKFLOW_PATH", type=arg_type)
def required_job_arg():
"""Decorate click method as requiring the path to a single tool.
"""
arg_type = click.Path(
exists=True,
file_okay=True,
dir_okay=False,
readable=True,
resolve_path=False,
)
return click.argument("job_path", metavar="JOB_PATH", type=arg_type)
def _optional_tools_default(ctx, param, value):
if param.name in ["paths", "uris"] and len(value) == 0:
return [os.path.abspath(os.getcwd())]
else:
return value
def optional_tools_or_packages_arg(multiple=False):
""" Decorate click method as optionally taking in the path to a tool
or directory of tools or a Conda package. If no such argument is given
the current working directory will be treated as a directory of tools.
"""
name = "paths" if multiple else "path"
nargs = -1 if multiple else 1
return click.argument(
name,
metavar="TARGET",
nargs=nargs,
)
class UriLike(click.Path):
def convert(self, value, param, ctx):
if "://" in value:
return value
else:
return super(UriLike, self).convert(value, param, ctx)
def optional_tools_arg(multiple=False, allow_uris=False):
""" Decorate click method as optionally taking in the path to a tool
or directory of tools. If no such argument is given the current working
directory will be treated as a directory of tools.
"""
arg_type_class = click.Path if not allow_uris else UriLike
arg_type = arg_type_class(
exists=True,
file_okay=True,
dir_okay=True,
readable=True,
resolve_path=True,
)
if allow_uris:
name = "uris" if multiple else "uri"
else:
name = "paths" if multiple else "path"
nargs = -1 if multiple else 1
return click.argument(
name,
metavar="TOOL_PATH",
type=arg_type,
nargs=nargs,
callback=_optional_tools_default,
)
class ProjectOrRepositry(click.Path):
def __init__(self, **kwds):
super(ProjectOrRepositry, self).__init__(**kwds)
def convert(self, value, param, ctx):
if value and value.startswith("git:") or value.startswith("git+"):
return value
else:
return super(ProjectOrRepositry, self).convert(value, param, ctx)
def shed_project_arg(multiple=True):
arg_type = ProjectOrRepositry(
exists=True,
file_okay=False,
dir_okay=True,
resolve_path=True,
)
name = "paths" if multiple else "path"
nargs = -1 if multiple else 1
return click.argument(
name,
metavar="PROJECT",
type=arg_type,
nargs=nargs,
callback=_optional_tools_default,
)
def recipe_arg(multiple=True):
name = "paths" if multiple else "path"
nargs = -1 if multiple else 1
return click.argument(
name,
metavar="RECIPE_DIR",
type=click.Path(
exists=True,
file_okay=True,
dir_okay=True,
resolve_path=True,
),
nargs=nargs,
callback=_optional_tools_default,
)
def optional_project_arg(exists=True, default="."):
arg_type = click.Path(
exists=exists,
file_okay=False,
dir_okay=True,
writable=True,
resolve_path=True,
)
return click.argument(
"path",
metavar="PROJECT",
default=default,
type=arg_type
)
def no_cleanup_option():
return planemo_option(
"--no_cleanup",
is_flag=True,
help=("Do not cleanup temp files created for and by Galaxy.")
)
def docker_enable_option():
return planemo_option(
"--docker/--no_docker",
default=False,
help=("Run Galaxy tools in Docker if enabled.")
)
def docker_cmd_option():
return planemo_option(
"--docker_cmd",
default=docker_util.DEFAULT_DOCKER_COMMAND,
help="Command used to launch docker (defaults to docker)."
)
def docker_sudo_option():
return planemo_option(
"--docker_sudo/--no_docker_sudo",
is_flag=True,
help="Flag to use sudo when running docker."
)
def docker_sudo_cmd_option():
return planemo_option(
"--docker_sudo_cmd",
help="sudo command to use when --docker_sudo is enabled " +
"(defaults to sudo).",
default=docker_util.DEFAULT_SUDO_COMMAND,
use_global_config=True,
)
def docker_host_option():
return planemo_option(
"--docker_host",
help="Docker host to target when executing docker commands " +
"(defaults to localhost).",
use_global_config=True,
default=docker_util.DEFAULT_HOST,
)
def docker_config_options():
return _compose(
docker_cmd_option(),
docker_sudo_option(),
docker_host_option(),
docker_sudo_cmd_option(),
)
def galaxy_docker_options():
return _compose(
docker_enable_option(),
docker_config_options(),
)
def shed_owner_option():
return planemo_option(
"--owner",
help="Tool Shed repository owner (username)."
)
def shed_name_option():
return planemo_option(
"--name",
help="Tool Shed repository name (defaults to the inferred "
"tool directory name)."
)
def validate_shed_target_callback(ctx, param, value):
if value is None:
ctx.fail("default_shed_target set to None, must specify a value for "
"--shed_target to run this command.")
return value
def shed_target_option():
return planemo_option(
"-t",
"--shed_target",
help="Tool Shed to target (this can be 'toolshed', 'testtoolshed', "
"'local' (alias for http://localhost:9009/), an arbitrary url "
"or mappings defined ~/.planemo.yml.",
default=None,
use_global_config=True,
callback=validate_shed_target_callback,
)
def shed_key_option():
return planemo_option(
"--shed_key",
help=("API key for Tool Shed access. An API key is required unless "
"e-mail and password is specified. This key can be specified "
"with either --shed_key or --shed_key_from_env.")
)
def shed_key_from_env_option():
return planemo_option(
"--shed_key_from_env",
help="Environment variable to read API key for Tool Shed access from."
)
def shed_email_option():
return planemo_option(
"--shed_email",
help="E-mail for Tool Shed auth (required unless shed_key is "
"specified)."
)
def shed_password_option():
return planemo_option(
"--shed_password",
help="Password for Tool Shed auth (required unless shed_key is "
"specified)."
)
def shed_skip_upload():
return planemo_option(
"--skip_upload",
is_flag=True,
help=("Skip upload contents as part of operation, only update "
"metadata.")
)
def shed_skip_metadata():
return planemo_option(
"--skip_metadata",
is_flag=True,
help=("Skip metadata update as part of operation, only upload "
"new contents.")
)
def shed_message_option():
return planemo_option(
"-m",
"--message",
help="Commit message for tool shed upload."
)
def shed_force_create_option():
return planemo_option(
"--force_repository_creation",
help=("If a repository cannot be found for the specified user/repo "
"name pair, then automatically create the repository in the "
"toolshed."),
is_flag=True,
default=False
)
def shed_check_diff_option():
return planemo_option(
"--check_diff",
is_flag=True,
help=("Skip uploading if the shed_diff detects there would be no "
"'difference' (only attributes populated by the shed would "
"be updated.)")
)
def shed_upload_options():
return _compose(
shed_message_option(),
shed_force_create_option(),
shed_check_diff_option(),
)
def shed_realization_options():
return _compose(
shed_project_arg(multiple=True),
recursive_shed_option(),
shed_fail_fast_option(),
)
def shed_repo_options():
return _compose(
shed_owner_option(),
shed_name_option(),
)
def shed_publish_options():
""" Common options for commands that require publishing to a
a shed.
"""
return _compose(
shed_realization_options(),
shed_repo_options(),
shed_target_options(),
)
def shed_read_options():
""" Common options that require read access to mapped repositories
in a shed.
"""
return _compose(
shed_realization_options(),
shed_repo_options(),
shed_target_options(),
)
def shed_target_options():
""" Common options for commands that require read-only
interactions with a shed.
"""
return _compose(
shed_email_option(),
shed_key_option(),
shed_key_from_env_option(),
shed_password_option(),
shed_target_option(),
)
def conda_target_options(include_local=True):
return _compose(
conda_prefix_option(),
conda_exec_option(),
conda_debug_option(),
conda_ensure_channels_option(),
conda_use_local_option(),