Skip to content

Commit 59e36cf

Browse files
authored
Restructure repo with a top-level packages/ directory (#1604)
* Restructure repo with a top-level `packages/` directory * Fix circle ci testing paths * Remove node_modules from git * Fix codegen paths * Fix test paths
1 parent 90352b3 commit 59e36cf

File tree

1,455 files changed

+56
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,455 files changed

+56
-48
lines changed

Diff for: .circleci/config.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
command: 'sudo pip install tox'
1616
- run:
1717
name: Test with tox
18-
command: 'cd plotly-package; tox -e py27-core'
18+
command: 'cd packages/python/plotly; tox -e py27-core'
1919
no_output_timeout: 20m
2020

2121
python-3.5-core:
@@ -31,7 +31,7 @@ jobs:
3131
command: 'sudo pip install tox'
3232
- run:
3333
name: Test with tox
34-
command: 'cd plotly-package; tox -e py35-core'
34+
command: 'cd packages/python/plotly; tox -e py35-core'
3535
no_output_timeout: 20m
3636

3737
python-3.6-core:
@@ -47,7 +47,7 @@ jobs:
4747
command: 'sudo pip install tox'
4848
- run:
4949
name: Test with tox
50-
command: 'cd plotly-package; tox -e py36-core'
50+
command: 'cd packages/python/plotly; tox -e py36-core'
5151
no_output_timeout: 20m
5252

5353
python-3.7-core:
@@ -63,7 +63,7 @@ jobs:
6363
command: 'sudo pip install tox'
6464
- run:
6565
name: Test with tox
66-
command: 'cd plotly-package; tox -e py37-core'
66+
command: 'cd packages/python/plotly; tox -e py37-core'
6767
no_output_timeout: 20m
6868

6969
# Optional
@@ -80,11 +80,11 @@ jobs:
8080
command: 'sudo pip install tox'
8181
- run:
8282
name: Install npm dependencies
83-
command: cd plotly-package/plotly/tests/test_optional/test_jupyter && npm install
83+
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
8484
no_output_timeout: 20m
8585
- run:
8686
name: Test with tox
87-
command: 'cd plotly-package; tox -e py27-optional'
87+
command: 'cd packages/python/plotly; tox -e py27-optional'
8888
no_output_timeout: 20m
8989

9090
python-3.5-optional:
@@ -100,11 +100,11 @@ jobs:
100100
command: 'sudo pip install tox'
101101
- run:
102102
name: Install npm dependencies
103-
command: cd plotly-package/plotly/tests/test_optional/test_jupyter && npm install
103+
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
104104
no_output_timeout: 20m
105105
- run:
106106
name: Test with tox
107-
command: 'cd plotly-package; tox -e py35-optional'
107+
command: 'cd packages/python/plotly; tox -e py35-optional'
108108
no_output_timeout: 20m
109109

110110
python-3.6-optional:
@@ -120,11 +120,11 @@ jobs:
120120
command: 'sudo pip install tox'
121121
- run:
122122
name: Install npm dependencies
123-
command: cd plotly-package/plotly/tests/test_optional/test_jupyter && npm install
123+
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
124124
no_output_timeout: 20m
125125
- run:
126126
name: Test with tox
127-
command: 'cd plotly-package; tox -e py36-optional'
127+
command: 'cd packages/python/plotly; tox -e py36-optional'
128128
no_output_timeout: 20m
129129

130130
python-3.7-optional:
@@ -140,11 +140,11 @@ jobs:
140140
command: 'sudo pip install tox'
141141
- run:
142142
name: Install npm dependencies
143-
command: cd plotly-package/plotly/tests/test_optional/test_jupyter && npm install
143+
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
144144
no_output_timeout: 20m
145145
- run:
146146
name: Test with tox
147-
command: 'cd plotly-package; tox -e py37-optional'
147+
command: 'cd packages/python/plotly; tox -e py37-optional'
148148
no_output_timeout: 20m
149149

150150
# Plot.ly
@@ -161,7 +161,7 @@ jobs:
161161
command: 'sudo pip install tox'
162162
- run:
163163
name: Test with tox
164-
command: 'cd chart-studio-package; tox -e py27-plot_ly'
164+
command: 'cd packages/python/chart-studio; tox -e py27-plot_ly'
165165
no_output_timeout: 20m
166166

167167
python-3.5-plot_ly:
@@ -177,7 +177,7 @@ jobs:
177177
command: 'sudo pip install tox'
178178
- run:
179179
name: Test with tox
180-
command: 'cd chart-studio-package; tox -e py35-plot_ly'
180+
command: 'cd packages/python/chart-studio; tox -e py35-plot_ly'
181181
no_output_timeout: 20m
182182

183183
python-3.7-plot_ly:
@@ -193,7 +193,7 @@ jobs:
193193
command: 'sudo pip install tox'
194194
- run:
195195
name: Test with tox
196-
command: 'cd chart-studio-package; tox -e py37-plot_ly'
196+
command: 'cd packages/python/chart-studio; tox -e py37-plot_ly'
197197
no_output_timeout: 20m
198198

199199
python-2-7-orca:
@@ -220,8 +220,8 @@ jobs:
220220
command: |
221221
. /home/circleci/miniconda/etc/profile.d/conda.sh
222222
conda activate circle_optional
223-
pytest --disable-warnings plotly-package/plotly/tests/test_core
224-
pytest plotly-package/plotly/tests/test_orca
223+
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
224+
pytest packages/python/plotly/plotly/tests/test_orca
225225
226226
- store_artifacts:
227227
path: plotly/tests/test_orca/images/linux/failed
@@ -250,8 +250,8 @@ jobs:
250250
command: |
251251
. /home/circleci/miniconda/etc/profile.d/conda.sh
252252
conda activate circle_optional
253-
pytest --disable-warnings plotly-package/plotly/tests/test_core
254-
pytest plotly-package/plotly/tests/test_orca
253+
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
254+
pytest packages/python/plotly/plotly/tests/test_orca
255255
256256
- store_artifacts:
257257
path: plotly/tests/test_orca/images/linux/failed
@@ -280,8 +280,8 @@ jobs:
280280
command: |
281281
. /home/circleci/miniconda/etc/profile.d/conda.sh
282282
conda activate circle_optional
283-
pytest --disable-warnings plotly-package/plotly/tests/test_core
284-
pytest plotly-package/plotly/tests/test_orca
283+
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
284+
pytest packages/python/plotly/plotly/tests/test_orca
285285
286286
- store_artifacts:
287287
path: plotly/tests/test_orca/images/linux/failed
@@ -300,44 +300,44 @@ jobs:
300300
command: 'sudo pip install tox requests yapf pytz decorator retrying inflect'
301301
- run:
302302
name: Update plotlywidget version
303-
command: 'cd plotly-package; python setup.py updateplotlywidgetversion'
303+
command: 'cd packages/python/plotly; python setup.py updateplotlywidgetversion'
304304
- run:
305305
name: Update plotly.js to dev
306-
command: 'cd plotly-package; python setup.py updateplotlyjsdev'
306+
command: 'cd packages/python/plotly; python setup.py updateplotlyjsdev'
307307
- run:
308308
name: Test with tox
309309
command: |
310-
cd plotly-package
310+
cd packages/python/plotly
311311
locale
312312
tox -e py37-core -- -a '!nodev'
313313
no_output_timeout: 20m
314314
- run:
315315
name: Commit
316316
command: |
317-
cd plotly-package
317+
cd packages/python/plotly
318318
sudo mkdir /dist
319319
git config --global user.email "[email protected]"
320320
git config --global user.name "Your Name"
321321
git add -A
322322
git commit -m "Codegen"
323323
when: always
324324
- run:
325-
name: Build source distribution package
325+
name: Build source distribution packages
326326
command: |
327-
cd plotly-package
327+
cd packages/python/plotly
328328
python setup.py sdist
329329
sudo cp dist/* /dist
330330
when: always
331331
- run:
332332
name: npm-pack widget
333333
command: |
334-
cd js/
334+
cd packages/javascript/plotlywidget/
335335
npm install webpack
336336
npm pack
337337
sudo cp ./plotlywidget* /dist
338338
when: always
339339
- store_artifacts:
340-
path: plotly-package/dist
340+
path: packages/python/plotly/dist
341341

342342
workflows:
343343
version: 2

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plotly/presentation_objs/
2020

2121
.idea
2222

23-
js/node_modules/
23+
node_modules/
2424

2525
.pytest_cache
2626

Diff for: package-lock.json

-3
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: js/webpack.config.js renamed to packages/javascript/plotlywidget/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = [
2222
output: {
2323
filename: 'extension.js',
2424
path: path.resolve(
25-
__dirname, '..', 'plotly-package', 'plotlywidget', 'static'),
25+
__dirname, '..', '..', 'python', 'plotly', 'plotlywidget', 'static'),
2626
libraryTarget: 'amd'
2727
}
2828
},
@@ -36,7 +36,7 @@ module.exports = [
3636
output: {
3737
filename: 'index.js',
3838
path: path.resolve(
39-
__dirname, '..', 'plotly-package', 'plotlywidget', 'static'),
39+
__dirname, '..', '..', 'python', 'plotly', 'plotlywidget', 'static'),
4040
libraryTarget: 'amd'
4141
},
4242
node: {
File renamed without changes.
File renamed without changes.

Diff for: chart-studio-package/tox.ini renamed to packages/python/chart-studio/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ deps=
6464
numpy==1.14.3
6565
ipywidgets==7.2.0
6666
matplotlib==2.2.3
67-
--editable=file:///{toxinidir}/../plotly-package
67+
--editable=file:///{toxinidir}/../plotly
6868

6969

7070
; Plot.ly environments
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: plotly-package/codegen/__init__.py renamed to packages/python/plotly/codegen/__init__.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ def perform_codegen():
8383
# ---------------------------------
8484
# (relative to project root)
8585
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')
86+
packages_py = opath.dirname(opath.dirname(opath.dirname(abs_file_path)))
87+
outdir = opath.join(packages_py, 'plotly', 'plotly')
8988

9089
# Delete prior codegen output
9190
# ---------------------------
@@ -107,8 +106,8 @@ def perform_codegen():
107106
# Load plotly schema
108107
# ------------------
109108
plot_schema_path = opath.join(
110-
project_root,
111-
'plotly-package',
109+
packages_py,
110+
'plotly',
112111
'codegen',
113112
'resources',
114113
'plot-schema.json',
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)