diff --git a/README.md b/README.md index c9cb8779b..54d865946 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/api/openapi.yaml b/api/openapi.yaml index 1b02e86c2..3287ee7f3 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -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: diff --git a/package.json b/package.json index 9dea88395..08ada0976 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pyproject.toml b/pyproject.toml index a974b5afe..2d06b5167 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/index.tsx b/src/index.tsx index 3612e2072..b8e93ae9e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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; } @@ -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( @@ -296,7 +296,7 @@ function activatePlugin( createJobModel: newCreateModel }); }, - label: trans.__('Create Notebook Job'), + label: trans.__('Create Job'), icon: calendarAddOnIcon }); @@ -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); @@ -320,7 +320,7 @@ function activatePlugin( createJobModel: newCreateModel }); }, - label: trans.__('Create a notebook job'), + label: trans.__('Create a job'), icon: calendarAddOnIcon }); @@ -359,7 +359,7 @@ function activatePlugin( jobsView: JobsView.ListJobs }); }, - label: trans.__('Notebook Jobs'), + label: trans.__('Jobs'), icon: eventNoteIcon }); diff --git a/src/mainviews/detail-view/detail-view.tsx b/src/mainviews/detail-view/detail-view.tsx index 42cc796d5..5d44a30c7 100644 --- a/src/mainviews/detail-view/detail-view.tsx +++ b/src/mainviews/detail-view/detail-view.tsx @@ -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')} {props.jobsView === JobsView.JobDetail diff --git a/src/mainviews/detail-view/job-definition.tsx b/src/mainviews/detail-view/job-definition.tsx index 3f1212d08..df458de8b 100644 --- a/src/mainviews/detail-view/job-definition.tsx +++ b/src/mainviews/detail-view/job-definition.tsx @@ -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.' )} /> diff --git a/src/mainviews/list-jobs.tsx b/src/mainviews/list-jobs.tsx index 1821d501d..b28461a5f 100644 --- a/src/mainviews/list-jobs.tsx +++ b/src/mainviews/list-jobs.tsx @@ -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] ); @@ -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] ); @@ -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] ); diff --git a/src/notebook-jobs-panel.tsx b/src/notebook-jobs-panel.tsx index 739d7cec3..016c73776 100644 --- a/src/notebook-jobs-panel.tsx +++ b/src/notebook-jobs-panel.tsx @@ -62,7 +62,7 @@ export class NotebookJobsPanel extends VDomRenderer { 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; @@ -72,7 +72,7 @@ export class NotebookJobsPanel extends VDomRenderer { 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 => { diff --git a/ui-tests/helpers/SchedulerHelper.ts b/ui-tests/helpers/SchedulerHelper.ts index 55f53e950..8e2897ef3 100644 --- a/ui-tests/helpers/SchedulerHelper.ts +++ b/ui-tests/helpers/SchedulerHelper.ts @@ -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', @@ -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); @@ -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); @@ -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(); } diff --git a/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/filebrowser-menu-linux.png b/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/filebrowser-menu-linux.png index d0e7b4845..e4d485134 100644 Binary files a/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/filebrowser-menu-linux.png and b/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/filebrowser-menu-linux.png differ diff --git a/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/launcher-linux.png b/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/launcher-linux.png index 41dd65d7d..35bd56b58 100644 Binary files a/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/launcher-linux.png and b/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/launcher-linux.png differ diff --git a/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/list-view-linux.png b/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/list-view-linux.png index e50a07aab..8a8fd8066 100644 Binary files a/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/list-view-linux.png and b/ui-tests/tests/jupyter_scheduler.spec.ts-snapshots/list-view-linux.png differ