Update make run to make starting Python server easier#688
Conversation
| "start:app": "PORT=4141 react-scripts start", | ||
| "start:css": "npm run build:css && node-sass src/ -o src/ --watch --recursive", | ||
| "start:lib": "rm -rf lib && babel src --out-dir lib --copy-files --watch", | ||
| "start:api": "python package/kedro_viz/server.py \"$npm_config_project_path\"", |
There was a problem hiding this comment.
This looked like it was trying to do something similar to make run but is missing the right PYTHONPATH. I couldn't see $npm_config_project_path defined anywhere so I figured this was obsolete and nobody used it now. But please say if I'm missing something here!!
There was a problem hiding this comment.
Yes it was an earlier attempt to start everything under npm run start but don't think anyone is using it.
There was a problem hiding this comment.
I might keep it, just in case someone wants to use it, and actually make it usable?
"PYTHONPATH=$(pwd)/package python3 package/kedro_viz/server.py \"$npm_config_project_path\""
There was a problem hiding this comment.
I thought about this a bit more and decided to leave it out. Overall I think it's slightly less confusing to have one way of doing things rather than duplicated command, and I kind of like the logical npm/Makefile split (from the zen of Python, "There should be one-- and preferably only one --obvious way to do it."). 🙂
| "start:app": "PORT=4141 react-scripts start", | ||
| "start:css": "npm run build:css && node-sass src/ -o src/ --watch --recursive", | ||
| "start:lib": "rm -rf lib && babel src --out-dir lib --copy-files --watch", | ||
| "start:api": "python package/kedro_viz/server.py \"$npm_config_project_path\"", |
There was a problem hiding this comment.
Yes it was an earlier attempt to start everything under npm run start but don't think anyone is using it.
tynandebold
left a comment
There was a problem hiding this comment.
Nice one, thanks for this.
As we talked about last week, I might also keep the NPM script, but your call!
| "start:app": "PORT=4141 react-scripts start", | ||
| "start:css": "npm run build:css && node-sass src/ -o src/ --watch --recursive", | ||
| "start:lib": "rm -rf lib && babel src --out-dir lib --copy-files --watch", | ||
| "start:api": "python package/kedro_viz/server.py \"$npm_config_project_path\"", |
There was a problem hiding this comment.
I might keep it, just in case someone wants to use it, and actually make it usable?
"PYTHONPATH=$(pwd)/package python3 package/kedro_viz/server.py \"$npm_config_project_path\""


Description
I was just thinking about the development process and thought it would be simplified slightly if instead of needing to copy and paste the awkward
we could just run a
makecommand. In fact,make runis already defined to do something like this, just it's a bit out of date. I've updated it so now the process of developing on the backend goes something likeChecklist
RELEASE.mdfile