Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
znorman-harris committed Dec 19, 2023
2 parents 3ea1737 + a05eb33 commit cc9cfe1
Show file tree
Hide file tree
Showing 42 changed files with 247 additions and 206 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ Code style revamp! We reworked how routines, routine methods, properties, and st

- When generating ENVI and IDL tasks, using our new case libraries, we attempt to make a pretty display name from parameter names. For example converting the keyword "my_keyword" to "My Keyword". This applied to task and parameter display names.

## 4.2.2 December 2023

Resolved a performance issue with notebooks where auto-complete and hover help would take a while to return if you have been making many edits in a short amount of time

Fixed an issue with semantic tokens not showing up like they should.

Tweaked the styling for PDF generation to have output cells look a little different than input.

## 4.2.1 December 2023

Fixed an issue where logs were sharing too much information and other logs were not properly reporting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,4 @@ export const BreakPointStepInStepOut: RunnerFunction = async (init) => {

// reset
await init.debug.adapter.evaluate('.reset');

// close editor
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);

// pause momentarily
await Sleep(DEBUG_PAUSE);

// verify we cleaned up
expect(GetActivePROCodeWindow(false)).toBeUndefined();
};
11 changes: 1 addition & 10 deletions apps/client-e2e/src/tests/debugging/compile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CleanIDLOutput } from '@idl/idl';
import { IDL_COMMANDS } from '@idl/shared';
import { Sleep } from '@idl/test-helpers';
import { GetActivePROCodeWindow, VSCODE_COMMANDS } from '@idl/vscode/shared';
import { GetActivePROCodeWindow } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';

Expand Down Expand Up @@ -42,13 +42,4 @@ export const Compile: RunnerFunction = async (init) => {

// make sure it is the plot file
expect(editor.uri.fsPath.endsWith('plot.pro')).toBeTruthy();

// close editor
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);

// pause momentarily
await Sleep(DEBUG_PAUSE);

// verify we cleaned up
expect(GetActivePROCodeWindow(false)).toBeUndefined();
};
9 changes: 0 additions & 9 deletions apps/client-e2e/src/tests/debugging/continue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,4 @@ export const Continue: RunnerFunction = async (init) => {
// wait a little bit
await Sleep(DEBUG_PAUSE);
}

// close editor
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);

// pause momentarily
await Sleep(DEBUG_PAUSE);

// verify we cleaned up
expect(GetActivePROCodeWindow(false)).toBeUndefined();
};
11 changes: 1 addition & 10 deletions apps/client-e2e/src/tests/debugging/edit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IDL_COMMANDS } from '@idl/shared';
import { Sleep } from '@idl/test-helpers';
import { GetActivePROCodeWindow, VSCODE_COMMANDS } from '@idl/vscode/shared';
import { GetActivePROCodeWindow } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';

Expand Down Expand Up @@ -36,13 +36,4 @@ export const Edit: RunnerFunction = async (init) => {

// make sure it is the plot file
expect(editor.uri.fsPath.endsWith('plot.pro')).toBeTruthy();

// close editor
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);

// pause momentarily
await Sleep(DEBUG_PAUSE);

// verify we cleaned up
expect(GetActivePROCodeWindow(false)).toBeUndefined();
};
13 changes: 10 additions & 3 deletions apps/client-e2e/src/tests/interactions/_interactions-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { Runner } from '../runner.class';
import { AddDocs } from './add-docs';
import { IDLJSONInteractRight } from './idl-json-interact-right';
import { IndexIDLFolderRightAndOpenEditClose } from './index-idl-folder-right-and-open-edit-close';
import { NotebookProblemsTrackRight } from './notebook-problems-track-right';
import { NotebookCompletionBasic } from './notebooks-completion-basic';
import { NotebooksInteractRight } from './notebooks-interact-right';
import { NotebooksNoDuplicates } from './notebooks-no-duplicates';
import { NotebooksNoDuplicateRoutines } from './notebooks-no-duplicate-routines';
import { ProCodeInteractRight } from './pro-code-interacts-right';
import { TasksInteractRight } from './tasks-interact-right';

Expand Down Expand Up @@ -56,12 +57,18 @@ INTERACTIONS_RUNNER.addTest({
});

INTERACTIONS_RUNNER.addTest({
name: 'Notebook problems track right',
fn: NotebooksNoDuplicates,
name: 'No duplicate routine definition problems',
fn: NotebooksNoDuplicateRoutines,
});

