From aeca7f817b4c52c85f5e736f0b0f584080757c08 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Sat, 31 Dec 2022 17:20:41 +0000 Subject: [PATCH] wip --- .github/workflows/32-bit-linux.yml | 54 ----- .github/workflows/assign.yml | 19 -- .github/workflows/asv-bot.yml | 78 ------- .../autoupdate-pre-commit-config.yml | 39 ---- .github/workflows/code-checks.yml | 150 ------------- .github/workflows/codeql.yml | 31 --- .github/workflows/docbuild-and-upload.yml | 95 --------- .github/workflows/macos-windows.yml | 62 ------ .github/workflows/package-checks.yml | 52 ----- .github/workflows/python-dev.yml | 93 -------- .github/workflows/sdist.yml | 96 --------- .github/workflows/stale-pr.yml | 26 --- .github/workflows/ubuntu.yml | 181 ---------------- .github/workflows/wheels.yml | 199 ------------------ .pre-commit-config.yaml | 1 - environment.yml | 1 - requirements-dev.txt | 1 - 17 files changed, 1178 deletions(-) delete mode 100644 .github/workflows/32-bit-linux.yml delete mode 100644 .github/workflows/assign.yml delete mode 100644 .github/workflows/asv-bot.yml delete mode 100644 .github/workflows/autoupdate-pre-commit-config.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/docbuild-and-upload.yml delete mode 100644 .github/workflows/macos-windows.yml delete mode 100644 .github/workflows/package-checks.yml delete mode 100644 .github/workflows/python-dev.yml delete mode 100644 .github/workflows/sdist.yml delete mode 100644 .github/workflows/stale-pr.yml delete mode 100644 .github/workflows/ubuntu.yml delete mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/32-bit-linux.yml b/.github/workflows/32-bit-linux.yml deleted file mode 100644 index 438d2c7b4174e..0000000000000 --- a/.github/workflows/32-bit-linux.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: 32 Bit Linux - -on: - push: - branches: - - main - - 1.5.x - pull_request: - branches: - - main - - 1.5.x - paths-ignore: - - "doc/**" - -permissions: - contents: read - -jobs: - pytest: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Run 32-bit manylinux2014 Docker Build / Tests - run: | - # Without this (line 34), versioneer will not be able to determine the pandas version. - # This is because of a security update to git that blocks it from reading the config folder if - # it is not owned by the current user. We hit this since the "mounted" folder is not hit by the - # Docker container. - # xref https://github.com/pypa/manylinux/issues/1309 - docker pull quay.io/pypa/manylinux2014_i686 - docker run --platform linux/386 -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ - /bin/bash -xc "cd pandas && \ - git config --global --add safe.directory /pandas && \ - /opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \ - . ~/virtualenvs/pandas-dev/bin/activate && \ - python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \ - python -m pip install versioneer[toml] && \ - python -m pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \ - python setup.py build_ext -q -j1 && \ - python -m pip install --no-build-isolation --no-use-pep517 -e . && \ - python -m pip list && \ - export PANDAS_CI=1 && \ - pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml" - - - name: Publish test results for Python 3.8-32 bit full Linux - uses: actions/upload-artifact@v3 - with: - name: Test results - path: test-data.xml - if: failure() diff --git a/.github/workflows/assign.yml b/.github/workflows/assign.yml deleted file mode 100644 index b3331060823a9..0000000000000 --- a/.github/workflows/assign.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Assign -on: - issue_comment: - types: created - -permissions: - contents: read - -jobs: - issue_assign: - permissions: - issues: write - pull-requests: write - runs-on: ubuntu-22.04 - steps: - - if: github.event.comment.body == 'take' - run: | - echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}" - curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees diff --git a/.github/workflows/asv-bot.yml b/.github/workflows/asv-bot.yml deleted file mode 100644 index d264698e60485..0000000000000 --- a/.github/workflows/asv-bot.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: "ASV Bot" - -on: - issue_comment: # Pull requests are issues - types: - - created - -env: - ENV_FILE: environment.yml - COMMENT: ${{github.event.comment.body}} - -permissions: - contents: read - -jobs: - autotune: - permissions: - contents: read - issues: write - pull-requests: write - name: "Run benchmarks" - # TODO: Support more benchmarking options later, against different branches, against self, etc - if: startsWith(github.event.comment.body, '@github-actions benchmark') - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash -el {0} - - concurrency: - # Set concurrency to prevent abuse(full runs are ~5.5 hours !!!) - # each user can only run one concurrent benchmark bot at a time - # We don't cancel in progress jobs, but if you want to benchmark multiple PRs, you're gonna have - # to wait - group: ${{ github.actor }}-asv - cancel-in-progress: false - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - # Although asv sets up its own env, deps are still needed - # during discovery process - - name: Set up Conda - uses: ./.github/actions/setup-conda - - - name: Run benchmarks - id: bench - continue-on-error: true # This is a fake failure, asv will exit code 1 for regressions - run: | - # extracting the regex, see https://stackoverflow.com/a/36798723 - REGEX=$(echo "$COMMENT" | sed -n "s/^.*-b\s*\(\S*\).*$/\1/p") - cd asv_bench - asv check -E existing - git remote add upstream https://github.com/pandas-dev/pandas.git - git fetch upstream - asv machine --yes - asv continuous -f 1.1 -b $REGEX upstream/main HEAD - echo 'BENCH_OUTPUT<> $GITHUB_ENV - asv compare -f 1.1 upstream/main HEAD >> $GITHUB_ENV - echo 'EOF' >> $GITHUB_ENV - echo "REGEX=$REGEX" >> $GITHUB_ENV - - - uses: actions/github-script@v6 - env: - BENCH_OUTPUT: ${{env.BENCH_OUTPUT}} - REGEX: ${{env.REGEX}} - with: - script: | - const ENV_VARS = process.env - const run_url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}` - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '\nBenchmarks completed. View runner logs here.' + run_url + '\nRegex used: '+ 'regex ' + ENV_VARS["REGEX"] + '\n' + ENV_VARS["BENCH_OUTPUT"] - }) diff --git a/.github/workflows/autoupdate-pre-commit-config.yml b/.github/workflows/autoupdate-pre-commit-config.yml deleted file mode 100644 index 376aa8343c571..0000000000000 --- a/.github/workflows/autoupdate-pre-commit-config.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: "Update pre-commit config" - -on: - schedule: - - cron: "0 7 1 * *" # At 07:00 on 1st of every month. - workflow_dispatch: - -permissions: - contents: read - -jobs: - update-pre-commit: - permissions: - contents: write # for technote-space/create-pr-action to push code - pull-requests: write # for technote-space/create-pr-action to create a PR - if: github.repository_owner == 'pandas-dev' - name: Autoupdate pre-commit config - runs-on: ubuntu-22.04 - steps: - - name: Set up Python - uses: actions/setup-python@v4 - - name: Cache multiple paths - uses: actions/cache@v3 - with: - path: | - ~/.cache/pre-commit - ~/.cache/pip - key: pre-commit-autoupdate-${{ runner.os }}-build - - name: Update pre-commit config packages - uses: technote-space/create-pr-action@v2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - EXECUTE_COMMANDS: | - pip install pre-commit - pre-commit autoupdate || (exit 0); - pre-commit run -a || (exit 0); - COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config" - PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}" - PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config" diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 280b6ed601f08..fdca728f90b36 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -38,153 +38,3 @@ jobs: uses: pre-commit/action@v2.0.3 with: extra_args: --verbose --all-files - - docstring_typing_manual_hooks: - name: Docstring validation, typing, and other manual pre-commit hooks - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash -el {0} - - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-code-checks - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Conda - uses: ./.github/actions/setup-conda - - - name: Build Pandas - id: build - uses: ./.github/actions/build_pandas - - # The following checks are independent of each other and should still be run if one fails - - name: Check for no warnings when building single-page docs - run: ci/code_checks.sh single-docs - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Run checks on imported code - run: ci/code_checks.sh code - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Run doctests - run: ci/code_checks.sh doctests - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Run docstring validation - run: ci/code_checks.sh docstrings - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Run check of documentation notebooks - run: ci/code_checks.sh notebooks - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Use existing environment for type checking - run: | - echo $PATH >> $GITHUB_PATH - echo "PYTHONHOME=$PYTHONHOME" >> $GITHUB_ENV - echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Typing + pylint - uses: pre-commit/action@v2.0.3 - with: - extra_args: --verbose --hook-stage manual --all-files - if: ${{ steps.build.outcome == 'success' && always() }} - - - name: Run docstring validation script tests - run: pytest scripts - if: ${{ steps.build.outcome == 'success' && always() }} - - asv-benchmarks: - name: ASV Benchmarks - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash -el {0} - - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-asv-benchmarks - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Conda - uses: ./.github/actions/setup-conda - - - name: Build Pandas - id: build - uses: ./.github/actions/build_pandas - - - name: Run ASV benchmarks - run: | - cd asv_bench - asv machine --yes - asv run --quick --dry-run --strict --durations=30 --python=same - - build_docker_dev_environment: - name: Build Docker Dev Environment - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash -el {0} - - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-build_docker_dev_environment - cancel-in-progress: true - - steps: - - name: Clean up dangling images - run: docker image prune -f - - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Build image - run: docker build --pull --no-cache --tag pandas-dev-env . - - - name: Show environment - run: docker run --rm pandas-dev-env python -c "import pandas as pd; print(pd.show_versions())" - - requirements-dev-text-installable: - name: Test install requirements-dev.txt - runs-on: ubuntu-22.04 - - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-requirements-dev-text-installable - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python - id: setup_python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - cache: 'pip' - cache-dependency-path: 'requirements-dev.txt' - - - name: Install requirements-dev.txt - run: pip install -r requirements-dev.txt - - - name: Check Pip Cache Hit - run: echo ${{ steps.setup_python.outputs.cache-hit }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 05a5d003c1dd1..0000000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: CodeQL -on: - schedule: - # every day at midnight - - cron: "0 0 * * *" - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - analyze: - runs-on: ubuntu-22.04 - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: - - python - - steps: - - uses: actions/checkout@v3 - - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - - uses: github/codeql-action/autobuild@v2 - - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/docbuild-and-upload.yml b/.github/workflows/docbuild-and-upload.yml deleted file mode 100644 index 7a9f491228a83..0000000000000 --- a/.github/workflows/docbuild-and-upload.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Doc Build and Upload - -on: - push: - branches: - - main - - 1.5.x - tags: - - '*' - pull_request: - branches: - - main - - 1.5.x - -env: - ENV_FILE: environment.yml - PANDAS_CI: 1 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -permissions: - contents: read - -jobs: - web_and_docs: - name: Doc Build and Upload - runs-on: ubuntu-22.04 - - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-web-docs - cancel-in-progress: true - - defaults: - run: - shell: bash -el {0} - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Conda - uses: ./.github/actions/setup-conda - - - name: Build Pandas - uses: ./.github/actions/build_pandas - - - name: Set up maintainers cache - uses: actions/cache@v3 - with: - path: maintainers.json - key: maintainers - - - name: Build website - run: python web/pandas_web.py web/pandas --target-path=web/build - - - name: Build documentation - run: doc/make.py --warnings-are-errors - - - name: Build documentation zip - run: doc/make.py zip_html - - - name: Install ssh key - run: | - mkdir -m 700 -p ~/.ssh - echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFjYkJBk7sos+r7yATODogQc3jUdW1aascGpyOD4bohj8dWjzwLJv/OJ/fyOQ5lmj81WKDk67tGtqNJYGL9acII=" > ~/.ssh/known_hosts - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) - - - name: Copy cheatsheets into site directory - run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/ - - - name: Upload web - run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ web@${{ secrets.server_ip }}:/var/www/html - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - - - name: Upload dev docs - run: rsync -az --delete doc/build/html/ web@${{ secrets.server_ip }}:/var/www/html/pandas-docs/dev - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - - - name: Upload prod docs - run: rsync -az --delete doc/build/html/ web@${{ secrets.server_ip }}:/var/www/html/pandas-docs/version/${GITHUB_REF_NAME:1} - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - - - name: Move docs into site directory - run: mv doc/build/html web/build/docs - - - name: Save website as an artifact - uses: actions/upload-artifact@v3 - with: - name: website - path: web/build - retention-days: 14 diff --git a/.github/workflows/macos-windows.yml b/.github/workflows/macos-windows.yml deleted file mode 100644 index d762e20db196a..0000000000000 --- a/.github/workflows/macos-windows.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Windows-macOS - -on: - push: - branches: - - main - - 1.5.x - pull_request: - branches: - - main - - 1.5.x - paths-ignore: - - "doc/**" - -env: - PANDAS_CI: 1 - PYTEST_TARGET: pandas - PATTERN: "not slow and not db and not network and not single_cpu" - ERROR_ON_WARNINGS: "1" - - -permissions: - contents: read - -jobs: - pytest: - defaults: - run: - shell: bash -el {0} - timeout-minutes: 180 - strategy: - matrix: - os: [macos-latest, windows-latest] - env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml] - fail-fast: false - runs-on: ${{ matrix.os }} - name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }} - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.os }} - cancel-in-progress: true - env: - # GH 47443: PYTEST_WORKERS > 1 crashes Windows builds with memory related errors - PYTEST_WORKERS: ${{ matrix.os == 'macos-latest' && 'auto' || '1' }} - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Conda - uses: ./.github/actions/setup-conda - with: - environment-file: ci/deps/${{ matrix.env_file }} - pyarrow-version: ${{ matrix.os == 'macos-latest' && '9' || '' }} - - - name: Build Pandas - uses: ./.github/actions/build_pandas - - - name: Test - uses: ./.github/actions/run-tests diff --git a/.github/workflows/package-checks.yml b/.github/workflows/package-checks.yml deleted file mode 100644 index eb065c6e2e87d..0000000000000 --- a/.github/workflows/package-checks.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Package Checks - -on: - push: - branches: - - main - - 1.5.x - pull_request: - branches: - - main - - 1.5.x - types: [ labeled, opened, synchronize, reopened ] - -permissions: - contents: read - -jobs: - pip: - if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} - runs-on: ubuntu-22.04 - strategy: - matrix: - extra: ["test", "performance", "timezone", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "all"] - fail-fast: false - name: Install Extras - ${{ matrix.extra }} - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pip-extras-${{ matrix.extra }} - cancel-in-progress: true - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Python - id: setup_python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - - name: Install required dependencies - run: | - python -m pip install --upgrade pip setuptools wheel python-dateutil pytz numpy cython - python -m pip install versioneer[toml] - shell: bash -el {0} - - - name: Pip install with extra - run: | - python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation - shell: bash -el {0} diff --git a/.github/workflows/python-dev.yml b/.github/workflows/python-dev.yml deleted file mode 100644 index 220c1e464742e..0000000000000 --- a/.github/workflows/python-dev.yml +++ /dev/null @@ -1,93 +0,0 @@ -# This workflow may or may not run depending on the state of the next -# unreleased Python version. DO NOT DELETE IT. -# -# In general, this file will remain frozen(present, but not running) until: -# - The next unreleased Python version has released beta 1 -# - This version should be available on GitHub Actions. -# - Our required build/runtime dependencies(numpy, pytz, Cython, python-dateutil) -# support that unreleased Python version. -# To unfreeze, comment out the ``if: false`` condition, and make sure you update -# the name of the workflow and Python version in actions/setup-python to: '3.12-dev' -# -# After it has been unfrozen, this file should remain unfrozen(present, and running) until: -# - The next Python version has been officially released. -# OR -# - Most/All of our optional dependencies support Python 3.11 AND -# - The next Python version has released a rc(we are guaranteed a stable ABI). -# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs -# to the corresponding posix/windows-macos/sdist etc. workflows. -# Feel free to modify this comment as necessary. - -name: Python Dev - -on: - push: - branches: - - main - - 1.5.x - pull_request: - branches: - - main - - 1.5.x - paths-ignore: - - "doc/**" - -env: - PYTEST_WORKERS: "auto" - PANDAS_CI: 1 - PATTERN: "not slow and not network and not clipboard and not single_cpu" - COVERAGE: true - PYTEST_TARGET: pandas - -permissions: - contents: read - -jobs: - build: - # if: false # Uncomment this to freeze the workflow, comment it to unfreeze - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-22.04, macOS-latest, windows-latest] - - name: actions-311-dev - timeout-minutes: 120 - - concurrency: - #https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.os }}-${{ matrix.pytest_target }}-dev - cancel-in-progress: true - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Python Dev Version - uses: actions/setup-python@v4 - with: - python-version: '3.11-dev' - - - name: Install dependencies - run: | - python --version - python -m pip install --upgrade pip setuptools wheel - python -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy - python -m pip install git+https://github.com/nedbat/coveragepy.git - python -m pip install versioneer[toml] - python -m pip install python-dateutil pytz cython hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17 - python -m pip list - - # GH 47305: Parallel build can cause flaky ImportError from pandas/_libs/tslibs - - name: Build Pandas - run: | - python setup.py build_ext -q -j1 - python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index - - - name: Build Version - run: | - python -c "import pandas; pandas.show_versions();" - - - name: Test - uses: ./.github/actions/run-tests diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml deleted file mode 100644 index d11b614e2b2c0..0000000000000 --- a/.github/workflows/sdist.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: sdist - -on: - push: - branches: - - main - - 1.5.x - pull_request: - branches: - - main - - 1.5.x - types: [labeled, opened, synchronize, reopened] - paths-ignore: - - "doc/**" - -permissions: - contents: read - -jobs: - build: - if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} - runs-on: ubuntu-22.04 - timeout-minutes: 60 - defaults: - run: - shell: bash -el {0} - - strategy: - fail-fast: false - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist - cancel-in-progress: true - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install versioneer[toml] - - # GH 39416 - pip install numpy - - - name: Build pandas sdist - run: | - pip list - python setup.py sdist --formats=gztar - - - name: Upload sdist artifact - uses: actions/upload-artifact@v3 - with: - name: ${{matrix.python-version}}-sdist.gz - path: dist/*.gz - - - name: Set up Conda - uses: ./.github/actions/setup-conda - with: - environment-file: false - environment-name: pandas-sdist - extra-specs: | - python =${{ matrix.python-version }} - - - name: Install pandas from sdist - run: | - pip list - python -m pip install dist/*.gz - - - name: Force oldest supported NumPy - run: | - case "${{matrix.python-version}}" in - 3.8) - pip install numpy==1.20.3 ;; - 3.9) - pip install numpy==1.20.3 ;; - 3.10) - pip install numpy==1.21.2 ;; - 3.11) - pip install numpy==1.23.2 ;; - esac - - - name: Import pandas - run: | - cd .. - conda list - python -c "import pandas; pandas.show_versions();" diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml deleted file mode 100644 index c47745e097d17..0000000000000 --- a/.github/workflows/stale-pr.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: "Stale PRs" -on: - schedule: - # * is a special character in YAML so you have to quote this string - - cron: "0 0 * * *" - -permissions: - contents: read - -jobs: - stale: - permissions: - pull-requests: write - runs-on: ubuntu-22.04 - steps: - - uses: actions/stale@v4 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this." - stale-pr-label: "Stale" - exempt-pr-labels: "Needs Review,Blocked,Needs Discussion" - days-before-issue-stale: -1 - days-before-pr-stale: 30 - days-before-close: -1 - remove-stale-when-updated: false - debug-only: false diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml deleted file mode 100644 index 9c93725ea15ec..0000000000000 --- a/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,181 +0,0 @@ -name: Ubuntu - -on: - push: - branches: - - main - - 1.5.x - pull_request: - branches: - - main - - 1.5.x - paths-ignore: - - "doc/**" - -env: - PANDAS_CI: 1 - -permissions: - contents: read - -jobs: - pytest: - runs-on: ubuntu-22.04 - defaults: - run: - shell: bash -el {0} - timeout-minutes: 180 - strategy: - matrix: - env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml] - pattern: ["not single_cpu", "single_cpu"] - pyarrow_version: ["7", "8", "9", "10"] - include: - - name: "Downstream Compat" - env_file: actions-38-downstream_compat.yaml - pattern: "not slow and not network and not single_cpu" - pytest_target: "pandas/tests/test_downstream.py" - - name: "Minimum Versions" - env_file: actions-38-minimum_versions.yaml - pattern: "not slow and not network and not single_cpu" - error_on_warnings: "0" - - name: "Locale: it_IT" - env_file: actions-38.yaml - pattern: "not slow and not network and not single_cpu" - extra_apt: "language-pack-it" - # Use the utf8 version as the default, it has no bad side-effect. - lang: "it_IT.utf8" - lc_all: "it_IT.utf8" - # Also install it_IT (its encoding is ISO8859-1) but do not activate it. - # It will be temporarily activated during tests with locale.setlocale - extra_loc: "it_IT" - - name: "Locale: zh_CN" - env_file: actions-38.yaml - pattern: "not slow and not network and not single_cpu" - extra_apt: "language-pack-zh-hans" - # Use the utf8 version as the default, it has no bad side-effect. - lang: "zh_CN.utf8" - lc_all: "zh_CN.utf8" - # Also install zh_CN (its encoding is gb2312) but do not activate it. - # It will be temporarily activated during tests with locale.setlocale - extra_loc: "zh_CN" - - name: "Copy-on-Write" - env_file: actions-310.yaml - pattern: "not slow and not network and not single_cpu" - pandas_copy_on_write: "1" - error_on_warnings: "0" - - name: "Data Manager" - env_file: actions-38.yaml - pattern: "not slow and not network and not single_cpu" - pandas_data_manager: "array" - error_on_warnings: "0" - - name: "Pypy" - env_file: actions-pypy-38.yaml - pattern: "not slow and not network and not single_cpu" - test_args: "--max-worker-restart 0" - error_on_warnings: "0" - - name: "Numpy Dev" - env_file: actions-310-numpydev.yaml - pattern: "not slow and not network and not single_cpu" - test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy" - error_on_warnings: "0" - exclude: - - env_file: actions-38.yaml - pyarrow_version: "7" - - env_file: actions-38.yaml - pyarrow_version: "8" - - env_file: actions-38.yaml - pyarrow_version: "9" - - env_file: actions-39.yaml - pyarrow_version: "7" - - env_file: actions-39.yaml - pyarrow_version: "8" - - env_file: actions-39.yaml - pyarrow_version: "9" - fail-fast: false - name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }} - env: - ENV_FILE: ci/deps/${{ matrix.env_file }} - PATTERN: ${{ matrix.pattern }} - EXTRA_APT: ${{ matrix.extra_apt || '' }} - ERROR_ON_WARNINGS: ${{ matrix.error_on_warnings || '1' }} - LANG: ${{ matrix.lang || '' }} - LC_ALL: ${{ matrix.lc_all || '' }} - PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }} - PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }} - TEST_ARGS: ${{ matrix.test_args || '' }} - PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }} - PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }} - IS_PYPY: ${{ contains(matrix.env_file, 'pypy') }} - # TODO: re-enable coverage on pypy, its slow - COVERAGE: ${{ !contains(matrix.env_file, 'pypy') }} - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.pyarrow_version || '' }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_data_manager || '' }} - cancel-in-progress: true - - services: - mysql: - image: mysql - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: pandas - options: >- - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 3306:3306 - - postgres: - image: postgres - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: pandas - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - - moto: - image: motoserver/moto - env: - AWS_ACCESS_KEY_ID: foobar_key - AWS_SECRET_ACCESS_KEY: foobar_secret - ports: - - 5000:5000 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Extra installs - # xsel for clipboard tests - run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }} - - - name: Generate extra locales - # These extra locales will be available for locale.setlocale() calls in tests - run: | - sudo locale-gen ${{ matrix.extra_loc }} - if: ${{ matrix.extra_loc }} - - - name: Set up Conda - uses: ./.github/actions/setup-conda - with: - environment-file: ${{ env.ENV_FILE }} - pyarrow-version: ${{ matrix.pyarrow_version }} - - - name: Build Pandas - uses: ./.github/actions/build_pandas - - - name: Test - uses: ./.github/actions/run-tests - # TODO: Don't continue on error for PyPy - continue-on-error: ${{ env.IS_PYPY == 'true' }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml deleted file mode 100644 index 49d29c91f86cd..0000000000000 --- a/.github/workflows/wheels.yml +++ /dev/null @@ -1,199 +0,0 @@ -# Workflow to build wheels for upload to PyPI. -# Inspired by numpy's cibuildwheel config https://github.com/numpy/numpy/blob/main/.github/workflows/wheels.yml -# -# In an attempt to save CI resources, wheel builds do -# not run on each push but only weekly and for releases. -# Wheel builds can be triggered from the Actions page -# (if you have the perms) on a commit to master. -# -# Alternatively, you can add labels to the pull request in order to trigger wheel -# builds. -# The label(s) that trigger builds are: -# - Build -name: Wheel builder - -on: - schedule: - # ┌───────────── minute (0 - 59) - # │ ┌───────────── hour (0 - 23) - # │ │ ┌───────────── day of the month (1 - 31) - # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) - # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) - # │ │ │ │ │ - - cron: "27 3 */1 * *" - push: - pull_request: - types: [labeled, opened, synchronize, reopened] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - build_wheels: - name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} - if: >- - github.event_name == 'schedule' || - github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request' && - contains(github.event.pull_request.labels.*.name, 'Build')) || - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0'))) - runs-on: ${{ matrix.buildplat[0] }} - strategy: - # Ensure that a wheel builder finishes even if another fails - fail-fast: false - matrix: - # GitHub Actions doesn't support pairing matrix values together, let's improvise - # https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 - buildplat: - - [ubuntu-20.04, manylinux_x86_64] - - [macos-11, macosx_*] - - [windows-2019, win_amd64] - - [windows-2019, win32] - # TODO: support PyPy? - python: [["cp38", "3.8"], ["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]# "pp38", "pp39"] - env: - IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }} - IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - steps: - - name: Checkout pandas - uses: actions/checkout@v3 - with: - submodules: true - # versioneer.py requires the latest tag to be reachable. Here we - # fetch the complete history to get access to the tags. - # A shallow clone can work when the following issue is resolved: - # https://github.com/actions/checkout/issues/338 - fetch-depth: 0 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.9.0 - env: - CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} - - # Used to test(Windows-only) and push the built wheels - # You might need to use setup-python separately - # if the new Python-dev version - # is unavailable on conda-forge. - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: ${{ matrix.python[1] }} - activate-environment: test - channels: conda-forge, anaconda - channel-priority: true - mamba-version: "*" - - - name: Test wheels (Windows 64-bit only) - if: ${{ matrix.buildplat[1] == 'win_amd64' }} - shell: cmd /C CALL {0} - run: | - python ci/test_wheels.py wheelhouse - - - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.python[0] }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} - path: ./wheelhouse/*.whl - - - - name: Install anaconda client - if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} - shell: bash -el {0} - run: conda install -q -y anaconda-client - - - - name: Upload wheels - if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} - shell: bash -el {0} - env: - PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }} - PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }} - run: | - source ci/upload_wheels.sh - set_upload_vars - # trigger an upload to - # https://anaconda.org/scipy-wheels-nightly/pandas - # for cron jobs or "Run workflow" (restricted to main branch). - # Tags will upload to - # https://anaconda.org/multibuild-wheels-staging/pandas - # The tokens were originally generated at anaconda.org - upload_wheels - build_sdist: - name: Build sdist - if: >- - github.event_name == 'schedule' || - github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request' && - contains(github.event.pull_request.labels.*.name, 'Build')) || - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0'))) - runs-on: ubuntu-22.04 - env: - IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }} - IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} - steps: - - name: Checkout pandas - uses: actions/checkout@v3 - with: - submodules: true - # versioneer.py requires the latest tag to be reachable. Here we - # fetch the complete history to get access to the tags. - # A shallow clone can work when the following issue is resolved: - # https://github.com/actions/checkout/issues/338 - fetch-depth: 0 - - # Used to push the built sdist - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - # Really doesn't matter what version we upload with - # just the version we test with - python-version: '3.8' - channels: conda-forge - channel-priority: true - mamba-version: "*" - - - name: Build sdist - run: | - pip install build - python -m build --sdist - - name: Test the sdist - shell: bash -el {0} - run: | - # TODO: Don't run test suite, and instead build wheels from sdist - # by splitting the wheel builders into a two stage job - # (1. Generate sdist 2. Build wheels from sdist) - # This tests the sdists, and saves some build time - python -m pip install dist/*.gz - pip install hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-asyncio>=0.17 - cd .. # Not a good idea to test within the src tree - python -c "import pandas; print(pandas.__version__); - pandas.test(extra_args=['-m not clipboard and not single_cpu', '--skip-slow', '--skip-network', '--skip-db', '-n=2']); - pandas.test(extra_args=['-m not clipboard and single_cpu', '--skip-slow', '--skip-network', '--skip-db'])" - - uses: actions/upload-artifact@v3 - with: - name: sdist - path: ./dist/* - - - name: Install anaconda client - if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} - shell: bash -el {0} - run: | - conda install -q -y anaconda-client - - - name: Upload sdist - if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }} - shell: bash -el {0} - env: - PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }} - PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }} - run: | - source ci/upload_wheels.sh - set_upload_vars - # trigger an upload to - # https://anaconda.org/scipy-wheels-nightly/pandas - # for cron jobs or "Run workflow" (restricted to main branch). - # Tags will upload to - # https://anaconda.org/multibuild-wheels-staging/pandas - # The tokens were originally generated at anaconda.org - upload_wheels diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3158e64df8dd..3350196b9b1c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -75,7 +75,6 @@ repos: additional_dependencies: &flake8_dependencies - flake8==6.0.0 - flake8-bugbear==22.7.1 - - pandas-dev-flaker==0.5.0 - repo: https://github.com/pycqa/pylint rev: v2.15.6 hooks: diff --git a/environment.yml b/environment.yml index b6b8f7d6af1ba..9eaf52977d6d2 100644 --- a/environment.yml +++ b/environment.yml @@ -90,7 +90,6 @@ dependencies: - gitdb - natsort # DataFrame.sort_values doctest - numpydoc - - pandas-dev-flaker=0.5.0 - pydata-sphinx-theme<0.11 - pytest-cython # doctest - sphinx diff --git a/requirements-dev.txt b/requirements-dev.txt index 4f2a80d932fd0..428c2cb92d040 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -65,7 +65,6 @@ gitpython gitdb natsort numpydoc -pandas-dev-flaker==0.5.0 pydata-sphinx-theme<0.11 pytest-cython sphinx