Skip to content

Commit d1905cb

Browse files
committed
Use new variable name for project root in commands.py
1 parent 48e7de3 commit d1905cb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

commands.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
is_repo = os.path.exists(os.path.join(project_root, ".git"))
1414
node_modules = os.path.join(node_root, "node_modules")
1515
targets = [
16-
os.path.join(here, "plotly", "package_data", "widgetbundle.js"),
16+
os.path.join(project_root, "plotly", "package_data", "widgetbundle.js"),
1717
]
1818

1919
npm_path = os.pathsep.join(
@@ -25,7 +25,7 @@
2525

2626
# Load plotly.js version from js/package.json
2727
def plotly_js_version():
28-
path = os.path.join(here, "js", "package.json")
28+
path = os.path.join(project_root, "js", "package.json")
2929
with open(path, "rt") as f:
3030
package_json = json.load(f)
3131
version = package_json["dependencies"]["plotly.js"]
@@ -100,7 +100,7 @@ def run_codegen():
100100

101101

102102
def overwrite_schema_local(uri):
103-
path = os.path.join(here, "codegen", "resources", "plot-schema.json")
103+
path = os.path.join(project_root, "codegen", "resources", "plot-schema.json")
104104
shutil.copyfile(uri, path)
105105

106106

@@ -109,13 +109,13 @@ def overwrite_schema(url):
109109

110110
req = requests.get(url)
111111
assert req.status_code == 200
112-
path = os.path.join(here, "codegen", "resources", "plot-schema.json")
112+
path = os.path.join(project_root, "codegen", "resources", "plot-schema.json")
113113
with open(path, "wb") as f:
114114
f.write(req.content)
115115

116116

117117
def overwrite_bundle_local(uri):
118-
path = os.path.join(here, "plotly", "package_data", "plotly.min.js")
118+
path = os.path.join(project_root, "plotly", "package_data", "plotly.min.js")
119119
shutil.copyfile(uri, path)
120120

121121

@@ -125,13 +125,13 @@ def overwrite_bundle(url):
125125
req = requests.get(url)
126126
print("url:", url)
127127
assert req.status_code == 200
128-
path = os.path.join(here, "plotly", "package_data", "plotly.min.js")
128+
path = os.path.join(project_root, "plotly", "package_data", "plotly.min.js")
129129
with open(path, "wb") as f:
130130
f.write(req.content)
131131

132132

133133
def overwrite_plotlyjs_version_file(plotlyjs_version):
134-
path = os.path.join(here, "plotly", "offline", "_plotlyjs_version.py")
134+
path = os.path.join(project_root, "plotly", "offline", "_plotlyjs_version.py")
135135
with open(path, "w") as f:
136136
f.write(
137137
"""\

0 commit comments

Comments
 (0)