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 Mar 6, 2024
2 parents 4d84116 + c61c127 commit c4e1394
Show file tree
Hide file tree
Showing 59 changed files with 1,192 additions and 252 deletions.
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dist/apps/vscode-e2e-runner/**
extension/dev-docs/**
extension/docs/**
extension/language/syntaxes/src/**
extension/language/syntaxes/GENERATING_JSON_FILES.md
extension/language/syntaxes/idl-log.tmLanguage.json
extension/language/syntaxes/idl.tmLanguage.json
extension/README.md
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Added the ability to convert a notebook to a PDF! This requires an additional ex

- You do need to save your notebook to disk so we have a path to write the Markdown and PDF files

## Unreleased

Fixed an issue where the names of ENVI and IDL tasks were incorrectly lower-case instead of what the user had specified in the task files.

## 4.3.1 February 2024

Resolved an issue where the language server would take a while to startup when you didn't have any workspace folders open. It should be almost instantaneous now!
Expand All @@ -42,7 +46,7 @@ Added more controls to help fine-tune problem reporting and be able to disable i

- Added an IDL comment-based API to control how problems are reported for files and lines of IDL code

- Added a new preference that wil disable problem reporting altogether
- Added a new preference that will disable problem reporting altogether

Update documentation for all problem codes to point to our configuration guide for how to disable problems

Expand Down
11 changes: 8 additions & 3 deletions apps/idl-docs-parser/src/helpers/routine-to-global.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GlobalDisplayNameLookup, IGlobalFromIDL } from '@idl/parsing/routines';
import { DocsToMarkdown, MARKDOWN_TYPE_LOOKUP } from '@idl/parsing/syntax-tree';
import { HostedDocsURLFromLocal } from '@idl/shared';
import { ResolveProductDocsURL } from '@idl/shared';
import {
DEFAULT_DATA_TYPE,
GLOBAL_TOKEN_SOURCE_LOOKUP,
Expand Down Expand Up @@ -295,7 +295,7 @@ export async function RoutineToGlobal(
}

// make the URL for our online docs
const url = HostedDocsURLFromLocal(r.link);
const url = ResolveProductDocsURL(r.link);

// get our parsed content
const routine = parsed[keyName];
Expand Down Expand Up @@ -807,7 +807,7 @@ export async function RoutineToGlobal(
}
}

if (!(useName in STRUCTURE_SKIPS)) {
if (!(useName in STRUCTURE_SKIPS) && !useName.includes('::')) {
// initialize our metadata
const struct: IGlobalIndexedToken<GlobalStructureToken> = {
type: GLOBAL_TOKEN_TYPES.STRUCTURE,
Expand Down Expand Up @@ -848,6 +848,11 @@ export async function RoutineToGlobal(
export function RoutineToGlobalAddMissingStructures(global: GlobalTokens) {
const keys = Object.keys(ADD_STRUCTURES);
for (let i = 0; i < keys.length; i++) {
// skip if not a real structure
if (keys[i].includes('::')) {
continue;
}

// initialize our metadata
const struct: IGlobalIndexedToken<GlobalStructureToken> = {
type: GLOBAL_TOKEN_TYPES.STRUCTURE,
Expand Down
47 changes: 31 additions & 16 deletions apps/sandbox/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,57 @@ import { IDLDocsExporter } from '@idl/docs/exporter';
import { LogManager } from '@idl/logger';
import { IDLIndex } from '@idl/parsing/index';
import { GetExtensionPath } from '@idl/shared';

// create our index
const index = new IDLIndex(
new LogManager({
alert: () => {
// do nothing
},
}),
0,
false
);
import { performance } from 'perf_hooks';

/** Get the folder with code in it */
const codeDir = GetExtensionPath('idl/vscode');
// const codeDir = GetExtensionPath('idl/vscode');
const codeDir = 'C:\\Users\\znorman\\Documents\\idl\\EC-AnalystToolbox';

/** Specify the folder that we export to */
const outDir = GetExtensionPath('extension/docs');

/** Glob patterns we match against */
const matches: string[] = ['**/idl/vscode*'];
const matches: string[] = [];

/** Glob patterns we exclude files from */
const exclude: string[] = [
'**/idl/vscode/notebooks/envi/helpers/*',
'**/idl/vscode/notebooks/idlnotebook/*',
// '**/idl/vscode/notebooks/envi/helpers/*',
// '**/idl/vscode/notebooks/idlnotebook/*',
];

/** Do we export everything? */
const exportEverything = false;

