Skip to content

Commit c247ab5

Browse files
committed
Update codegen for new directory structure
1 parent d39c29a commit c247ab5

File tree

27 files changed

+50
-79
lines changed

27 files changed

+50
-79
lines changed

chart-studio-package/setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from setuptools import setup
2+
import os
23

34

45
def readme():
5-
with open("README.md") as f:
6+
parent_dir = os.path.dirname(os.path.realpath(__file__))
7+
with open(os.path.join(parent_dir, 'README.md')) as f:
68
return f.read()
79

810

plotly-figure-factory-package/setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from setuptools import setup
2+
import os
23

34

45
def readme():
5-
with open("README.md") as f:
6+
parent_dir = os.path.dirname(os.path.realpath(__file__))
7+
with open(os.path.join(parent_dir, 'README.md')) as f:
68
return f.read()
79

810

plotly-package/codegen/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def perform_codegen():
8282
# Set root codegen output directory
8383
# ---------------------------------
8484
# (relative to project root)
85-
outdir = 'plotly'
85+
abs_file_path = opath.realpath(__file__)
86+
project_root = opath.dirname(opath.dirname(opath.dirname(abs_file_path)));
87+
88+
outdir = opath.join(project_root, 'plotly-package', 'plotly')
8689

8790
# Delete prior codegen output
8891
# ---------------------------
@@ -103,7 +106,7 @@ def perform_codegen():
103106

104107
# Load plotly schema
105108
# ------------------
106-
with open('plotly/package_data/plot-schema.json', 'r') as f:
109+
with open('plotly-package/codegen/resources/plot-schema.json', 'r') as f:
107110
plotly_schema = json.load(f)
108111

109112
# Preprocess Schema

plotly-package/plotly/validators/funnelarea/domain/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def __init__(
1919
'min': 0,
2020
'max': 1,
2121
'editType': 'calc'
22-
},
23-
{
22+
}, {
2423
'valType': 'number',
2524
'min': 0,
2625
'max': 1,
@@ -52,8 +51,7 @@ def __init__(
5251
'min': 0,
5352
'max': 1,
5453
'editType': 'calc'
55-
},
56-
{
54+
}, {
5755
'valType': 'number',
5856
'min': 0,
5957
'max': 1,

plotly-package/plotly/validators/layout/angularaxis/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ def __init__(
213213
'min': 0,
214214
'max': 1,
215215
'editType': 'plot'
216-
},
217-
{
216+
}, {
218217
'valType': 'number',
219218
'min': 0,
220219
'max': 1,

plotly-package/plotly/validators/layout/geo/domain/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def __init__(
1919
'min': 0,
2020
'max': 1,
2121
'editType': 'plot'
22-
},
23-
{
22+
}, {
2423
'valType': 'number',
2524
'min': 0,
2625
'max': 1,
@@ -52,8 +51,7 @@ def __init__(
5251
'min': 0,
5352
'max': 1,
5453
'editType': 'plot'
55-
},
56-
{
54+
}, {
5755
'valType': 'number',
5856
'min': 0,
5957
'max': 1,

plotly-package/plotly/validators/layout/grid/domain/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def __init__(
1919
'min': 0,
2020
'max': 1,
2121
'editType': 'plot'
22-
},
23-
{
22+
}, {
2423
'valType': 'number',
2524
'min': 0,
2625
'max': 1,
@@ -52,8 +51,7 @@ def __init__(
5251
'min': 0,
5352
'max': 1,
5453
'editType': 'plot'
55-
},
56-
{
54+
}, {
5755
'valType': 'number',
5856
'min': 0,
5957
'max': 1,

plotly-package/plotly/validators/layout/mapbox/domain/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def __init__(
1919
'min': 0,
2020
'max': 1,
2121
'editType': 'plot'
22-
},
23-
{
22+
}, {
2423
'valType': 'number',
2524
'min': 0,
2625
'max': 1,
@@ -52,8 +51,7 @@ def __init__(
5251
'min': 0,
5352
'max': 1,
5453
'editType': 'plot'
55-
},
56-
{
54+
}, {
5755
'valType': 'number',
5856
'min': 0,
5957
'max': 1,

plotly-package/plotly/validators/layout/polar/domain/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def __init__(
1919
'min': 0,
2020
'max': 1,
2121
'editType': 'plot'
22-
},
23-
{
22+
}, {
2423
'valType': 'number',
2524
'min': 0,
2625
'max': 1,
@@ -52,8 +51,7 @@ def __init__(
5251
'min': 0,
5352
'max': 1,
5453
'editType': 'plot'
55-
},
56-
{
54+
}, {
5755
'valType': 'number',
5856
'min': 0,
5957
'max': 1,

0 commit comments

Comments
 (0)