Skip to content

Commit

Permalink
Merge pull request #186 from bluelabsio/RM-29-old-pandas-test
Browse files Browse the repository at this point in the history
Fix redshift-s3-itest-old-pandas: install an old numpy to match old pandas
  • Loading branch information
Brunope authored Jan 3, 2023
2 parents 12aa7bd + 4cbbfaa commit fb953f1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ commands:
pandas_version:
type: string
description: "Version of pandas to test against, or empty string for none"
numpy_version:
# only needed for old-pandas itest
type: string
description: "Version of numpy to test against, if specific version required"
default: ""
steps:
- restore_cache:
key: deps-v2-<<parameters.python_version>>-<<parameters.pandas_version>>-<<parameters.extras>>-<<parameters.include_dev_dependencies>>-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
key: deps-v5-<<parameters.python_version>>-<<parameters.pandas_version>>-<<parameters.extras>>-<<parameters.include_dev_dependencies>>-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
- run:
name: Install python deps in venv
command: |
Expand All @@ -38,6 +43,10 @@ commands:
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
if [ '<<parameters.numpy_version>>' != '' ]
then
pip install --progress-bar=off 'numpy<<parameters.numpy_version>>'
fi
if [ '<<parameters.include_dev_dependencies>>' == 'true' ]
then
pip install --progress-bar=off -r requirements.txt
Expand All @@ -51,7 +60,7 @@ commands:
fi
fi
- save_cache:
key: deps-v2-<<parameters.python_version>>-<<parameters.pandas_version>>-<<parameters.extras>>-<<parameters.include_dev_dependencies>>-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
key: deps-v5-<<parameters.python_version>>-<<parameters.pandas_version>>-<<parameters.extras>>-<<parameters.include_dev_dependencies>>-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "setup.py" }}
paths:
- "venv"
wait_for_db:
Expand Down Expand Up @@ -255,6 +264,9 @@ jobs:
pandas_version:
type: string
default: '==1.3.5'
numpy_version:
type: string
default: ""
db_name:
type: string
description: "Database to run inside"
Expand All @@ -279,6 +291,7 @@ jobs:
extras: <<parameters.extras>>
python_version: <<parameters.python_version>>
pandas_version: <<parameters.pandas_version>>
numpy_version: <<parameters.numpy_version>>
- run:
name: Run tests
command: |
Expand Down Expand Up @@ -570,6 +583,7 @@ workflows:
extras: '[redshift-binary,itest]'
python_version: "3.8"
pandas_version: "<1"
numpy_version: "<1.24"
db_name: demo-itest
requires:
- redshift-s3-itest
Expand Down

0 comments on commit fb953f1

Please sign in to comment.