-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Unpin test requirements #5019
Open
marthacryan
wants to merge
37
commits into
main
Choose a base branch
from
unpin-requirements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Unpin test requirements #5019
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
f356c8a
Unpin test requirements and use the same requirements for all python …
marthacryan 27c0e9d
Remove extra requirements files
marthacryan fab49c7
remove plotly-geo install and orca tests from circleci config
marthacryan 397b1ef
pin fiona version for python<=3.8
emilykl 24fe0ee
Only install vaex for python<=3.9
marthacryan c2af57b
Prevent running vaex tests if vaex isn't installed
marthacryan 7855fa6
Code formatting
marthacryan 508135f
Update tests/test_optional/test_px/test_px_input.py
marthacryan 7ca7295
try only running vaex with python 3.9
marthacryan 71c6a95
Merge branch 'unpin-requirements' of github.com:plotly/plotly.py into…
marthacryan d282c49
Set vaex tests to run on only python 3.9
marthacryan ef4abb8
Only run vaex tests if vaex is installed
marthacryan f06ed71
Merge with master
marthacryan fe3740e
Fix handling of vaex not being present
marthacryan 719292e
remove extraneous import of ipython display
marthacryan cae9d77
remove unnecessary py parameter and add numpy_installed parameter
marthacryan bcdc224
Update conditional in circleci config
marthacryan c493669
Fix syntax of conditional
marthacryan 1367fa4
Fix conditional
marthacryan 7095710
Parameterize jobs
marthacryan acc61b4
Fix python versions
marthacryan 8c3bb2e
Fix indentation
marthacryan 707bf68
Rename job for readability of CI output
marthacryan 777e376
Switch to uv for other tests
marthacryan 19e2c9a
Merge branch 'main' of github.com:plotly/plotly.py into unpin-require…
marthacryan f780164
Revert to pip for pandas downgrade
marthacryan f140060
Address review
marthacryan c9215f0
Revert changes to black version
marthacryan 4664d15
Add pandas version as parameter
marthacryan d9c9c5e
Use pip for downgrade
marthacryan 36c0437
Use easier to read name for jobs
marthacryan 29f984b
Try different pandas version
marthacryan 2a63724
Remove numpy config
marthacryan 954db31
Prevent pandas install step if default
marthacryan 396b066
Merge branch 'main' of github.com:plotly/plotly.py into unpin-require…
marthacryan 60d8682
Remove narwhals from dependencies
marthacryan 5e90e7d
Remove narwhals from core requirements
marthacryan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,18 @@ version: 2.1 | |
orbs: | ||
browser-tools: circleci/[email protected] | ||
|
||
commands: | ||
test_core: | ||
executors: | ||
docker-container: | ||
parameters: | ||
py: | ||
default: "310" | ||
python_version: | ||
description: "python version" | ||
default: "3.10" | ||
type: string | ||
docker: | ||
- image: cimg/python:<<parameters.python_version>>-browsers | ||
|
||
commands: | ||
test_core: | ||
steps: | ||
- checkout | ||
- browser-tools/install-chrome | ||
|
@@ -19,7 +25,7 @@ commands: | |
python -m venv venv | ||
. venv/bin/activate | ||
pip install -e . | ||
pip install -r ./test_requirements/requirements_<<parameters.py>>_core.txt | ||
pip install -r ./test_requirements/requirements_core.txt | ||
- run: | ||
name: Test core | ||
command: | | ||
|
@@ -29,8 +35,7 @@ commands: | |
|
||
test_optional: | ||
parameters: | ||
py: | ||
default: "310" | ||
pandas_version: | ||
type: string | ||
steps: | ||
- checkout | ||
|
@@ -43,15 +48,20 @@ commands: | |
uv venv | ||
source .venv/bin/activate | ||
uv pip install . | ||
uv pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt | ||
uv pip install -r ./test_requirements/requirements_optional.txt | ||
cd js | ||
npm ci | ||
npm run build | ||
- run: | ||
name: Install plotly-geo | ||
command: | | ||
source .venv/bin/activate | ||
uv pip install plotly-geo | ||
|
||
- when: | ||
condition: <<parameters.pandas_version>> | ||
steps: | ||
- run: | ||
name: Install pandas | ||
command: | | ||
source .venv/bin/activate | ||
pip install pandas==<<parameters.pandas_version>> | ||
|
||
- run: | ||
name: Test core | ||
command: | | ||
|
@@ -86,42 +96,6 @@ commands: | |
command: | | ||
source .venv/bin/activate | ||
python -m pytest -x test_init/test_lazy_imports.py | ||
test_orca: | ||
parameters: | ||
py: | ||
default: "310" | ||
type: string | ||
steps: | ||
- checkout | ||
- browser-tools/install-chrome | ||
- browser-tools/install-chromedriver | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt | ||
- run: | ||
name: Install plotly-geo | ||
command: | | ||
. venv/bin/activate | ||
pip install plotly-geo | ||
- run: | ||
name: Install orca | ||
command: | | ||
npm install [email protected] | ||
npm install orca | ||
sudo apt-get update | ||
sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 rename | ||
echo 'export PATH="/home/circleci/project/node_modules/.bin:$PATH"' >> $BASH_ENV | ||
- run: | ||
name: Test orca | ||
command: | | ||
. venv/bin/activate | ||
pytest tests/test_orca | ||
no_output_timeout: 20m | ||
- store_artifacts: | ||
path: tests/test_orca/images/linux/failed | ||
|
||
jobs: | ||
check-code-formatting: | ||
|
@@ -142,110 +116,31 @@ jobs: | |
. venv/bin/activate | ||
black --check . --exclude venv | ||
|
||
# Core | ||
python_38_core: | ||
docker: | ||
- image: cimg/python:3.8-browsers | ||
steps: | ||
- test_core: | ||
py: "38" | ||
|
||
python_39_core: | ||
docker: | ||
- image: cimg/python:3.9-browsers | ||
steps: | ||
- test_core: | ||
py: "39" | ||
|
||
python_310_core: | ||
docker: | ||
- image: cimg/python:3.10-browsers | ||
steps: | ||
- test_core: | ||
py: "310" | ||
|
||
python_311_core: | ||
docker: | ||
- image: cimg/python:3.11-browsers | ||
steps: | ||
- test_core: | ||
py: "311" | ||
|
||
python_312_core: | ||
docker: | ||
- image: cimg/python:3.12-browsers | ||
steps: | ||
- test_core: | ||
py: "312" | ||
|
||
# Optional | ||
|
||
python_38_optional: | ||
docker: | ||
- image: cimg/python:3.8-browsers | ||
steps: | ||
- test_optional: | ||
py: "38" | ||
|
||
python_39_optional: | ||
docker: | ||
- image: cimg/python:3.9-browsers | ||
steps: | ||
- test_optional: | ||
py: "39" | ||
|
||
python_310_optional: | ||
docker: | ||
- image: cimg/python:3.10-browsers | ||
steps: | ||
- test_optional: | ||
py: "310" | ||
|
||
python_311_optional: | ||
docker: | ||
- image: cimg/python:3.11-browsers | ||
steps: | ||
- test_optional: | ||
py: "311" | ||
|
||
python_312_optional: | ||
docker: | ||
- image: cimg/python:3.12-browsers | ||
steps: | ||
- test_optional: | ||
py: "312" | ||
|
||
# Pandas | ||
|
||
python_39_pandas_2_optional: | ||
docker: | ||
- image: cimg/python:3.9-browsers | ||
steps: | ||
- test_optional: | ||
py: "39_pandas_2" | ||
|
||
# No numpy | ||
python_312_no_numpy: | ||
docker: | ||
- image: cimg/python:3.12-browsers | ||
test_core_py: | ||
parameters: | ||
python_version: | ||
default: "3.10" | ||
type: string | ||
executor: | ||
name: docker-container | ||
python_version: <<parameters.python_version>> | ||
steps: | ||
- run: | ||
name: Check that numpy is not installed | ||
command: | | ||
if pip list | grep numpy > /dev/null 2>&1 | ||
then exit 1 | ||
else exit 0 | ||
fi | ||
- test_optional: | ||
py: "312_no_numpy" | ||
- test_core | ||
|
||
python_312_np2: | ||
docker: | ||
- image: cimg/python:3.12-browsers | ||
test_optional_py: | ||
parameters: | ||
python_version: | ||
default: "3.10" | ||
type: string | ||
pandas_version: | ||
default: "2" | ||
type: string | ||
executor: | ||
name: docker-container | ||
python_version: <<parameters.python_version>> | ||
steps: | ||
- test_optional: | ||
py: "312_np2" | ||
|
||
pandas_version: <<parameters.pandas_version>> | ||
|
||
# Percy | ||
python_39_percy: | ||
|
@@ -267,21 +162,21 @@ jobs: | |
- run: | ||
name: Install requirements | ||
command: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
pip install -e . | ||
pip install plotly-geo | ||
pip install -r test_requirements/requirements_39_pandas_2_optional.txt | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
uv venv | ||
source .venv/bin/activate | ||
uv pip install -e . | ||
uv pip install -r test_requirements/requirements_optional.txt | ||
|
||
- run: | ||
name: Build html figures (Pandas 2) | ||
command: | | ||
. venv/bin/activate | ||
source .venv/bin/activate | ||
python tests/percy/plotly-express.py | ||
- run: | ||
name: Build html figures (Pandas 1) and compare | ||
command: | | ||
. venv/bin/activate | ||
source .venv/bin/activate | ||
mkdir tests/percy/pandas2 | ||
mv tests/percy/*.html tests/percy/pandas2/ | ||
# 1.1 is the earliest minor with Py3.9 wheels | ||
|
@@ -308,36 +203,28 @@ jobs: | |
- run: | ||
name: Install dependencies | ||
command: | | ||
python -m venv venv | ||
. venv/bin/activate | ||
pip install -e . | ||
pip install -r ./test_requirements/requirements_311_core.txt black inflect | ||
pip install jupyterlab | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
uv venv | ||
source .venv/bin/activate | ||
uv pip install -e . | ||
uv pip install -r ./test_requirements/requirements_core.txt black inflect jupyterlab | ||
- run: | ||
name: Update plotly.js to dev | ||
command: | | ||
. venv/bin/activate | ||
source .venv/bin/activate | ||
python commands.py updateplotlyjsdev | ||
- run: | ||
name: Test core | ||
command: | | ||
. venv/bin/activate | ||
source .venv/bin/activate | ||
locale | ||
pytest -k 'not nodev' tests/test_core | ||
no_output_timeout: 20m | ||
- run: | ||
name: Commit | ||
command: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
git add -A | ||
git commit -m "Codegen" | ||
when: always | ||
- run: | ||
name: Build source distribution packages | ||
command: | | ||
. venv/bin/activate | ||
pip install build | ||
source .venv/bin/activate | ||
uv pip install build | ||
python -m build --sdist --wheel -o dist | ||
when: always | ||
- store_artifacts: | ||
|
@@ -397,7 +284,7 @@ jobs: | |
- browser-tools/install-chromedriver | ||
|
||
- run: | ||
name: install dependencies | ||
name: Install dependencies | ||
command: | | ||
cd doc | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
@@ -414,14 +301,6 @@ jobs: | |
cd ../doc | ||
fi | ||
cd .. | ||
- run: | ||
name: Install orca | ||
command: | | ||
npm install [email protected] | ||
npm install orca | ||
sudo apt-get update | ||
sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 rename | ||
echo 'export PATH="/home/circleci/project/node_modules/.bin:$PATH"' >> $BASH_ENV | ||
|
||
- run: | ||
name: make html | ||
|
@@ -516,18 +395,28 @@ workflows: | |
|
||
build: | ||
jobs: | ||
- python_38_core | ||
- python_39_core | ||
- python_310_core | ||
- python_311_core | ||
- python_312_core | ||
- python_38_optional | ||
- python_39_optional | ||
- python_310_optional | ||
- python_311_optional | ||
- python_312_optional | ||
- python_39_pandas_2_optional | ||
- test_core_py: | ||
matrix: | ||
parameters: | ||
python_version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- test_optional_py: | ||
matrix: | ||
parameters: | ||
python_version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
name: "Test optional with python << parameters.python_version >>" | ||
- test_optional_py: | ||
name: "Test optional with pandas 1.2.4" | ||
python_version: "3.9" | ||
pandas_version: "1.2.4" | ||
- python_39_percy | ||
- python_312_no_numpy | ||
- python_312_np2 | ||
- build-doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(does this work?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it doesn't look like the other one is working so I don't think we can actually use this here :(