Skip to content

Commit

Permalink
Merge pull request #5002 from plotly/simplify-dir-structure
Browse files Browse the repository at this point in the history
Move `packages/python/plotly` to top level
  • Loading branch information
emilykl authored Feb 4, 2025
2 parents 9910078 + 9e15334 commit 5813a8a
Show file tree
Hide file tree
Showing 15,197 changed files with 655 additions and 689 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
45 changes: 12 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ commands:
- run:
name: Install dependencies
command: |
cd packages/python/plotly
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ./test_requirements/requirements_<<parameters.py>>_core.txt
- run:
name: Test core
command: |
cd packages/python/plotly
. venv/bin/activate
pytest plotly/tests/test_core
no_output_timeout: 20m
Expand All @@ -41,7 +39,6 @@ commands:
- run:
name: Install dependencies
command: |
cd packages/python/plotly
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
Expand All @@ -52,47 +49,40 @@ commands:
- run:
name: Install plotly-geo
command: |
cd packages/python/plotly
. venv/bin/activate
pip install plotly-geo
- run:
name: Test core
command: |
cd packages/python/plotly
. venv/bin/activate
pytest plotly/tests/test_core
no_output_timeout: 20m
- run:
name: Test optional
command: |
cd packages/python/plotly
. venv/bin/activate
pytest plotly/tests/test_optional
no_output_timeout: 40m
- run:
name: Test utils
command: |
cd packages/python/plotly
. venv/bin/activate
pytest _plotly_utils/tests/
no_output_timeout: 20m
- run:
name: Test io
command: |
cd packages/python/plotly
. venv/bin/activate
pytest plotly/tests/test_io
no_output_timeout: 20m
- run:
name: Test dependencdies not imported
command: |
cd packages/python/plotly
. venv/bin/activate
pytest -x test_init/test_dependencies_not_imported.py
- run:
name: Test lazy imports
command: |
cd packages/python/plotly
. venv/bin/activate
pytest -x test_init/test_lazy_imports.py
test_orca:
Expand All @@ -107,15 +97,13 @@ commands:
- run:
name: Install dependencies
command: |
cd packages/python/plotly
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
command: |
cd packages/python/plotly
. venv/bin/activate
pip install plotly-geo
- run:
Expand All @@ -129,12 +117,11 @@ commands:
- run:
name: Test orca
command: |
cd packages/python/plotly
. venv/bin/activate
pytest plotly/tests/test_orca
no_output_timeout: 20m
- store_artifacts:
path: packages/python/plotly/plotly/tests/test_orca/images/linux/failed
path: plotly/tests/test_orca/images/linux/failed

jobs:
check-code-formatting:
Expand Down Expand Up @@ -283,9 +270,9 @@ jobs:
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -e ./packages/python/plotly
pip install -e .
pip install plotly-geo
pip install -r ./packages/python/plotly/test_requirements/requirements_39_pandas_2_optional.txt
pip install -r test_requirements/requirements_39_pandas_2_optional.txt
- run:
name: Build html figures (Pandas 2)
Expand Down Expand Up @@ -322,7 +309,6 @@ jobs:
- run:
name: Install dependencies
command: |
cd packages/python/plotly
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
Expand All @@ -331,27 +317,23 @@ jobs:
- run:
name: Update jupyter widget plotly.js version
command: |
cd packages/python/plotly
. venv/bin/activate
python setup.py updateplotlywidgetversion
- run:
name: Update plotly.js to dev
command: |
cd packages/python/plotly
. venv/bin/activate
python setup.py updateplotlyjsdev
- run:
name: Test core
command: |
cd packages/python/plotly
. venv/bin/activate
locale
pytest -k 'not nodev' plotly/tests/test_core
no_output_timeout: 20m
- run:
name: Commit
command: |
cd packages/python/plotly
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add -A
Expand All @@ -360,12 +342,11 @@ jobs:
- run:
name: Build source distribution packages
command: |
cd packages/python/plotly
. venv/bin/activate
python setup.py sdist
when: always
- store_artifacts:
path: packages/python/plotly/dist
path: dist/

full_build:
docker:
Expand All @@ -392,7 +373,7 @@ jobs:
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd packages/python/plotly/js
cd js
npm ci
npm run build
git status
Expand All @@ -402,27 +383,25 @@ jobs:
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd packages/python/plotly
python setup.py sdist bdist_wheel
cp -R dist ../../../output/dist
cp -R dist output/dist
git status
- run:
name: Conda Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd packages/python/plotly
conda build recipe/
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 ../../../output
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 output/
git status
- run:
name: Build Widget javascript bundle
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd packages/python/plotly/js
cd js
npm ci
npm run build
Expand Down Expand Up @@ -471,12 +450,12 @@ jobs:
pip install -r requirements.txt
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
pip uninstall -y plotly
cd ../packages/python/plotly
cd ..
pip install -e .
cd js
npm ci
npm run build
cd ../../../../doc
cd ../doc
fi
cd ..
- run:
Expand Down Expand Up @@ -553,9 +532,9 @@ jobs:
# graph_objs/graph_objects
if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
pip uninstall -y plotly
cd ../packages/python/plotly
cd ..
pip install -e .
cd ../../../doc
cd doc
cd apidoc
make html
cd _build/html
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
packages/python/plotly/plotly/_version.py export-subst
plotly/_version.py export-subst
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0
0.html
iframe_figures/
packages/python/plotly/plotly/tests/test_orca/images/linux/failed/
plotly/tests/test_orca/images/linux/failed/

*.egg-info

Expand All @@ -15,6 +15,7 @@ doc/python/raw.githubusercontent.com/

# Don't ignore dataset files
!*.csv.gz
!*.geojson.gz

*.ipynb

Expand Down Expand Up @@ -59,10 +60,9 @@ doc/.ipynb_checkpoints
tags
doc/check-or-enforce-order.py

packages/javascript/jupyterlab-plotly/lib/
packages/python/plotly/jupyterlab_plotly/labextension/
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*
packages/python/plotly/plotly/package_data/widgetbundle.js
jupyterlab_plotly/labextension/
jupyterlab_plotly/nbextension/index.js*
plotly/package_data/widgetbundle.js

test/percy/*.html
test/percy/pandas2/*.html
File renamed without changes.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ or conda
conda install -c plotly plotly-geo=1.0.0
```

`plotly-geo` can be found on Github at https://github.com/plotly/plotly-geo.

## Copyright and Licenses

Code and documentation copyright 2019 Plotly, Inc.
Expand Down
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def perform_codegen():
# ---------------------------------
# (relative to project root)
abs_file_path = opath.realpath(__file__)
packages_py = opath.dirname(opath.dirname(opath.dirname(abs_file_path)))
outdir = opath.join(packages_py, "plotly", "plotly")
project_root = opath.dirname(opath.dirname(abs_file_path))
outdir = opath.join(project_root, "plotly")

# Delete prior codegen output
# ---------------------------
Expand All @@ -113,7 +113,7 @@ def perform_codegen():
# Load plotly schema
# ------------------
plot_schema_path = opath.join(
packages_py, "plotly", "codegen", "resources", "plot-schema.json"
project_root, "codegen", "resources", "plot-schema.json"
)

with open(plot_schema_path, "r") as f:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5813a8a

Please sign in to comment.