Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI workflow and categorise extension commands #41

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ef92b4f
Add terminal profile support (closes #33)
Jul 8, 2021
b012e04
Categorise extension commands
Jul 9, 2021
995a1a3
Add extension testing
Jul 9, 2021
4fe5796
Fix whitespace bug in terminal intro
Jul 30, 2021
45f3acb
Fix path of extension directory
Aug 7, 2021
919836a
Permit launching terminal from non-MATLAB contexts
Aug 7, 2021
9fdc684
Get tests running
Aug 28, 2021
392317b
Add Github Actions workflow and clean task
Aug 28, 2021
e0bbb14
Run CI on main and sync with `apommel:master`
Aug 28, 2021
63dfb86
Add MATLAB files to TSC compiler output
Aug 28, 2021
fde0722
Add back "onStartupFinished"
Aug 28, 2021
66d1698
Fix Github Actions YAML
Aug 30, 2021
6c4da2d
Set up Python and MEP
Aug 30, 2021
2b5b33f
Substitute CI matrix variables
Aug 30, 2021
da3c67c
Remove empty CI matrix
Aug 30, 2021
ce2f918
Lock CI to Python 3.8
Aug 30, 2021
5d143d2
Simplify MEP installation step
Aug 30, 2021
84219db
Try install in user directory
Aug 30, 2021
976e0ee
Fix CI py mounting problem
Aug 30, 2021
f24bf08
Remove non-Linux actions
Aug 30, 2021
8da0706
Increase timeout to 10s
Aug 30, 2021
effaee0
Make sure tests resolve (Mocha.done)
Aug 30, 2021
47e3f41
Couple small fixes
Aug 30, 2021
6005121
Fix CI workflow typo
Aug 30, 2021
59504fe
Add hook to copy *.m files
Aug 30, 2021
04849cf
Copy over MATLAB files in CI workflow
Aug 30, 2021
967844f
Overhaul test logic
Aug 30, 2021
35efcb6
Update runner with proposed API
Aug 30, 2021
84bcde1
Revert proposed API addition
Aug 30, 2021
93ce1f6
Resolve some test regressions
Aug 31, 2021
9778936
Remove vscode proposed API defns
Aug 31, 2021
54085fd
Reinstall vscode-test
Aug 31, 2021
e58833b
Disable xshm in vscode CI
Aug 31, 2021
1de0454
Simplify the CI's test runner step
Aug 31, 2021
57c7761
Upgrade Node version to 14
Aug 31, 2021
5117287
Revert to boilerplate
Aug 31, 2021
0f014ea
Run xvfb display server
Aug 31, 2021
48a0390
Run Ubuntu image at 1080p with GPU disabled
Aug 31, 2021
1d84e50
Use Microsoft's CI workflow
Aug 31, 2021
7449f69
Use xfvb github action
Aug 31, 2021
a50d3be
Debug tests
Aug 31, 2021
0e5a603
Delete xvfb.init
Aug 31, 2021
eb71a59
Use promise wizardry to fix tests
Sep 19, 2021
17961a9
Validate that tests fail when invalid
Sep 19, 2021
3f6820e
Use terminal data interval loop
Sep 25, 2021
62e1ff7
Test Python licensing scheme on v1.1.0
Jan 7, 2022
6c48ec9
Upgrade to new proposed API format
Jan 7, 2022
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
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Extension CI

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1.1.0
with:
release: R2021a
- name: Install MATLAB Engine for Python
run: |
cd /usr/local/MATLAB/R2021a/extern/engines/python
python setup.py build --build-base=$(mktemp -d) install --user
cd -
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Compile
run: npm install
- name: Run Tests
uses: GabrielBB/xvfb-action@v1.4
with:
run: npm test
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
out
node_modules
out/
node_modules/
temp/
.vscode-test/
*.vsix
__pycache__/
*/__pycache__/
*.pyc
*.pyc
*.vsix
vscode.proposed.d.ts
vscode.proposed.*.d.ts
5 changes: 4 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
.vscode-test/**
out/test/**
src/**
temp/**
.gitignore
vsc-extension-quickstart.md
vscode.proposed.d.ts
vscode.proposed.*.d.ts
**/tsconfig.json
**/tslint.json
**/*.map
**/*.ts
__pycache__/
*/__pycache__/
*.pyc
*.pyc
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Matlab Interactive Terminal for Visual Studio Code
# MATLAB Interactive Terminal for Visual Studio Code

Matlab Interactive Terminal is an extension for Visual Studio Code that allows users to launch MATLAB scripts and have a working MATLAB REPL directly included in Visual Studio Code. This extension uses the MATLAB Engine for Python which must be correctly set up for the extension to work. It works equally on Windows, macOS and Linux.
MATLAB Interactive Terminal is an extension for Visual Studio Code that allows users to launch MATLAB scripts and have a working MATLAB REPL directly included in Visual Studio Code. This extension uses the MATLAB Engine for Python which must be correctly set up for the extension to work. It works equally on Windows, macOS and Linux.

## Requirements

Expand All @@ -19,8 +19,8 @@ The extension adds three commands to Visual Studio Code, that can then be tied t

## Recommended VS Code Extensions

- [Matlab](https://marketplace.visualstudio.com/items?itemName=Gimly81.matlab) (from Xavier Hahn) provides syntax coloration, snippets and linting for the Matlab language. Matlab Interactive Terminal is thought for working with it.
- [Matlab Code Run](https://marketplace.visualstudio.com/items?itemName=bramvanbilsen.matlab-code-run) (from Bram Vanbilsen) is a good alternative to Matlab Interactive Terminal without the Python and Matlab Engine API dependencies. It should provide similar functionalities on both Mac OS and Linux.
- [Matlab](https://marketplace.visualstudio.com/items?itemName=Gimly81.matlab) (from Xavier Hahn) provides syntax coloration, snippets and linting for the MATLAB language. MATLAB Interactive Terminal is thought for working with it.
- [Matlab Code Run](https://marketplace.visualstudio.com/items?itemName=bramvanbilsen.matlab-code-run) (from Bram Vanbilsen) is a good alternative to MATLAB Interactive Terminal without the Python and MATLAB Engine API dependencies. It should provide similar functionalities on both Mac OS and Linux.

## Known Issues

Expand Down
4 changes: 2 additions & 2 deletions interfaces/standard/matlab_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self):

For product information, visit https://www.mathworks.com.\
'''.format(release=self.release())
print(dedent(intro))
print(dedent(intro).strip())

except MatlabTerminated as e:
self.clear()
Expand All @@ -67,7 +67,7 @@ def release(self):
def run_script(self, script_path):
if not import_fail:
try:
print("File: \"%s\""%script_path)
print(">>> run(\"%s\")"%script_path)
self.eng.run(script_path, nargout=0)

except MatlabTerminated:
Expand Down
4 changes: 2 additions & 2 deletions interfaces/unicode/matlab_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self):

For product information, visit https://www.mathworks.com.\
'''.format(release=self.release())
print(dedent(intro))
print(dedent(intro).strip())

except Exception as e:
self.clear()
Expand All @@ -67,7 +67,7 @@ def run_script(self, script_path):
if not import_fail:

try:
print("File: \"{}\"".format(script_path))
print(">>> run(\"{}\")".format(script_path))
stream = StringIO()
err_stream = StringIO()
self.eng.run(script_path, nargout=0, stdout=stream, stderr=err_stream)
Expand Down
Loading