Skip to content

Commit 6757700

Browse files
authored
[cli] split flags from commands (skypilot-org#6030)
* split flags from commands * format * format2 * format3 * this one should be passing CI * isort fix * flags * all-users flag
1 parent 869ba04 commit 6757700

File tree

11 files changed

+669
-748
lines changed

11 files changed

+669
-748
lines changed

docs/source/reference/cli.rst

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ Cluster CLI
77
-----------
88

99
.. _sky-launch:
10-
.. click:: sky.client.cli:launch
10+
.. click:: sky.client.cli.command:launch
1111
:prog: sky launch
1212
:nested: full
1313

1414
.. _sky-stop:
15-
.. click:: sky.client.cli:stop
15+
.. click:: sky.client.cli.command:stop
1616
:prog: sky stop
1717
:nested: full
1818

1919
.. _sky-start:
20-
.. click:: sky.client.cli:start
20+
.. click:: sky.client.cli.command:start
2121
:prog: sky start
2222
:nested: full
2323

2424
.. _sky-down:
25-
.. click:: sky.client.cli:down
25+
.. click:: sky.client.cli.command:down
2626
:prog: sky down
2727
:nested: full
2828

2929
.. _sky-status:
30-
.. click:: sky.client.cli:status
30+
.. click:: sky.client.cli.command:status
3131
:prog: sky status
3232
:nested: full
3333

3434
.. _sky-autostop:
35-
.. click:: sky.client.cli:autostop
35+
.. click:: sky.client.cli.command:autostop
3636
:prog: sky autostop
3737
:nested: full
3838

@@ -44,68 +44,68 @@ Cluster jobs CLI
4444
~~~~~~~~~~~~~~~~
4545

4646
.. _sky-exec:
47-
.. click:: sky.client.cli:exec
47+
.. click:: sky.client.cli.command:exec
4848
:prog: sky exec
4949
:nested: full
5050

5151
.. _sky-queue:
52-
.. click:: sky.client.cli:queue
52+
.. click:: sky.client.cli.command:queue
5353
:prog: sky queue
5454
:nested: full
5555

5656
.. _sky-cancel:
57-
.. click:: sky.client.cli:cancel
57+
.. click:: sky.client.cli.command:cancel
5858
:prog: sky cancel
5959
:nested: full
6060

6161
.. _sky-logs:
62-
.. click:: sky.client.cli:logs
62+
.. click:: sky.client.cli.command:logs
6363
:prog: sky logs
6464
:nested: full
6565

6666
Managed jobs CLI
6767
~~~~~~~~~~~~~~~~~
6868

6969
.. _sky-job-launch:
70-
.. click:: sky.client.cli:jobs_launch
70+
.. click:: sky.client.cli.command:jobs_launch
7171
:prog: sky jobs launch
7272
:nested: full
7373

7474
.. _sky-job-queue:
75-
.. click:: sky.client.cli:jobs_queue
75+
.. click:: sky.client.cli.command:jobs_queue
7676
:prog: sky jobs queue
7777
:nested: full
7878

7979
.. _sky-job-cancel:
80-
.. click:: sky.client.cli:jobs_cancel
80+
.. click:: sky.client.cli.command:jobs_cancel
8181
:prog: sky jobs cancel
8282
:nested: full
8383

8484
.. _sky-job-logs:
85-
.. click:: sky.client.cli:jobs_logs
85+
.. click:: sky.client.cli.command:jobs_logs
8686
:prog: sky jobs logs
8787
:nested: full
8888

8989
Serving CLI
9090
-------------
9191

92-
.. click:: sky.client.cli:serve_up
92+
.. click:: sky.client.cli.command:serve_up
9393
:prog: sky serve up
9494
:nested: full
9595

96-
.. click:: sky.client.cli:serve_down
96+
.. click:: sky.client.cli.command:serve_down
9797
:prog: sky serve down
9898
:nested: full
9999

100-
.. click:: sky.client.cli:serve_status
100+
.. click:: sky.client.cli.command:serve_status
101101
:prog: sky serve status
102102
:nested: full
103103

104-
.. click:: sky.client.cli:serve_logs
104+
.. click:: sky.client.cli.command:serve_logs
105105
:prog: sky serve logs
106106
:nested: full
107107

108-
.. click:: sky.client.cli:serve_update
108+
.. click:: sky.client.cli.command:serve_update
109109
:prog: sky serve update
110110
:nested: full
111111

@@ -114,12 +114,12 @@ Storage CLI
114114
------------
115115

116116
.. _sky-storage-ls:
117-
.. click:: sky.client.cli:storage_ls
117+
.. click:: sky.client.cli.command:storage_ls
118118
:prog: sky storage ls
119119
:nested: full
120120

121121
.. _sky-storage-delete:
122-
.. click:: sky.client.cli:storage_delete
122+
.. click:: sky.client.cli.command:storage_delete
123123
:prog: sky storage delete
124124
:nested: full
125125

@@ -130,38 +130,38 @@ API request CLI
130130
---------------
131131

132132
.. _sky-api-login:
133-
.. click:: sky.client.cli:api_login
133+
.. click:: sky.client.cli.command:api_login
134134
:prog: sky api login
135135
:nested: full
136136

137137
.. _sky-api-info:
138-
.. click:: sky.client.cli:api_info
138+
.. click:: sky.client.cli.command:api_info
139139
:prog: sky api info
140140
:nested: full
141141

142142
.. _sky-api-logs:
143-
.. click:: sky.client.cli:api_logs
143+
.. click:: sky.client.cli.command:api_logs
144144
:prog: sky api logs
145145
:nested: full
146146

147147
.. _sky-api-status:
148-
.. click:: sky.client.cli:api_status
148+
.. click:: sky.client.cli.command:api_status
149149
:prog: sky api status
150150
:nested: full
151151

152152
.. _sky-api-cancel:
153-
.. click:: sky.client.cli:api_cancel
153+
.. click:: sky.client.cli.command:api_cancel
154154
:prog: sky api cancel
155155
:nested: full
156156

157157
Admin CLI
158158
~~~~~~~~~
159159

160-
.. click:: sky.client.cli:api_stop
160+
.. click:: sky.client.cli.command:api_stop
161161
:prog: sky api stop
162162
:nested: full
163163

164-
.. click:: sky.client.cli:api_start
164+
.. click:: sky.client.cli.command:api_start
165165
:prog: sky api start
166166
:nested: full
167167

@@ -170,15 +170,15 @@ Utils: ``show-gpus``/``check``/``cost-report``
170170
-------------------------------------------------
171171

172172
.. _sky-show-gpus:
173-
.. click:: sky.client.cli:show_gpus
173+
.. click:: sky.client.cli.command:show_gpus
174174
:prog: sky show-gpus
175175
:nested: full
176176

177177
.. _sky-check:
178-
.. click:: sky.client.cli:check
178+
.. click:: sky.client.cli.command:check
179179
:prog: sky check
180180
:nested: full
181181

182-
.. click:: sky.client.cli:cost_report
182+
.. click:: sky.client.cli.command:cost_report
183183
:prog: sky cost-report
184184
:nested: full

sky/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""The 'sky' command line tool."""
22

3-
from sky.client import cli as cli_client
3+
from sky.client.cli import command
44

55

66
# For backward compatibility.
77
# setup.py uses this file to install the CLI.
88
def cli():
9-
cli_client.cli()
9+
command.cli()

sky/client/cli/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)