habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

from habitat_sim.utils.common import d3_40_colors_rgb

Open bryanbocao opened this issue 4 years ago • 5 comments

🐛 Bug

This might be a trivial bug, the method d3_40_colors_rgb() shown in the demo seems to have been moved from

from habitat_sim.utils import d3_40_colors_rgb

to

from habitat_sim.utils.common import d3_40_colors_rgb

From my end, I have to import it from habitat_sim.utils.common. Maybe the document has not been updated yet.

bryanbocao avatar Dec 10 '19 22:12 bryanbocao

Thanks, this is just the result of some refactoring. Likely need to update the demo to reflect this. @erikwijmans?

aclegg3 avatar Dec 11 '19 00:12 aclegg3

:thinking: are we compiling / running the demo code on the CI? Is it possible to do that? Would be great to ensure all documentation code snippets are always up-to-date.

This might be a result of the module reorganization we did for the new documentation.

mosra avatar Dec 17 '19 20:12 mosra

Yeah... these are the demo notebooks and because of how poorly git works with jupyter notebooks, we've put those elsewhere, but they will fall out of sync :/

erikwijmans avatar Dec 17 '19 22:12 erikwijmans

Did a quick google search:

  • https://towardsdatascience.com/version-control-with-jupyter-notebooks-f096f4d7035a
  • https://nextjournal.com/schmudde/how-to-version-control-jupyter
  • https://mg.readthedocs.io/git-jupyter.html

The easiest from these seems to be to strip the output from all notebooks, saving only the code. A downside is that the output will not be shown in GitHub's Jupyter renderer, but that's not done right now anyway :) Looks like it has to be done manually tho, so maybe a check could be added to the CI runner to ensure the output is stripped again after an ipynb file gets updated.

mosra avatar Dec 18 '19 11:12 mosra

For the record the fix is to add .common: from habitat_sim.utils.common import d3_40_colors_rgb

wojga avatar Mar 18 '20 03:03 wojga