Esempio n. 1
0
    def run(self):
        from plotly._version import git_pieces_from_vcs, render

        # Update plotly.js url in package.json
        package_json_path = os.path.join(node_root, "package.json")

        with open(package_json_path, "r") as f:
            package_json = json.load(f)

        # Replace version with bundle url
        pieces = git_pieces_from_vcs("widget-v", project_root, False)
        pieces["dirty"] = False
        widget_ver = render(pieces, "pep440")["version"]

        package_json["version"] = widget_ver
        with open(package_json_path, "w") as f:
            json.dump(package_json, f, indent=2)

        # write _widget_version
        overwrite_plotlywidget_version_file(widget_ver)
Esempio n. 2
0
    def run(self):
        from plotly._version import git_pieces_from_vcs, render

        # Update plotly.js url in package.json
        package_json_path = os.path.join(node_root, 'package.json')
        with open(package_json_path, 'r') as f:
            package_json = json.load(f)

        # Replace version with bundle url
        root = os.path.dirname(os.path.realpath(__file__))
        pieces = git_pieces_from_vcs('widget-v', root, False)
        pieces['dirty'] = False
        widget_ver = render(pieces, 'pep440')['version']

        package_json['version'] = widget_ver
        with open(package_json_path, 'w') as f:
            json.dump(package_json, f, indent=2)

        # write _widget_version
        overwrite_plotlywidget_version_file(widget_ver)
Esempio n. 3
0
    def run(self):
        from plotly._version import git_pieces_from_vcs, render

        # Update plotly.js url in package.json
        package_json_path = os.path.join(node_root, 'package.json')
        with open(package_json_path, 'r') as f:
            package_json = json.load(f)

        # Replace version with bundle url
        root = os.path.dirname(os.path.realpath(__file__))
        pieces = git_pieces_from_vcs('widget-v', root, False)
        pieces['dirty'] = False
        widget_ver = render(pieces, 'pep440')['version']

        package_json['version'] = widget_ver
        with open(package_json_path, 'w') as f:
            json.dump(package_json, f, indent=2)

        # write _widget_version
        overwrite_plotlywidget_version_file(widget_ver)