Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

[![Github Actions Status](https://github.com/jupyter-server/jupyter-scheduler/workflows/Build/badge.svg)](https://github.com/jupyter-server/jupyter-scheduler/actions/workflows/build.yml)[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-server/jupyter-scheduler/main?urlpath=lab)

A JupyterLab extension for running notebook jobs. Documentation is available on
A JupyterLab extension for running jobs. Documentation is available on
[ReadTheDocs](https://jupyter-scheduler.readthedocs.io).

This extension is composed of a Python package named `jupyter_scheduler`
for the server extension and a NPM package named `@jupyterlab/scheduler`
for the frontend extension. Installation of this extension provides a
REST API to run, query, stop and delete
notebook jobs; the UI provides an interface to create, list and view job
REST API to run, query, stop and delete jobs; the UI provides an interface to create, list and view job
details.

## Requirements
Expand Down
2 changes: 1 addition & 1 deletion api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: Jupyter Scheduler API
version: 2.7.1
description: API for Jupyter Scheduler, a JupyterLab extension for running notebook jobs.
description: API for Jupyter Scheduler, a JupyterLab extension for running jobs.
servers:
- url: /scheduler
security:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jupyterlab/scheduler",
"version": "2.11.0",
"description": "A JupyterLab extension for running notebook jobs",
"description": "A JupyterLab extension for running jobs",
"keywords": [
"jupyter",
"jupyterlab",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "hatchling.build"
[project]
name = "jupyter_scheduler"
version = "2.11.0"
description = "A JupyterLab extension for running notebook jobs"
description = "A JupyterLab extension for running jobs"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.9"
Expand Down
12 changes: 6 additions & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function activatePlugin(
});
mainAreaWidget.id = NotebookJobsPanelId;
mainAreaWidget.title.icon = calendarMonthIcon;
mainAreaWidget.title.label = trans.__('Notebook Jobs');
mainAreaWidget.title.label = trans.__('Jobs');
mainAreaWidget.title.closable = true;
}

Expand Down Expand Up @@ -283,7 +283,7 @@ function activatePlugin(
const filePath =
getSelectedFilePath(widget, app.serviceManager.contents) ?? '';

// Update the job form inside the notebook jobs widget
// Update the job form inside the jobs widget
const newCreateModel = emptyCreateJobModel();
newCreateModel.inputFile = filePath;
newCreateModel.jobName = MakeNameValid(
Expand All @@ -296,7 +296,7 @@ function activatePlugin(
createJobModel: newCreateModel
});
},
label: trans.__('Create Notebook Job'),
label: trans.__('Create Job'),
icon: calendarAddOnIcon
});

Expand All @@ -309,7 +309,7 @@ function activatePlugin(
getSelectedFilePath(widget, app.serviceManager.contents) ?? '';
const fileName = getSelectedFileBaseName(widget) ?? '';

// Update the job form inside the notebook jobs widget
// Update the job form inside the jobs widget
const newCreateModel = emptyCreateJobModel();
newCreateModel.inputFile = filePath;
newCreateModel.jobName = MakeNameValid(fileName);
Expand All @@ -320,7 +320,7 @@ function activatePlugin(
createJobModel: newCreateModel
});
},
label: trans.__('Create a notebook job'),
label: trans.__('Create a job'),
icon: calendarAddOnIcon
});

Expand Down Expand Up @@ -359,7 +359,7 @@ function activatePlugin(
jobsView: JobsView.ListJobs
});
},
label: trans.__('Notebook Jobs'),
label: trans.__('Jobs'),
icon: eventNoteIcon
});

