smarie / mkdocs-gallery

Same features as sphinx-gallery (https://sphinx-gallery.github.io/) but on mkdocs (https://www.mkdocs.org/) (no sphinx dependency !).
https://smarie.github.io/mkdocs-gallery
BSD 3-Clause "New" or "Revised" License
37 stars 15 forks source link

ci_tools/nox_utils.PowerSession.run2() method does not correctly handle filepaths containing spaces #31

Closed mchaaler closed 2 years ago

mchaaler commented 2 years ago

This makes the call to coverage --junitxml={test_xml} --html={test_html} crash if test_xml and test_html filepaths contain spaces.

Possible fixes:

By the way, just for information, where does the ci_tools/nox_utils.py module come from (no module docstring, no reference or source mentioned)?

smarie commented 2 years ago

By the way, just for information, where does the ci_tools/nox_utils.py module come from (no module docstring, no reference or source mentioned)?

This is my "enhanced nox" :) that I use in all of my open source python projects.

Basically it contains things that are not yet (or will never be) merged into nox, available through the @power_session decorator:

Both of your proposals are ok for me. Of course the second one would be better to avoid falling into that issue again, but it is maybe not worth the shot

mchaaler commented 2 years ago

Thanks for the explanation @smarie!

The second proposal is really simple, in fact, and helps improving your 'enhanced nox' module. Reversing to nox legacy Session.run() would be kind of a step backwards. However correcting the run2 method is not enough: one still has to check and correct each call to quote every path in the command string.

Just submitted PR #35 that takes care of both aspects.

smarie commented 2 years ago

Fixed by #35 , thanks @mchaaler !