Add support for custom chromium commandline arguments #53
+85
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #45
This PR adds support for fully customizing the chromium flags used by the kaleido process. It also adds
--disable-dev-shm-usage
to the list of default arguments. This is helpful in certain docker configurations with limited/dev/shm
size and it is also the default for puppeteer.The default arguments are returned by the
default_chromium_args
class method. e.g.A custom tuple/list of arguments can be provided using the
chromium_args
argument in the scope constructor, and a tuple of the active chromium arguments can be accessed using thechromium_args
propertyFor an already constructed scope (as in the case of the scope that plotly.py constructs at
plotly.io.kaleido.scope
), the arguments can be set using the property setter. This will automatically shut down any running kaleido process so that the arguments are ineffect the next time a transform is applied.
For example, to add the
--single-process
argument to the list of defaults for use by plotly.py:cc @aschmied