Skip to content

Move package metadata into pyproject.toml and all other python code into separate file #4970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a6f02b7
Move package metadata into pyproject.toml and all other python code i…
marthacryan Jan 14, 2025
7be470b
Cleanup extra changes
marthacryan Jan 14, 2025
7170a51
Revert changes to command names
marthacryan Jan 14, 2025
6a2d9bc
Add version attr
marthacryan Jan 14, 2025
37807da
Add correct output directory for artifacts
marthacryan Jan 14, 2025
41cd025
Move version into separate file
marthacryan Jan 15, 2025
7fd6870
Attempt to fix version issues
marthacryan Jan 16, 2025
cdd0204
Attempt to fix version issues
marthacryan Jan 16, 2025
48cc36a
Merge with master
marthacryan Jan 30, 2025
9795406
Add pip install editable to CI config
marthacryan Jan 30, 2025
39750d5
Add version attribute
marthacryan Jan 30, 2025
937ad46
Remove extra reference to version.py
marthacryan Jan 30, 2025
0d06ded
Code format
marthacryan Jan 30, 2025
ca9aa0a
Explicitly import importlib.metadata
marthacryan Jan 30, 2025
ec7c557
Add __name__ == main wrapper around command line arg parsing
marthacryan Jan 30, 2025
6ea167d
update to python 3.9 for dev build to fix importlib error
marthacryan Jan 30, 2025
6f40cdc
Remove unnecessary widget version
marthacryan Jan 30, 2025
2ef2559
Update version of python for dev build CI
marthacryan Jan 30, 2025
634c787
Add pip install editable
marthacryan Jan 30, 2025
8abdeaf
Add pyproject.toml to conda recipe
marthacryan Jan 30, 2025
dafa57f
Fix filepath in conda recipe
marthacryan Jan 30, 2025
370efcd
Fix accessing of pyproject.toml version in conda recipe
marthacryan Feb 3, 2025
dc1b55b
Merge with master
marthacryan Feb 4, 2025
011d410
Remove setup.py from root
marthacryan Feb 4, 2025
48e7de3
Fix filepath in commands.py
marthacryan Feb 4, 2025
d1905cb
Use new variable name for project root in commands.py
marthacryan Feb 4, 2025
f68d997
Remove conda from CI and release
marthacryan Feb 4, 2025
2a366ef
Add license file and pytest to pyproject.toml
marthacryan Feb 4, 2025
69897ae
Fix syntax issues with pyproject.toml
marthacryan Feb 4, 2025
bcfa6a7
Update release instructions
marthacryan Feb 4, 2025
1f1dae9
remove versioneer from manifest.in
marthacryan Feb 5, 2025
2ca6dae
Pin narwhals version
marthacryan Feb 5, 2025
a7499c1
Update pyproject.toml
marthacryan Feb 5, 2025
56d2096
Remove wheel install from CI
marthacryan Feb 5, 2025
ac57d7d
Merge branch 'use-pyprojecttoml' of github.com:plotly/plotly.py into …
marthacryan Feb 5, 2025
c6992fc
Update pin of pandas instead of narwhals
marthacryan Feb 5, 2025
5111cfa
Merge branch 'master' of github.com:plotly/plotly.py into use-pyproje…
marthacryan Feb 5, 2025
15a7028
Move tests out of the plotly directory
marthacryan Feb 6, 2025
f3db071
Rename any references to plotly/tests with just tests
marthacryan Feb 6, 2025
6acd25a
Move plotly_utils tests into root tests directory
marthacryan Feb 6, 2025
0c343ef
Reset filepath to one that will cause import to fail
marthacryan Feb 6, 2025
98f2c8f
Fix filepath in optional_imports test
marthacryan Feb 6, 2025
28a5b74
Update filepaths to plotly_utils tests
marthacryan Feb 6, 2025
39032fb
Black
marthacryan Feb 6, 2025
4573074
Black
marthacryan Feb 6, 2025
10b2b87
Merge with master
marthacryan Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 23 additions & 64 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ commands:
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -e .
pip install -r ./test_requirements/requirements_<<parameters.py>>_core.txt
- run:
name: Test core
command: |
. venv/bin/activate
python -m pytest plotly/tests/test_core
pytest tests/test_core
no_output_timeout: 20m

