setting runStartupCommands as array
See original GitHub issueMinor suggestion for improvement: python.dataScience.runStartupCommands
must currently be a string. If you use it to run more than one or two commands, the string gets quite long, requiring a lot of horizontal scrolling, making it hard to read and even harder to modify.
How about also allowing that setting to be an array? If an array is detected, simply convert it to string internally:
if (Array.isArray(runStartupCommands)) runStartupCommands = runStartupCommands.join(`\n`)
Then you could have
"python.dataScience.runStartupCommands": [
"%load_ext autoreload",
"%autoreload 2",
"import sys",
"sys.path.append('${workspaceFolder}')",
"sys.path.append('${workspaceFolder}/src')",
],
instead of
"python.dataScience.runStartupCommands": "%load_ext autoreload\n%autoreload 2\nimport sys\nsys.path.append('${workspaceFolder}')\nsys.path.append('${workspaceFolder}/src')",
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (13 by maintainers)
Top Results From Across the Web
python.dataScience is "Unknown Configuration Setting" in VS ...
dataScience.runStartupCommands", as it shows "Unknown Configuration Setting", now we don't use it to set Jupyter's "Intellisense" in VSCode.
Read more >Switching Data Analytics Activities From Jupyter to Vscode
runStartupCommands setting ). We can use this capability to load the autoreload extension that enables the functionality described above.
Read more >[Solved]-Run startup commands in spark-shell-scala
The workaround is to use :load :load /Users/steve/.scalarc. spark-shell does not support some command line parameters nor does it support :power mode ....
Read more >Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >Using the Dockerfile ENTRYPOINT and CMD Instructions
... to run startup commands in Docker containers in this tutorial! ... always be written in exec form due to its “array like”...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t believe it supports an
or
condition. You’ll have to just change it toarray
. However the code has to handle old settings so the actual code should be ‘string | string[]’@joyceerhl I did install
node@12
before tryingnpm ci
but still ran into this error: