How to use the branca.utilities._camelify function in branca

To help you get started, we’ve selected a few branca examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python-visualization / branca / tests / test_notebooks.py View on Github external
out_nb = nbconvert.exporters.MarkdownExporter().from_notebook_node(*exec_nb)
            if filename is None:
                assert self.filename.endswith('.ipynb')
                filename = self.filename[:-6] + exporter.file_extension
            open(filename, 'w').write(out_nb[0].encode('utf-8'))


class TestNotebooks(object):
    _filepath = rootpath.rstrip('/')+'/../examples/'
    _nblist = [x for x in os.listdir(_filepath) if x.endswith('.ipynb')]


for fn in TestNotebooks._nblist:
    setattr(
        TestNotebooks,
        'test_'+branca.utilities._camelify(fn[:-6]),
        NotebookTester(TestNotebooks._filepath+fn).__call__
    )
github python-visualization / folium / tests / notebooks / test_notebooks.py View on Github external
exec_nb = nbconvert.preprocessors.ExecutePreprocessor(timeout=600).preprocess(*raw_nb)

            if exporter is not None:
                out_nb = nbconvert.exporters.MarkdownExporter().from_notebook_node(*exec_nb)
                if filename is None:
                    assert self.filename.endswith('.ipynb')
                    filename = self.filename[:-6] + exporter.file_extension
                open(filename, 'w').write(out_nb[0].encode('utf-8'))

    class TestNotebooks(object):
        _filepath = rootpath.rstrip('/') + '/../../examples/'
        _nblist = [x for x in os.listdir(_filepath) if x.endswith('.ipynb')]

    for fn in TestNotebooks._nblist:
                setattr(TestNotebooks,
                        'test_'+branca.utilities._camelify(fn[:-6]),
                        NotebookTester(TestNotebooks._filepath+fn).__call__
                        )
github python-visualization / branca / branca / element.py View on Github external
def get_name(self):
        """Returns a string representation of the object.
        This string has to be unique and to be a python and
        javascript-compatible
        variable name.
        """
        return _camelify(self._name) + '_' + self._id