chore: Refactor
Browse files- .gitignore +2 -1
- examples/__pycache__/tour.cpython-39.pyc +0 -0
- examples/tour.js +0 -1
- examples/tour.py +1 -2
.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
venv
|
|
|
|
|
|
| 1 |
+
venv
|
| 2 |
+
__pycache__
|
examples/__pycache__/tour.cpython-39.pyc
CHANGED
|
Binary files a/examples/__pycache__/tour.cpython-39.pyc and b/examples/__pycache__/tour.cpython-39.pyc differ
|
|
|
examples/tour.js
CHANGED
|
@@ -24,7 +24,6 @@ const snippetToCompletionItem = item => ({
|
|
| 24 |
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
| 25 |
})
|
| 26 |
require(['vs/editor/editor.main', 'pyodide'], async () => {
|
| 27 |
-
console.log('loaded monaco')
|
| 28 |
monaco.languages.registerCompletionItemProvider('python', {
|
| 29 |
triggerCharacters: ['.', "'", '"'],
|
| 30 |
provideCompletionItems: async (model, position) => {
|
|
|
|
| 24 |
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
| 25 |
})
|
| 26 |
require(['vs/editor/editor.main', 'pyodide'], async () => {
|
|
|
|
| 27 |
monaco.languages.registerCompletionItemProvider('python', {
|
| 28 |
triggerCharacters: ['.', "'", '"'],
|
| 29 |
provideCompletionItems: async (model, position) => {
|
examples/tour.py
CHANGED
|
@@ -212,8 +212,6 @@ def get_wave_completions(line, character, file_content):
|
|
| 212 |
js_code = ''
|
| 213 |
with open(os.path.join(example_dir, 'tour.js'), 'r') as f:
|
| 214 |
js_code = f.read()
|
| 215 |
-
print(q.app.snippets1)
|
| 216 |
-
print(q.app.snippets2)
|
| 217 |
template = Template(js_code).substitute(
|
| 218 |
tour_assets=q.app.tour_assets,
|
| 219 |
base_url=_base_url,
|
|
@@ -397,6 +395,7 @@ async def serve(q: Q):
|
|
| 397 |
|
| 398 |
example_filenames = [line.strip() for line in read_lines(os.path.join(example_dir, 'tour.conf')) if
|
| 399 |
not line.strip().startswith('#')]
|
|
|
|
| 400 |
catalog = load_examples(example_filenames)
|
| 401 |
print('----------------------------------------')
|
| 402 |
print(' Welcome to the H2O Wave Interactive Tour!')
|
|
|
|
| 212 |
js_code = ''
|
| 213 |
with open(os.path.join(example_dir, 'tour.js'), 'r') as f:
|
| 214 |
js_code = f.read()
|
|
|
|
|
|
|
| 215 |
template = Template(js_code).substitute(
|
| 216 |
tour_assets=q.app.tour_assets,
|
| 217 |
base_url=_base_url,
|
|
|
|
| 395 |
|
| 396 |
example_filenames = [line.strip() for line in read_lines(os.path.join(example_dir, 'tour.conf')) if
|
| 397 |
not line.strip().startswith('#')]
|
| 398 |
+
|
| 399 |
catalog = load_examples(example_filenames)
|
| 400 |
print('----------------------------------------')
|
| 401 |
print(' Welcome to the H2O Wave Interactive Tour!')
|