INTERACTIONS_RUNNER.addTest({
name: 'Verify notebook auto-complete passes basic tests',
fn: NotebookCompletionBasic,
critical: true,
});

// notebook problems track right
INTERACTIONS_RUNNER.addTest({
name: 'Notebook problems track right',
fn: NotebookProblemsTrackRight,
});
9 changes: 1 addition & 8 deletions apps/client-e2e/src/tests/interactions/add-docs.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { GetExtensionPath, IDL_COMMANDS, Sleep } from '@idl/shared';
import {
OpenFileInVSCode,
ReplaceDocumentContent,
VSCODE_COMMANDS,
} from '@idl/vscode/shared';
import { OpenFileInVSCode, ReplaceDocumentContent } from '@idl/vscode/shared';
import expect from 'expect';
import { readFileSync } from 'fs';
import * as vscode from 'vscode';
Expand Down Expand Up @@ -60,7 +56,4 @@ export const AddDocs: RunnerFunction = async (init) => {
'utf-8'
)
);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import {
OpenFileInVSCode,
ReplaceDocumentContent,
VSCODE_COMMANDS,
} from '@idl/vscode/shared';
import { OpenFileInVSCode, ReplaceDocumentContent } from '@idl/vscode/shared';
import expect from 'expect';
import { readFileSync } from 'fs';
import * as vscode from 'vscode';
Expand Down Expand Up @@ -76,10 +72,4 @@ export const IDLJSONInteractRight: RunnerFunction = async (init) => {
'textDocument/semanticTokens/full',
tokenParams
);

// short pause
await Sleep(250);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import { OpenNotebookInVSCode, VSCODE_COMMANDS } from '@idl/vscode/shared';
import { OpenNotebookInVSCode } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';

Expand Down Expand Up @@ -47,7 +47,4 @@ export const NotebookProblemsTrackRight: RunnerFunction = async (init) => {
.getCells()
.map((cell) => vscode.languages.getDiagnostics(cell.document.uri).length)
).toEqual([0, 3]);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import { OpenNotebookInVSCode, VSCODE_COMMANDS } from '@idl/vscode/shared';
import { OpenNotebookInVSCode } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';
import {
CompletionItem as LanguageServerCompletionItem,
TextDocumentPositionParams,
Expand Down Expand Up @@ -67,7 +66,4 @@ export const NotebookCompletionBasic: RunnerFunction = async (init) => {
// verify definition has return
expect(completion2).toStrictEqual(expect.any(Array));
expect(completion2.length).not.toEqual(0);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
};
26 changes: 11 additions & 15 deletions apps/client-e2e/src/tests/interactions/notebooks-interact-right.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import { OpenNotebookInVSCode, VSCODE_COMMANDS } from '@idl/vscode/shared';
import { GetExtensionPath } from '@idl/shared';
import { OpenNotebookInVSCode } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';
import {
SemanticTokens,
SemanticTokensParams,
TextDocumentPositionParams,
} from 'vscode-languageserver';
Expand Down Expand Up @@ -83,17 +83,13 @@ export const NotebooksInteractRight: RunnerFunction = async (init) => {
},
};

// verify semantic tokens (have none in NB, so get none)
// verify semantic tokens
expect(
await init.client.client.sendRequest(
'textDocument/semanticTokens/full',
tokenParams
)
).toEqual({ data: [] });

