plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.34k stars 2.06k forks source link

no module named 'dash_generateor_test_component_nested' #1241

Open carl-dawson opened 4 years ago

carl-dawson commented 4 years ago

After following the setup instructions in CONTRIBUTING.md, running pytests fails with the following error: ModuleNotFoundError: No module named 'dash_generator_test_component_nested'. The module dash_generator_test_component_standard also does not exist. Both of these files appear to be excluded from git in the .gitignore file.

Simply commenting out all of test_generation.py solved the issue for me, but this removes the tests gene001 and gene002.

alexcjohnson commented 4 years ago

Hmm, those packages are supposed to be built by:

# build and install components used in tests
$ npm run setup-tests

Toward the end of https://github.com/plotly/dash/blob/dev/CONTRIBUTING.md#getting-started

Did that command not succeed?

carl-dawson commented 4 years ago

Oh right. I forgot about that. Yes, npm run setup-tests failed: npm ERR! missing script: setup-tests

alexcjohnson commented 4 years ago

Oh! Because I guess at that point in the instructions you're in the dash-renderer directory, but setup-tests is defined in the root package.json. 🤦 Does it work if you cd .. first?

carl-dawson commented 4 years ago

Ha, yes I caught that. And no, it doesn't work yet. From the /dash dir, I had to run npm install to fix a run-s is not recognized as an internal or external command error. Now running npm setup-tests throws a couple of other errors:

This is looking like a platform compatibility issue, an issue with my installation/setup of node, or both. And I could just be revealing my woeful inexperience with Node/npm... :wink:

alexcjohnson commented 4 years ago

Got it - thanks for digging into this. So for anybody running this we need the cd .. and npm i (or maybe npm ci) steps, but then it still looks like we're going to have to do a little bit of investigation into running this on Windows. cp I'm sure there's a cross-platform package for, not sure what the MSVSProject thing is about...