Expand Down
4 changes: 2 additions & 2 deletions src/mainviews/detail-view/detail-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export function DetailView(props: IDetailViewProps): JSX.Element {
}}
>
{props.jobsView === JobsView.JobDetail
? trans.__('Notebook Jobs')
: trans.__('Notebook Job Definitions')}
? trans.__('Jobs')
: trans.__('Job Definitions')}
</Link>
<Typography color="text.primary">
{props.jobsView === JobsView.JobDetail
Expand Down
2 changes: 1 addition & 1 deletion src/mainviews/detail-view/job-definition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export function JobDefinition(props: IJobDefinitionProps): JSX.Element {
jobDefinitionId={model.definitionId}
pageSize={5}
emptyRowMessage={trans.__(
'No notebook jobs associated with this job definition.'
'No jobs associated with this job definition.'
)}
/>
</Stack>
Expand Down
12 changes: 6 additions & 6 deletions src/mainviews/list-jobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ export function ListJobsTable(props: IListJobsTableProps): JSX.Element {
() =>
props.emptyRowMessage ??
trans.__(
'There are no notebook jobs. Notebook jobs run files in the background, immediately or on a schedule. ' +
'To create a notebook job, right-click on a notebook in the file browser and select "Create Notebook Job".'
'There are no jobs. Jobs run files in the background, immediately or on a schedule. ' +
'To create a job, right-click on a supported file in the file browser and select "Create Job".'
),
[props.emptyRowMessage, trans]
);
Expand Down Expand Up @@ -280,8 +280,8 @@ function ListJobDefinitionsTable(props: ListJobDefinitionsTableProps) {
const emptyRowMessage = useMemo(
() =>
trans.__(
'There are no notebook job definitions. Notebook job definitions run files in the background on a schedule. ' +
'To create a notebook job definition, right-click on a notebook in the file browser and select "Create Notebook Job".'
'There are no job definitions. Job definitions run files in the background on a schedule. ' +
'To create a job definition, right-click on a supported file in the file browser and select "Create Job".'
),
[trans]
);
Expand Down Expand Up @@ -324,9 +324,9 @@ export interface IListJobsProps {
export function NotebookJobsList(props: IListJobsProps): JSX.Element {
const trans = useTranslator('jupyterlab');

const jobsHeader = useMemo(() => trans.__('Notebook Jobs'), [trans]);
const jobsHeader = useMemo(() => trans.__('Jobs'), [trans]);
const jobDefinitionsHeader = useMemo(
() => trans.__('Notebook Job Definitions'),
() => trans.__('Job Definitions'),
[trans]
);

Expand Down
4 changes: 2 additions & 2 deletions src/notebook-jobs-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class NotebookJobsPanel extends VDomRenderer<JobsModel> {
const trans = options.translator.load('jupyterlab');

this.title.icon = options.titleIcon ?? calendarMonthIcon;
this.title.caption = options.title ?? trans.__('Notebook Jobs');
this.title.caption = options.title ?? trans.__('Jobs');
this._description = options.description ?? trans.__('Job Runs');
this._app = options.app;
this._translator = options.translator;
Expand All @@ -72,7 +72,7 @@ export class NotebookJobsPanel extends VDomRenderer<JobsModel> {
this._last_input_drop_target = null;

this.node.setAttribute('role', 'region');
this.node.setAttribute('aria-label', trans.__('Notebook Jobs'));
this.node.setAttribute('aria-label', trans.__('Jobs'));
}

removeDragHoverClass = (event: Event): void => {
Expand Down
10 changes: 5 additions & 5 deletions ui-tests/helpers/SchedulerHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type { Locator, TestInfo } from '@playwright/test';

enum SELECTORS {
// tbutton = toolbar button
CREATE_JOB_TBUTTON = 'button.jp-ToolbarButtonComponent[data-command="scheduling:create-from-notebook"][title="Create a notebook job"]',
LAUNCHER_CARD = 'div.jp-LauncherCard[title="Notebook Jobs"]',
CREATE_JOB_TBUTTON = 'button.jp-ToolbarButtonComponent[data-command="scheduling:create-from-notebook"][title="Create a job"]',
LAUNCHER_CARD = 'div.jp-LauncherCard[title="Jobs"]',
LIST_VIEW_TIMES = 'td.MuiTableCell-body:has-text(" AM"), td.MuiTableCell-body:has-text(" PM")',
NOTEBOOK_TOOLBAR = '.jp-NotebookPanel-toolbar[aria-label="notebook actions"]',
ENABLE_DEBUGGER_TBUTTON = '.jp-DebuggerBugButton',
Expand Down Expand Up @@ -54,7 +54,7 @@ export class SchedulerHelper {
) {}

/**
* JupyterLab launcher "Notebook Jobs" card locator
* JupyterLab launcher "Jobs" card locator
*/
get launcherCard() {
return this.page.locator(SELECTORS.LAUNCHER_CARD);
Expand All @@ -68,7 +68,7 @@ export class SchedulerHelper {
}

/**
* Locates "Create a notebook job" button in notebook toolbar
* Locates "Create a job" button in notebook toolbar
*/
get createJobTbutton() {
return this.page.locator(SELECTORS.CREATE_JOB_TBUTTON);
Expand Down Expand Up @@ -124,7 +124,7 @@ export class SchedulerHelper {
async openCreateJobFromFilebrowser() {
await this.page.sidebar.openTab('filebrowser');
await this.notebookFbListing.click({ button: 'right' });
await this.page.getByText('Create Notebook Job').click();
await this.page.getByText('Create Job').click();
await this._waitForCreateJobLoaded();
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading