Skip to content

Commit e41dcab

Browse files
authored
Merge pull request #4970 from plotly/use-pyprojecttoml
Move package metadata into pyproject.toml and all other python code into separate file
2 parents 19b611d + 10b2b87 commit e41dcab

File tree

160 files changed

+458
-3585
lines changed

Some content is hidden

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

160 files changed

+458
-3585
lines changed

.circleci/config.yml

+23-64
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ commands:
1818
command: |
1919
python -m venv venv
2020
. venv/bin/activate
21-
pip install --upgrade pip wheel
21+
pip install -e .
2222
pip install -r ./test_requirements/requirements_<<parameters.py>>_core.txt
2323
- run:
2424
name: Test core
2525
command: |
2626
. venv/bin/activate
27-
python -m pytest plotly/tests/test_core
27+
pytest tests/test_core
2828
no_output_timeout: 20m
2929

3030
test_optional:
@@ -41,7 +41,7 @@ commands:
4141
command: |
4242
python -m venv venv
4343
. venv/bin/activate
44-
pip install --upgrade pip wheel
44+
pip install -e .
4545
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
4646
cd js
4747
npm ci
@@ -55,25 +55,25 @@ commands:
5555
name: Test core
5656
command: |
5757
. venv/bin/activate
58-
python -m pytest plotly/tests/test_core
58+
pytest tests/test_core
5959
no_output_timeout: 20m
6060
- run:
6161
name: Test optional
6262
command: |
6363
. venv/bin/activate
64-
python -m pytest plotly/tests/test_optional
64+
pytest tests/test_optional
6565
no_output_timeout: 40m
6666
- run:
6767
name: Test utils
6868
command: |
6969
. venv/bin/activate
70-
python -m pytest _plotly_utils/tests/
70+
pytest tests/test_plotly_utils/
7171
no_output_timeout: 20m
7272
- run:
7373
name: Test io
7474
command: |
7575
. venv/bin/activate
76-
python -m pytest plotly/tests/test_io
76+
pytest tests/test_io
7777
no_output_timeout: 20m
7878
- run:
7979
name: Test dependencdies not imported
@@ -99,7 +99,6 @@ commands:
9999
command: |
100100
python -m venv venv
101101
. venv/bin/activate
102-
pip install --upgrade pip wheel
103102
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
104103
- run:
105104
name: Install plotly-geo
@@ -118,10 +117,10 @@ commands:
118117
name: Test orca
119118
command: |
120119
. venv/bin/activate
121-
python -m pytest plotly/tests/test_orca
120+
pytest tests/test_orca
122121
no_output_timeout: 20m
123122
- store_artifacts:
124-
path: plotly/tests/test_orca/images/linux/failed
123+
path: tests/test_orca/images/linux/failed
125124

126125
jobs:
127126
check-code-formatting:
@@ -269,7 +268,6 @@ jobs:
269268
command: |
270269
python -m venv venv
271270
. venv/bin/activate
272-
pip install --upgrade pip wheel
273271
pip install -e .
274272
pip install plotly-geo
275273
pip install -r test_requirements/requirements_39_pandas_2_optional.txt
@@ -299,7 +297,7 @@ jobs:
299297
300298
plotlyjs_dev_build:
301299
docker:
302-
- image: cimg/python:3.8-node
300+
- image: cimg/python:3.11-node
303301
environment:
304302
LANG: en_US.UTF-8
305303
resource_class: large
@@ -311,25 +309,20 @@ jobs:
311309
command: |
312310
python -m venv venv
313311
. venv/bin/activate
314-
pip install --upgrade pip wheel
315-
pip install -r ./test_requirements/requirements_38_core.txt black inflect
312+
pip install -e .
313+
pip install -r ./test_requirements/requirements_311_core.txt black inflect
316314
pip install jupyterlab
317-
- run:
318-
name: Update jupyter widget plotly.js version
319-
command: |
320-
. venv/bin/activate
321-
python setup.py updateplotlywidgetversion
322315
- run:
323316
name: Update plotly.js to dev
324317
command: |
325318
. venv/bin/activate
326-
python setup.py updateplotlyjsdev
319+
python commands.py updateplotlyjsdev
327320
- run:
328321
name: Test core
329322
command: |
330323
. venv/bin/activate
331324
locale
332-
python -m pytest -k 'not nodev' plotly/tests/test_core
325+
pytest -k 'not nodev' tests/test_core
333326
no_output_timeout: 20m
334327
- run:
335328
name: Commit
@@ -343,36 +336,27 @@ jobs:
343336
name: Build source distribution packages
344337
command: |
345338
. venv/bin/activate
346-
python setup.py sdist
339+
pip install build
340+
python -m build --sdist --wheel -o dist
347341
when: always
348342
- store_artifacts:
349343
path: dist/
350344

351345
full_build:
352346
docker:
353-
- image: continuumio/miniconda3:24.3.0-0
347+
- image: cimg/python:3.11-node
354348
environment:
355349
LANG: en_US.UTF-8
356350
resource_class: large
357351

358352
steps:
359353
- checkout
360354

361-
- run:
362-
name: Create conda environment
363-
command: |
364-
conda config --remove channels defaults
365-
conda config --add channels conda-forge
366-
conda create -n env --yes python=3.9 conda-build=3.28.4 conda-verify
367-
conda install -n env -c conda-forge jupyterlab nodejs=16
368-
conda init bash
369-
mkdir output
370-
371355
- run:
372356
name: initial NPM Build
373357
command: |
374-
eval "$(conda shell.bash hook)"
375-
conda activate env
358+
python -m venv venv
359+
. venv/bin/activate
376360
cd js
377361
npm ci
378362
npm run build
@@ -381,41 +365,17 @@ jobs:
381365
- run:
382366
name: PyPI Build
383367
command: |
384-
eval "$(conda shell.bash hook)"
385-
conda activate env
386-
python setup.py sdist bdist_wheel
387-
cp -R dist output/dist
388-
git status
389-
390-
- run:
391-
name: Conda Build
392-
command: |
393-
eval "$(conda shell.bash hook)"
394-
conda activate env
395-
conda build recipe/
396-
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 output/
368+
. venv/bin/activate
369+
pip install build
370+
python -m build --sdist --wheel -o dist
371+
cp -R dist output
397372
git status
398373
399-
- run:
400-
name: Build Widget javascript bundle
401-
command: |
402-
eval "$(conda shell.bash hook)"
403-
conda activate env
404-
cd js
405-
npm ci
406-
npm run build
407-
408374
- run:
409375
name: Zip output
410376
command: |
411377
tar czf output.tgz output
412378
413-
- run:
414-
name: Git Diff
415-
command: |
416-
git status
417-
git diff
418-
419379
- store_artifacts:
420380
path: output.tgz
421381

@@ -445,7 +405,6 @@ jobs:
445405
cd doc
446406
python -m venv venv
447407
. venv/bin/activate
448-
pip install --upgrade pip wheel
449408
pip uninstall -y plotly
450409
pip install -r requirements.txt
451410
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then

.gitattributes

-1
This file was deleted.

.gitignore

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
0
22
0.html
33
iframe_figures/
4-
plotly/tests/test_orca/images/linux/failed/
4+
tests/test_orca/images/linux/failed/
55

66
*.egg-info
77

@@ -49,19 +49,16 @@ plotly.egg-info/
4949
# macOS utility file
5050
**/.DS_Store
5151

52-
plotly/tests/test_orca/images/*/failed
53-
plotly/tests/test_orca/images/*/tmp
54-
/plotly-package/plotly/tests/test_core/test_offline/plotly.min.js
52+
tests/test_orca/images/*/failed
53+
tests/test_orca/images/*/tmp
54+
tests/test_core/test_offline/plotly.min.js
5555
temp-plot.html
5656
.vscode
5757
doc/python/.ipynb_checkpoints
5858
doc/python/.mapbox_token
5959
doc/.ipynb_checkpoints
6060
tags
6161
doc/check-or-enforce-order.py
62-
63-
jupyterlab_plotly/labextension/
64-
jupyterlab_plotly/nbextension/index.js*
6562
plotly/package_data/widgetbundle.js
6663

6764
test/percy/*.html

MANIFEST.in

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
include LICENSE.txt
22
include README.md
3-
include versioneer.py
4-
include plotly/_version.py
53
include requires-install.txt
64
include requires-express.txt
75
include plotly/package_data/widgetbundle.js

0 commit comments

Comments
 (0)