-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Refactor CI #46493
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
Closed
Closed
Refactor CI #46493
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 hidden or 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
File renamed without changes.
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build pandas | ||
description: Rebuilds the C extensions and installs pandas | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Environment Detail | ||
run: | | ||
if which mamba 2>/dev/null; then | ||
mamba info | ||
mamba list | ||
mamba info | grep -Ei 'environment.+:' | grep -qEiv 'environment.+:.+none' | ||
fi | ||
pip list | ||
python --version | ||
shell: bash -el {0} | ||
|
||
- name: Build Pandas | ||
run: | | ||
which python | ||
which pip | ||
time python setup.py build_ext -v -j 2 | ||
pip install -v -e . --no-build-isolation --no-use-pep517 --no-index | ||
shell: bash -el {0} | ||
|
||
- name: Build Version | ||
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd | ||
shell: bash -el {0} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run tests and report results | ||
inputs: | ||
check-pyarrow-version: | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Check PyArrow version | ||
run: | | ||
# Double check that we have the expected PyArrow | ||
pushd /tmp | ||
python -c "import pandas; pandas.show_versions()" | egrep -i "pyarrow.+: ${{ matrix.check-pyarrow-version }}" | ||
popd | ||
shell: bash -el {0} | ||
if: ${{ inputs.check-pyarrow-version }} | ||
|
||
- name: Test | ||
run: ci/run_tests.sh | ||
shell: bash -el {0} | ||
|
||
- name: Publish test results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Test results | ||
path: test-data.xml | ||
if: failure() | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
flags: unittests | ||
name: codecov-pandas | ||
fail_ci_if_error: false | ||
if: failure() |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Setup Python and install requirements | ||
inputs: | ||
python-version: | ||
required: true | ||
architecture: | ||
default: x64 | ||
runs: | ||
using: composite | ||
steps: | ||
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 | ||
- name: Create temporary requirements.txt | ||
run: | | ||
# Drop cache at least once per month | ||
month_today="$(date '+%Y-%m')" | ||
cat > requirements.txt <<EOF | ||
# $month_today | ||
|
||
# Python deps | ||
pip | ||
setuptools<60.0.0 | ||
wheel | ||
|
||
# Pandas deps | ||
# GH 39416 | ||
numpy | ||
cython | ||
python-dateutil | ||
pytz | ||
|
||
# Test deps | ||
git+https://github.com/nedbat/coveragepy.git | ||
hypothesis | ||
pytest>=6.2.5 | ||
pytest-xdist | ||
pytest-cov | ||
pytest-asyncio>=0.17 | ||
EOF | ||
shell: bash -el {0} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
architecture: ${{ inputs.architecture }} | ||
cache: pip | ||
|
||
- name: Fix $PATH on macOS | ||
run: | | ||
# On macOS, the Python version we installed above is too late in $PATH | ||
# to be effective if using "bash -l" (which we need for code that works | ||
# with Conda envs). | ||
cat >> ~/.bash_profile <<EOF | ||
export PATH="\$(echo "\$PATH" | grep -Eio '[^:]+hostedtoolcache/python[^:]+bin'):\$PATH" \ | ||
EOF | ||
shell: bash -el {0} | ||
if: ${{ runner.os == 'macOS' }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
cat requirements.txt | ||
# TODO https://github.com/numpy/numpy/issues/21196 | ||
bits32=$(python -c 'import sys; print(int(sys.maxsize > 2**32))') | ||
NPY_DISABLE_SVML=$bits32 pip install -r requirements.txt | ||
pip list | ||
shell: bash -el {0} |
This file contains hidden or 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 |
---|---|---|
@@ -1,12 +1,58 @@ | ||
name: Set up pandas | ||
description: Runs all the setup steps required to have a built pandas ready to use | ||
inputs: | ||
environment-file: | ||
default: environment.yml | ||
pyarrow-version: | ||
required: false | ||
is-pypy: | ||
default: false | ||
environment-name: | ||
default: pandas-dev | ||
python-version: | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setting conda path | ||
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH | ||
shell: bash -l {0} | ||
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }} | ||
run: | | ||
grep -q ' - pyarrow' ${{ inputs.environment-file }} | ||
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }} | ||
cat ${{ inputs.environment-file }} | ||
shell: bash | ||
if: ${{ inputs.pyarrow-version }} | ||
|
||
- name: Setup environment and build pandas | ||
run: ci/setup_env.sh | ||
shell: bash -l {0} | ||
- name: Set Python version in ${{ inputs.environment-file }} to ${{ inputs.python-version }} | ||
run: | | ||
echo " - python=${{ inputs.pyarrow-version }}" >> ${{ inputs.environment-file }} | ||
cat ${{ inputs.environment-file }} | ||
shell: bash | ||
if: ${{ inputs.python-version }} | ||
|
||
- name: Pin setuptools (GH#44980) | ||
run: | | ||
echo ' - setuptools <60' >> ${{ inputs.environment-file }} | ||
shell: bash | ||
|
||
- name: Install ${{ inputs.environment-file }} (Python ${{ inputs.python-version }}) | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: ${{ inputs.environment-name }} | ||
environment-file: ${{ inputs.environment-file }} | ||
channel-priority: strict | ||
channels: conda-forge | ||
mamba-version: "0.22" | ||
use-mamba: true | ||
if: ${{ inputs.is-pypy == 'false' }} # No pypy3.8 support | ||
|
||
- name: Setup PyPy | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "pypy-3.8" | ||
if: ${{ inputs.is-pypy == 'true' }} | ||
|
||
- name: Setup PyPy dependencies | ||
# TODO: re-enable cov, its slowing the tests down though | ||
run: pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3 pytest-asyncio>=0.17 | ||
shell: bash | ||
if: ${{ inputs.is-pypy == 'true' }} |
This file contains hidden or 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 contains hidden or 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
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.
Any reason for this? I think we can pin setuptools in the main file.
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.
This is required to use
setup-python
's caching.