Skip to content

Commit

Permalink
Merge pull request #119 from XpressAI/adry/run-output-str
Browse files Browse the repository at this point in the history
🎨Add string msg when running xircuits
  • Loading branch information
MFA-X-AI authored Mar 4, 2022
2 parents 6162e2d + 7b86831 commit c7f798e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { runIcon, saveIcon } from '@jupyterlab/ui-components';
import { addContextMenuCommands } from './commands/ContextMenu';
import { Token } from '@lumino/coreutils';
import { xircuitsIcon, debuggerIcon, componentLibIcon, changeFavicon, xircuitsFaviconLink } from './ui-components/icons';
import { startRunOutputStr } from './kernel/RunOutput';


const FACTORY = 'Xircuits editor';
Expand Down Expand Up @@ -292,7 +293,8 @@ const xircuits: JupyterFrontEndPlugin<void> = {
}

outputPanel.session.ready.then(async () => {
let code = "%run " + model_path + message + debug_mode;
let code = startRunOutputStr();
code += "%run " + model_path + message + debug_mode;

// Run spark submit when run type is Spark Submit
if (runType == 'spark-submit') {
Expand Down
18 changes: 18 additions & 0 deletions src/kernel/RunOutput.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export function startRunOutputStr(){
let code_str;
code_str =
`print(
"""
======================================
__ __ ___ _ _
\\ \\ \\ \\/ (_)_ __ ___ _ _(_) |_ ___
\\ \\ \\ /| | '__/ __| | | | | __/ __|
/ / / \\| | | | (__| |_| | | |_\\__ \\\\
/_/ /_/\\_\\_|_| \\___|\\__,_|_|\\__|___/
======================================
""")\n`
code_str += "print('Xircuits is running...\\n')\n";

return code_str;
}

0 comments on commit c7f798e

Please sign in to comment.