/**
* Main routine
*/
async function main() {
// create our index
const index = new IDLIndex(
new LogManager({
alert: () => {
// do nothing
},
}),
0,
true
);

/** Index the folder */
await index.indexWorkspace([codeDir], false);

/** Export */
await IDLDocsExporter(index, outDir, matches, exclude);
const t0 = performance.now();
console.log('Exporting....');
await IDLDocsExporter(
index,
codeDir,
outDir,
matches,
exclude,
exportEverything
);
console.log(` Exported in ${performance.now() - t0} ms`);
}

main()
Expand Down
11 changes: 11 additions & 0 deletions extension/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ export default defineConfig({
},
],

[
'script',
{
async: true,
src: 'https://play.vidyard.com/embed/v4.js',
},
],

['script', {}, SCRIPT],
],

Expand All @@ -65,6 +73,9 @@ export default defineConfig({
infoLabel: 'Information',
},

// line numbers in code blocks or not
lineNumbers: true,

/**
* Code themes: https://shiki.style/themes#special-themes
*/
Expand Down
28 changes: 28 additions & 0 deletions extension/docs/code-comments/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,31 @@ end
```

:::

## Embedding Examples

All comments are interpreted as Markdown which needs special markup for PRO code to embed examples that appear in hover help and notebook creation.

You have to use a Markdown code block, indicated with three backticks, within your docs. See the highlighted code below with an example of what this looks like.

````idl{4,5,6,7,8,9}
;+
; :Returns: Number
;
; :Examples:
; See this cool code example:
;
; ```idl
; p = plot(/test)
; ```
;
; :Arguments:
; event: bidirectional, required, any
; Placeholder docs for argument, keyword, or property
;
;-
function MyFunc, event
compile_opt idl2, hidden
return, 42
end
````
2 changes: 2 additions & 0 deletions extension/docs/getting-started/quick_links.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Here are some helpful links!

## IDL for VSCode and Product Help

[Getting Started Webinar](https://www.nv5geospatialsoftware.com/Company/Events/Events-Detail/ArtMID/19015/ArticleID/24433/Reimagine-the-Way-You-Program-with-IDL-for-VSCode)

[File a Bug](https://github.com/interactive-data-language/vscode-idl/issues/new/choose)

[Ask a Question or Start a Discussion](https://github.com/interactive-data-language/vscode-idl/discussions/new/choose)
Expand Down
3 changes: 3 additions & 0 deletions extension/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ hero:
- theme: brand
text: Let's go!
link: /getting-started/
- theme: brand
text: Join the upcoming webinar!
link: https://www.nv5geospatialsoftware.com/Company/Events/Events-Detail/ArtMID/19015/ArticleID/24433/Reimagine-the-Way-You-Program-with-IDL-for-VSCode

features:
- title: Modern User Experience
Expand Down
12 changes: 11 additions & 1 deletion extension/docs/notebooks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ If you are new to notebooks, they are:

- A way that you can share code with your colleagues and friends

Here's a short video introducing IDL Notebooks (requires internet access).

<img style="width: 100%; margin: auto; display: block;" class="vidyard-player-embed" src="https://play.vidyard.com/ZdFrzw2XcDwjySetxjVJ1x.jpg" data-uuid="ZdFrzw2XcDwjySetxjVJ1x" data-v="4" data-type="inline" />

::: tip
With the latest release of VSCode, you can now pop open notebooks in separate windows.

Expand All @@ -20,7 +24,7 @@ If you are interested in being able to run more than one notebook at a time, let

## Getting Started with Notebooks

The easiest way to get started with IDL or ENVI Notebooks is through VSCode.
The easiest way to get started with IDL or ENVI Notebooks is through VSCode, which includes several example notebooks.

Here's how:

Expand All @@ -30,6 +34,12 @@ Here's how:

3. Select "Open IDL Notebook Example" or "Open ENVI Notebook Example" to open a new notebook that you can play around with.

## In-Depth Tutorial

Here's a longer video talking more about how to use IDL Notebooks and it covers some of the more advanced ENVI APIs to display imagery and other types of data (requires internet access).

<img style="width: 100%; margin: auto; display: block;" class="vidyard-player-embed" src="https://play.vidyard.com/49Qg9kt6RN3ukj9vfdKcRE.jpg" data-uuid="49Qg9kt6RN3ukj9vfdKcRE" data-v="4" data-type="inline" />

## Resetting Notebook Examples

If you want to reset the example notebooks to their defaults, you can:
Expand Down
2 changes: 0 additions & 2 deletions extension/docs/problem-codes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ This specific tooling helps accomplish several things:

There are more than 100 problems that we detect and, to learn more about them, hovering over the problems in VSCode gives you some additional information.

> Not every problem code is documented yet, but if you think an important one is missing, let us know and we are happy to add it in.
You can find more detailed information about some of the problem codes in the documentation (but not all have been added).

You can either use the search functionality (top of the page) or the sidebar to the left to learn more about each code.
Loading

0 comments on commit c4e1394

Please sign in to comment.