Skip to content

Commit 13626b3

Browse files
committed
Added multi-node queue and fixed some styling issues
1 parent da52a37 commit 13626b3

File tree

5 files changed

+78
-30
lines changed

5 files changed

+78
-30
lines changed

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def pytest_addoption(parser):
5555
help='Maximum age, in hours, of tests to keep saved.')
5656
parser.addoption('--id', action='store', default='hostname',
5757
help='An identifier for this site to attach to tests when aggregated.')
58-
parser.addoption('--server-url', action='store', default='https://testing.exaworks.org',
58+
parser.addoption('--server-url', action='store', default='https://testing.psij.io',
5959
help='The base URL of the test aggregation server.')
6060
parser.addoption('--key', action='store', default='random',
6161
help='A secret to use when communicating to the aggregation server.')
@@ -67,6 +67,8 @@ def pytest_addoption(parser):
6767
help='Pretend that the current git branch is this value.')
6868
parser.addoption('--queue-name', action='store', default=None,
6969
help='A queue to run the batch jobs in.')
70+
parser.addoption('--multi-node-queue-name', action='store', default=None,
71+
help='An optional queue to run multi-node batch jobs in.')
7072
parser.addoption('--project-name', action='store', default=None,
7173
help='A project/account name to associate the batch jobs with.')
7274
parser.addoption('--account', action='store', default=None,
@@ -176,6 +178,7 @@ def pytest_generate_tests(metafunc):
176178
etps = []
177179
for x in _get_executors((metafunc.config)):
178180
etp = ExecutorTestParams(x, queue_name=options.queue_name,
181+
multi_node_queue_name=options.multi_node_queue_name,
179182
account=_get_account(options),
180183
custom_attributes_raw=options.custom_attributes)
181184
etps.append(etp)

tests/installer/panels/batch_scheduler_panel.py

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -238,33 +238,39 @@ def _build_widgets(self) -> Widget:
238238
('PBS', 'pbs'), ('LSF', 'lsf'), ('Cobalt', 'cobalt')],
239239
id='batch-selector',
240240
allow_blank=False),
241-
classes='form-col-3 form-row'
241+
classes='bs-col-1 form-row', id='batch-selector-col'
242242
),
243+
Vertical(
244+
Label('Account/project:', classes='form-label'),
245+
Input(id='account-input'),
246+
classes='bs-col-2 form-row batch-valid'
247+
),
248+
classes='w-100 form-row', id='batch-system-group-1'
249+
),
250+
Horizontal(
243251
Vertical(
244252
Label('Queue:', classes='form-label'),
245253
Input(id='queue-input'),
246-
classes='form-col-3 form-row batch-valid'
254+
classes='bs-col-1 form-row batch-valid'
247255
),
248256
Vertical(
249-
Label('Account/project:', classes='form-label'),
250-
Input(id='account-input'),
251-
classes='form-col-3 form-row batch-valid'
257+
Label('Multi-node queue:', classes='form-label'),
258+
Input(id='mqueue-input'),
259+
classes='bs-col-2 form-row batch-valid'
252260
),
253-
classes='w-100 form-row', id='batch-system-group'
261+
Checkbox('Run [b bright_yellow]t[/b bright_yellow]est job',
262+
id='cb-run-test-job', classes='bs-col-3 m-t-1 batch-valid'),
263+
classes='w-100 form-row', id='batch-system-group-2'
254264
),
255265
Horizontal(
256266
Vertical(
257267
Label('Custom attributes:', classes='form-label'),
258-
TextArea('', id='custom-attrs', read_only=True, soft_wrap=False),
259-
id='attr-cell',
260-
classes='form-col-2 h-auto'
268+
ShortcutButton('&Edit attrs.', id='btn-edit-attrs'),
269+
classes='bs-col-1 h-auto'
261270
),
262271
Vertical(
263-
Label('', classes='form-label'),
264-
ShortcutButton('&Edit attributes', id='btn-edit-attrs'),
265-
Checkbox('Run [b bright_yellow]t[/b bright_yellow]est job',
266-
id='cb-run-test-job', classes='m-t-1'),
267-
classes='form-col-2 h-auto'
272+
TextArea('', id='custom-attrs', read_only=True, soft_wrap=False),
273+
classes='bs-col-23 h-auto'
268274
),
269275
classes='w-100 h-auto batch-valid'
270276
),
@@ -315,20 +321,28 @@ def batch_system_selected(self) -> None:
315321
if sched == 'local':
316322
self.app._focus_next() # type: ignore
317323
else:
318-
self.get_widget_by_id('queue-input').focus()
324+
self.get_widget_by_id('account-input').focus()
319325

320326
def set_scheduler(self, name: str) -> None:
321327
selector = self.get_widget_by_id('batch-selector')
322328
assert isinstance(selector, Select)
323329
selector.value = name
324330

325-
@on(Input.Submitted, '#queue-input')
326-
def queue_submitted(self) -> None:
327-
bottom = self.get_widget_by_id('account-input')
328-
bottom.focus()
329-
330331
@on(Input.Submitted, '#account-input')
331332
def account_submitted(self) -> None:
333+
next = self.get_widget_by_id('queue-input')
334+
next.focus()
335+
336+
@on(Input.Submitted, '#queue-input')
337+
def queue_submitted(self, event: Input.Submitted) -> None:
338+
next = self.get_widget_by_id('mqueue-input')
339+
assert isinstance(next, Input)
340+
if next.value == '':
341+
next.value = event.input.value
342+
next.focus()
343+
344+
@on(Input.Submitted, '#mqueue-input')
345+
def mqueue_submitted(self) -> None:
332346
self.app._focus_next() # type: ignore
333347

334348
@on(Button.Pressed, '#btn-edit-attrs')
@@ -368,8 +382,7 @@ async def _run_test_job(self, jd: TestJobsDialog, job_no: int, label: str,
368382
rspec: Optional[ResourceSpecV1], test_name: str) -> bool:
369383
try:
370384
jd.set_running(job_no)
371-
await asyncio.sleep(2)
372-
385+
await asyncio.sleep(0.5)
373386
job = self._launch_job(test_name, rspec)
374387

375388
await self._wait_for_queued_state(job)

tests/installer/panels/intro_panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _build_widgets(self) -> Widget:
2222

2323
@property
2424
def label(self) -> str:
25-
return 'Introduction'
25+
return 'Welcome'
2626

2727
@property
2828
def name(self) -> str:

tests/installer/panels/schedule_panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _build_widgets(self) -> Widget:
7171
classes='h-auto m-b-1'
7272
),
7373
Vertical(
74-
Label('Preview', classes='form-label'),
74+
Label('Preview:', classes='form-label'),
7575
TextArea('-', id='method-preview', classes='', language='bash',
7676
read_only=True, disabled=True),
7777
classes='form-row h-auto'

tests/installer/style.tcss

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ ToggleButton .toggle--button {
157157
}
158158

159159
App.no-unicode ToggleButton .toggle--button {
160-
background: #000060;
160+
color: black;
161+
background: transparent;
161162
}
162163

163164
ToggleButton.-on .toggle--button {
@@ -169,9 +170,8 @@ App.no-unicode ToggleButton.-on .toggle--button {
169170
color: #00ff00;
170171
}
171172

172-
173173
ToggleButton:focus .toggle--button {
174-
background: #0040a0;
174+
background: #606060;
175175
}
176176

177177
ToggleButton.-on:focus .toggle--button {
@@ -276,7 +276,7 @@ LoadingIndicator {
276276
}
277277

278278
App.small #sidebar {
279-
min-width: 16;
279+
min-width: 14;
280280
padding-left: 1;
281281
padding-top: 1;
282282
}
@@ -522,6 +522,10 @@ App.small .form-label {
522522
margin-bottom: 0;
523523
}
524524

525+
#batch-selector-col {
526+
min-width: 18;
527+
}
528+
525529
#warn-no-batch {
526530
height: auto;
527531
}
@@ -530,12 +534,34 @@ App.small .form-label {
530534
padding-top: 2;
531535
}
532536

537+
.bs-col-1 {
538+
width: 36%;
539+
}
540+
541+
.bs-col-2 {
542+
width: 30%;
543+
}
544+
545+
.bs-col-3 {
546+
width: 34%;
547+
}
548+
549+
.bs-col-23 {
550+
width: 64%;
551+
}
552+
533553
.form-col-3 {
534554
width: 33%;
535555
margin-right: 1;
536556
margin-bottom: 1;
537557
}
538558

559+
.form-col-4 {
560+
width: 25%;
561+
margin-right: 0;
562+
margin-bottom: 1;
563+
}
564+
539565
.form-col-2 {
540566
width: 50%;
541567
margin-right: 2;
@@ -554,14 +580,20 @@ App.small .form-label {
554580
margin-right: 2;
555581
}
556582

583+
#btn-edit-attrs {
584+
margin-right: 1;
585+
width: 100%;
586+
}
587+
557588
#custom-attrs {
558589
background: #002040;
559-
height: 7;
590+
height: 5;
560591
overflow-x: auto;
561592
overflow-y: auto;
562593
padding: 0;
563594
border: none;
564595
color: #c0c0c0;
596+
border-left: tall #002040;
565597
}
566598

567599
.form-row {

0 commit comments

Comments
 (0)