// short pause
await Sleep(250);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
(
(await init.client.client.sendRequest(
'textDocument/semanticTokens/full',
tokenParams
)) as SemanticTokens
).data
).toEqual([8, 0, 11, 0, 0]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { RunnerFunction } from '../runner.interface';
/**
* Verifies
*/
export const NotebooksNoDuplicates: RunnerFunction = async (init) => {
export const NotebooksNoDuplicateRoutines: RunnerFunction = async (init) => {
const doc = await OpenNotebookInVSCode(
GetExtensionPath('idl/test/client-e2e/notebooks/problems-before.idlnb')
);

// short pause
await Sleep(250);
await Sleep(500);

/**
* Get first cell which is code
Expand All @@ -30,13 +30,13 @@ export const NotebooksNoDuplicates: RunnerFunction = async (init) => {
await vscode.commands.executeCommand(VSCODE_COMMANDS.NOTEBOOK_FOCUS_TOP);

// short pause
await Sleep(250);
await Sleep(500);

// delete the first cell
await vscode.commands.executeCommand(VSCODE_COMMANDS.NOTEBOOK_CELL_DELETE);

// short pause
await Sleep(250);
await Sleep(500);

/**
* Get first cell which is code
Expand All @@ -57,7 +57,7 @@ export const NotebooksNoDuplicates: RunnerFunction = async (init) => {
);

// short pause
await Sleep(250);
await Sleep(500);

/**
* Get second cell again
Expand All @@ -73,7 +73,4 @@ export const NotebooksNoDuplicates: RunnerFunction = async (init) => {

// verify problems
expect(nAfterRound2).toEqual(nOrig);

// close
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
};
26 changes: 11 additions & 15 deletions apps/client-e2e/src/tests/interactions/pro-code-interacts-right.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import { OpenFileInVSCode, VSCODE_COMMANDS } from '@idl/vscode/shared';
import { GetExtensionPath } from '@idl/shared';
import { OpenFileInVSCode } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';
import {
SemanticTokens,
SemanticTokensParams,
TextDocumentPositionParams,
} from 'vscode-languageserver';
Expand Down Expand Up @@ -76,17 +76,13 @@ export const ProCodeInteractRight: RunnerFunction = async (init) => {
},
};

// verify semantic tokens (have none in code, so get none)
// verify semantic tokens
expect(
await init.client.client.sendRequest(
'textDocument/semanticTokens/full',
tokenParams
)
).toEqual({ data: [] });

// short pause
await Sleep(250);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
(
(await init.client.client.sendRequest(
'textDocument/semanticTokens/full',
tokenParams
)) as SemanticTokens
).data
).toEqual([10, 0, 11, 0, 0]);
};
12 changes: 1 addition & 11 deletions apps/client-e2e/src/tests/interactions/tasks-interact-right.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import {
OpenFileInVSCode,
ReplaceDocumentContent,
VSCODE_COMMANDS,
} from '@idl/vscode/shared';
import { OpenFileInVSCode, ReplaceDocumentContent } from '@idl/vscode/shared';
import expect from 'expect';
import { readFileSync } from 'fs';
import * as vscode from 'vscode';
Expand Down Expand Up @@ -76,10 +72,4 @@ export const TasksInteractRight: RunnerFunction = async (init) => {
'textDocument/semanticTokens/full',
tokenParams
);

// short pause
await Sleep(250);

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
};
7 changes: 0 additions & 7 deletions apps/client-e2e/src/tests/notebooks/_notebook-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Runner } from '../runner.class';
import { NewNotebook } from './new-notebook';
import { NotebookFormats_1_0_0 } from './notebook-formats-1.0.0';
import { NotebookFormats_2_0_0 } from './notebook-formats-2.0.0';
import { NotebookProblemsTrackRight } from './notebook-problems-track-right';
import { RunNotebookReset } from './notebook-reset';
import { RunNotebookStop } from './notebook-stop';
import { NotebookToProCodeAllCells } from './notebook-to-pro-code-all-cells';
Expand Down Expand Up @@ -146,9 +145,3 @@ NOTEBOOK_RUNNER.addTest({
name: 'Verify quiet mode for notebooks',
fn: VerifyQuietNotebookSetting,
});

// notebook problems track right
NOTEBOOK_RUNNER.addTest({
name: 'Notebook problems track right',
fn: NotebookProblemsTrackRight,
});
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,4 @@ export async function RunNotebookAndCompareCells(

// save again
await nb.save();

// clear any existing outputs
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);
}
10 changes: 0 additions & 10 deletions apps/client-e2e/src/tests/notebooks/new-notebook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { IDL_COMMANDS, IDL_NOTEBOOK_LANGUAGE_NAME, Sleep } from '@idl/shared';
import { VSCODE_COMMANDS } from '@idl/vscode/shared';
import expect from 'expect';
import * as vscode from 'vscode';

Expand All @@ -23,13 +22,4 @@ export const NewNotebook: RunnerFunction = async (init) => {

// make sure we have an IDL Notebook as our editor
expect(editor?.notebook?.notebookType).toEqual(IDL_NOTEBOOK_LANGUAGE_NAME);

// close
await vscode.commands.executeCommand(VSCODE_COMMANDS.CLOSE_EDITOR);

// pause momentarily
await Sleep(100);

// verify we cleaned up
expect(vscode.window.activeNotebookEditor).toBeUndefined();
};
Loading

0 comments on commit cc9cfe1

Please sign in to comment.