test_optional:
Expand All @@ -41,7 +41,7 @@ commands:
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -e .
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
cd js
npm ci
Expand All @@ -55,25 +55,25 @@ commands:
name: Test core
command: |
. venv/bin/activate
python -m pytest plotly/tests/test_core
pytest tests/test_core
no_output_timeout: 20m
- run:
name: Test optional
command: |
. venv/bin/activate
python -m pytest plotly/tests/test_optional
pytest tests/test_optional
no_output_timeout: 40m
- run:
name: Test utils
command: |
. venv/bin/activate
python -m pytest _plotly_utils/tests/
pytest tests/test_plotly_utils/
no_output_timeout: 20m
- run:
name: Test io
command: |
. venv/bin/activate
python -m pytest plotly/tests/test_io
pytest tests/test_io
no_output_timeout: 20m
- run:
name: Test dependencdies not imported
Expand All @@ -99,7 +99,6 @@ commands:
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
- run:
name: Install plotly-geo
Expand All @@ -118,10 +117,10 @@ commands:
name: Test orca
command: |
. venv/bin/activate
python -m pytest plotly/tests/test_orca
pytest tests/test_orca
no_output_timeout: 20m
- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
path: tests/test_orca/images/linux/failed

jobs:
check-code-formatting:
Expand Down Expand Up @@ -269,7 +268,6 @@ jobs:
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -e .
pip install plotly-geo
pip install -r test_requirements/requirements_39_pandas_2_optional.txt
Expand Down Expand Up @@ -299,7 +297,7 @@ jobs:

plotlyjs_dev_build:
docker:
- image: cimg/python:3.8-node
- image: cimg/python:3.11-node
environment:
LANG: en_US.UTF-8
resource_class: large
Expand All @@ -311,25 +309,20 @@ jobs:
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ./test_requirements/requirements_38_core.txt black inflect
pip install -e .
pip install -r ./test_requirements/requirements_311_core.txt black inflect
pip install jupyterlab
- run:
name: Update jupyter widget plotly.js version
command: |
. venv/bin/activate
python setup.py updateplotlywidgetversion
- run:
name: Update plotly.js to dev
command: |
. venv/bin/activate
python setup.py updateplotlyjsdev
python commands.py updateplotlyjsdev
- run:
name: Test core
command: |
. venv/bin/activate
locale
python -m pytest -k 'not nodev' plotly/tests/test_core
pytest -k 'not nodev' tests/test_core
no_output_timeout: 20m
- run:
name: Commit
Expand All @@ -343,36 +336,27 @@ jobs:
name: Build source distribution packages
command: |
. venv/bin/activate
python setup.py sdist
pip install build
python -m build --sdist --wheel -o dist
when: always
- store_artifacts:
path: dist/

full_build:
docker:
- image: continuumio/miniconda3:24.3.0-0
- image: cimg/python:3.11-node
environment:
LANG: en_US.UTF-8
resource_class: large

steps:
- checkout

- run:
name: Create conda environment
command: |
conda config --remove channels defaults
conda config --add channels conda-forge
conda create -n env --yes python=3.9 conda-build=3.28.4 conda-verify
conda install -n env -c conda-forge jupyterlab nodejs=16
conda init bash
mkdir output

- run:
name: initial NPM Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
python -m venv venv
. venv/bin/activate
cd js
npm ci
npm run build
Expand All @@ -381,41 +365,17 @@ jobs:
- run:
name: PyPI Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
python setup.py sdist bdist_wheel
cp -R dist output/dist
git status

- run:
name: Conda Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
conda build recipe/
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 output/
. venv/bin/activate
pip install build
python -m build --sdist --wheel -o dist
cp -R dist output
git status

- run:
name: Build Widget javascript bundle
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd js
npm ci
npm run build

- run:
name: Zip output
command: |
tar czf output.tgz output

- run:
name: Git Diff
command: |
git status
git diff

- store_artifacts:
path: output.tgz

Expand Down Expand Up @@ -445,7 +405,6 @@ jobs:
cd doc
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip uninstall -y plotly
pip install -r requirements.txt
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
Expand Down
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0
0.html
iframe_figures/
plotly/tests/test_orca/images/linux/failed/
tests/test_orca/images/linux/failed/

*.egg-info

Expand Down Expand Up @@ -49,19 +49,16 @@ plotly.egg-info/
# macOS utility file
**/.DS_Store

plotly/tests/test_orca/images/*/failed
plotly/tests/test_orca/images/*/tmp
/plotly-package/plotly/tests/test_core/test_offline/plotly.min.js
tests/test_orca/images/*/failed
tests/test_orca/images/*/tmp
tests/test_core/test_offline/plotly.min.js
temp-plot.html
.vscode
doc/python/.ipynb_checkpoints
doc/python/.mapbox_token
doc/.ipynb_checkpoints
tags
doc/check-or-enforce-order.py

jupyterlab_plotly/labextension/
jupyterlab_plotly/nbextension/index.js*
plotly/package_data/widgetbundle.js

test/percy/*.html
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include LICENSE.txt
include README.md
include versioneer.py
include plotly/_version.py
include requires-install.txt
include requires-express.txt
include plotly/package_data/widgetbundle.js
Loading