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 Jan 31, 2024
2 parents 24adaeb + 01c848e commit ee151f1
Show file tree
Hide file tree
Showing 374 changed files with 20,166 additions and 5,953 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/github-actions-docs-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: |
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
touch extension/docs/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: extension/docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/out-tsc
.angular
.nx
extension/docs/.vitepress/cache
extension/docs/.vitepress/dist

# dependencies
/node_modules
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
"ENVIGLT",
"enviraster",
"ENVIRPC",
"envitask",
"EPSG",
"FFIDL",
"fflate",
"Fuzzysort",
"geojsofromnuri",
"httprequest",
"idldoc",
"IDLJSON",
"IDLNB",
Expand All @@ -40,9 +42,11 @@
"idlnotebookimage_png",
"idlnotebookmap",
"idlnotebookplot",
"idltask",
"idlwv",
"imagefromuri",
"INCREMENTERS",
"INDGEN",
"lineanimation",
"minilog",
"mlog",
Expand Down
5 changes: 4 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ dist/apps/server/assets/.gitkeep
dist/apps/test-tokenizer/**
dist/apps/tmlang-maker/**
dist/apps/vscode-e2e-runner/**
extension/docs/developer/**
extension/dev-docs/**
extension/docs/**
extension/language/syntaxes/src/**
extension/language/syntaxes/idl-log.tmLanguage.json
extension/language/syntaxes/idl.tmLanguage.json
extension/README.md
idl/helpers/**
idl/routines/notebooks/**
Expand Down
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ For much more detail on incremental work for large features, see our [developer

This section of the CHANGELOG documents features that have been added to the extension, but are still in an experimental phase. Feel free to try them out and provide feedback via discussions or issues on our GitHub page.

Document some advanced types so users may try them out and provide feedback. The following types are exclusive to functions and are:

- `TypeOfArg<idx>` to indicate the function returns a matching data type for the zero-based index of the indicated argument

- `ArrayPromotion<type>` will have the function return an array of the indicated type if any argument is an array. Otherwise it returns a scalar

- Read more in the extension documentation

Added the ability to convert a notebook to a PDF! This requires an additional extension called ":"Markdown PDF", which you will be prompted to install. This includes:

- A new sidebar entry for PDF generation and a button in the top-right of the notebook to generate a PDF
Expand All @@ -20,6 +28,50 @@ 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

## 4.3.0

Fixed a bug where python statements of the form ">>>" were incorrectly formatted with an extra space after the arrows.

For the upcoming release of ENVI Deep Learning 3.0, added a new pipeline for migrating code from older to newer versions. While we typically do not make breaking changes, if we ever do, we now have a pattern to help automate getting your code up-to-date with the latest version of IDL, ENVI, and module APIs.

Updated the routine signatures (docs) to IDL 9.0, ENVI 6.0, and ENVI Deep Learning 3.0.

When converting notebooks to PRO code, any markdown cells now get added in-line to the content at the main program level. This helps create code that more accurately follows the flow of what you had in your notebook (assuming not many routine definitions in the notebook cells).

When converting notebooks to PRO code, any markdown cells now have leading and training white space removed before converting to comments.

When an IDL Notebook is open, added a new, quick-access button in the top-right of the Notebook that allows you to convert your notebook to PRO code.

When an IDL Notebook is open, we migrated the "Reset IDL" and "Stop IDL" buttons to the top-right of the Notebooks view to clean up the main action area.

When IDL starts for a notebook, a notification message appears telling you which version of IDL is being used

When creating a PDF from a notebook, we no longer keep the Markdown conversion of the notebook open. The file still sticks around on disk, but we thought this would cause less confusion.

Fixed an issue where post-processing would fail with specific syntax errors and ENVI or IDL Task functions

Added a new auto-completion method for the names of ENVI and IDL tasks which will insert the appropriate names for syntax cases matching:

- `ENVITask('')` which lists all ENVI Tasks when auto-completion is triggered in the quotes

- `IDL('')` which lists all IDL Tasks when auto-completion is triggered in the quotes

- Supports single quotes, double quotes, and string literal strings

Similar to `ENVITask` and `IDLTask`, add special auto-complete cases for `call_function()` and `obj_new()`

Auto-complete for `call_function()` now shows keywords like `obj_new()` does

Go-to-definition for `call_function()` goes to the function definition if in PRO code

Hover-help for `call_function()` pulls the hover help for the function being called

We now automatically detect the type from `call_function()` if we have a known function

Fixed an edge case with types where the "any" type was not properly being detected with arrays of structures

Migrated the following features from "Preview Features" above:

Code style revamp! We reworked how routines, routine methods, properties, and structure names get formatted. This includes:

- Support for camel case ("camelCase") and pascal case ("PascalCase") styling. Mileage may vary here, based on the routine names, so please let us know if this doesn't look quite right or do what you expect. Some routines that start with "IDL" or "ENVI" might surprise you with the case conversion.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023, NV5 Geospatial Software, Inc.
Copyright (c) 2024, NV5 Geospatial Software, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
11 changes: 11 additions & 0 deletions apps/client-e2e/src/tests/interactions/_interactions-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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 { MigrateCodeDL30, MigrateCodeDL30_2 } from './migrate-code-dl-3.0';
import { NotebookProblemsTrackRight } from './notebook-problems-track-right';
import { NotebookCompletionBasic } from './notebooks-completion-basic';
import { NotebooksInteractRight } from './notebooks-interact-right';
Expand Down Expand Up @@ -36,6 +37,16 @@ INTERACTIONS_RUNNER.addTest({
fn: IndexIDLFolderRightAndOpenEditClose,
});

INTERACTIONS_RUNNER.addTest({
name: 'Migrate code: DL 3.0 API #1',
fn: MigrateCodeDL30,
});

INTERACTIONS_RUNNER.addTest({
name: 'Migrate code: DL 3.0 API #2',
fn: MigrateCodeDL30_2,
});

INTERACTIONS_RUNNER.addTest({
name: 'Task interaction does the right thing',
fn: TasksInteractRight,
Expand Down
87 changes: 87 additions & 0 deletions apps/client-e2e/src/tests/interactions/migrate-code-dl-3.0.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { GetExtensionPath, IDL_COMMANDS, Sleep } from '@idl/shared';
import { OpenFileInVSCode } from '@idl/vscode/shared';
import expect from 'expect';
import { readFileSync } from 'fs';
import * as vscode from 'vscode';

import { RunnerFunction } from '../runner.interface';

/**
* Function that verifies we can correctly migrate code to ENVI DL 3.0 API
*/
export const MigrateCodeDL30: RunnerFunction = async (init) => {
const doc = await OpenFileInVSCode(
GetExtensionPath('idl/test/client-e2e/migration/dl30_1_start.pro')
);

// short pause to make sure we open and parse
await Sleep(100);

// add docs
await vscode.commands.executeCommand(IDL_COMMANDS.CODE.MIGRATE_TO_DL30_API);

// short pause
await Sleep(100);

// make sure output is correct
expect(doc.getText()).toEqual(
readFileSync(
GetExtensionPath('idl/test/client-e2e/migration/dl30_1_expected.pro'),
'utf-8'
)
);

// add docs again
await vscode.commands.executeCommand(IDL_COMMANDS.CODE.MIGRATE_TO_DL30_API);

// short pause
await Sleep(100);

// verify we have the same code
expect(doc.getText()).toEqual(
readFileSync(
GetExtensionPath('idl/test/client-e2e/migration/dl30_1_expected.pro'),
'utf-8'
)
);
};

/**
* Function that verifies we can correctly migrate code to ENVI DL 3.0 API
*/
export const MigrateCodeDL30_2: RunnerFunction = async (init) => {
const doc = await OpenFileInVSCode(
GetExtensionPath('idl/test/client-e2e/migration/dl30_2_start.pro')
);

// short pause to make sure we open and parse
await Sleep(100);

// add docs
await vscode.commands.executeCommand(IDL_COMMANDS.CODE.MIGRATE_TO_DL30_API);

// short pause
await Sleep(100);

// make sure output is correct
expect(doc.getText()).toEqual(
readFileSync(
GetExtensionPath('idl/test/client-e2e/migration/dl30_2_expected.pro'),
'utf-8'
)
);

// add docs again
await vscode.commands.executeCommand(IDL_COMMANDS.CODE.MIGRATE_TO_DL30_API);

// short pause
await Sleep(100);

// verify we have the same code
expect(doc.getText()).toEqual(
readFileSync(
GetExtensionPath('idl/test/client-e2e/migration/dl30_2_expected.pro'),
'utf-8'
)
);
};
7 changes: 7 additions & 0 deletions apps/client-e2e/src/tests/notebooks/_notebook-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { NotebookFormats_2_0_0 } from './notebook-formats-2.0.0';
import { RunNotebookReset } from './notebook-reset';
import { RunNotebookStop } from './notebook-stop';
import { NotebookToProCodeAllCells } from './notebook-to-pro-code-all-cells';
import { NotebookToProCodeAllCells2 } from './notebook-to-pro-code-all-cells-2';
import { NotebookToProCodeOnlyCode } from './notebook-to-pro-code-only-code';
import { OpenENVINotebookExample } from './open-envi-notebook-example';
import { OpenIDLNotebookExample } from './open-idl-notebook-example';
Expand Down Expand Up @@ -83,6 +84,12 @@ NOTEBOOK_RUNNER.addTest({
critical: false,
});

NOTEBOOK_RUNNER.addTest({
name: 'Convert notebook to PRO code (all cells) #2',
fn: NotebookToProCodeAllCells2,
critical: false,
});

NOTEBOOK_RUNNER.addTest({
name: 'Run notebook that tests successes',
fn: RunTestNotebook,
Expand Down
Loading

0 comments on commit ee151f1

Please sign in to comment.