Skip to content

Commit

Permalink
Merge branch 'main' into feature/44764_perf_issue_new
Browse files Browse the repository at this point in the history
  • Loading branch information
smarie committed Mar 25, 2024
2 parents 098e53e + 4f145b3 commit 9ad010c
Show file tree
Hide file tree
Showing 197 changed files with 3,868 additions and 4,415 deletions.
9 changes: 1 addition & 8 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
name: Run tests and report results
inputs:
preload:
description: Preload arguments for sanitizer
required: false
asan_options:
description: Arguments for Address Sanitizer (ASAN)
required: false
runs:
using: composite
steps:
- name: Test
run: ${{ inputs.asan_options }} ${{ inputs.preload }} ci/run_tests.sh
run: ci/run_tests.sh
shell: bash -el {0}

- name: Publish test results
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ jobs:
- name: "Pyarrow Nightly"
env_file: actions-311-pyarrownightly.yaml
pattern: "not slow and not network and not single_cpu"
- name: "ASAN / UBSAN"
env_file: actions-311-sanitizers.yaml
pattern: "not slow and not network and not single_cpu and not skip_ubsan"
asan_options: "ASAN_OPTIONS=detect_leaks=0"
preload: LD_PRELOAD=$(gcc -print-file-name=libasan.so)
meson_args: --config-settings=setup-args="-Db_sanitize=address,undefined"
cflags_adds: -fno-sanitize-recover=all
pytest_workers: -1 # disable pytest-xdist as it swallows stderr from ASAN
fail-fast: false
name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }}
env:
Expand Down Expand Up @@ -161,18 +153,12 @@ jobs:
- name: Test (not single_cpu)
uses: ./.github/actions/run-tests
if: ${{ matrix.name != 'Pypy' }}
with:
preload: ${{ matrix.preload }}
asan_options: ${{ matrix.asan_options }}
env:
# Set pattern to not single_cpu if not already set
PATTERN: ${{ env.PATTERN == '' && 'not single_cpu' || matrix.pattern }}

- name: Test (single_cpu)
uses: ./.github/actions/run-tests
with:
preload: ${{ matrix.preload }}
asan_options: ${{ matrix.asan_options }}
env:
PATTERN: 'single_cpu'
PYTEST_WORKERS: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:

- name: Build normal wheels
if: ${{ (env.IS_SCHEDULE_DISPATCH != 'true' || env.IS_PUSH == 'true') }}
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.17.0
with:
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
env:
Expand All @@ -150,7 +150,7 @@ jobs:

- name: Build nightly wheels (with NumPy pre-release)
if: ${{ (env.IS_SCHEDULE_DISPATCH == 'true' && env.IS_PUSH != 'true') }}
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.17.0
with:
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ repos:
hooks:
- id: pylint
stages: [manual]
args: [--load-plugins=pylint.extensions.redefined_loop_name]
args: [--load-plugins=pylint.extensions.redefined_loop_name, --fail-on=I0021]
- id: pylint
alias: redefined-outer-name
name: Redefining name from outer scope
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN apt-get install -y build-essential
RUN apt-get install -y libhdf5-dev libgles2-mesa-dev

RUN python -m pip install --upgrade pip
RUN python -m pip install \
-r https://raw.githubusercontent.com/pandas-dev/pandas/main/requirements-dev.txt
COPY requirements-dev.txt /tmp
RUN python -m pip install -r /tmp/requirements-dev.txt
RUN git config --global --add safe.directory /home/pandas
CMD ["/bin/bash"]
17 changes: 17 additions & 0 deletions asv_bench/benchmarks/join_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,23 @@ def time_i8merge(self, how):
merge(self.left, self.right, how=how)


class UniqueMerge:
params = [4_000_000, 1_000_000]
param_names = ["unique_elements"]

def setup(self, unique_elements):
N = 1_000_000
self.left = DataFrame({"a": np.random.randint(1, unique_elements, (N,))})
self.right = DataFrame({"a": np.random.randint(1, unique_elements, (N,))})
uniques = self.right.a.drop_duplicates()
self.right["a"] = concat(
[uniques, Series(np.arange(0, -(N - len(uniques)), -1))], ignore_index=True
)

def time_unique_merge(self, unique_elements):
merge(self.left, self.right, how="inner")


class MergeDatetime:
params = [
[
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def setup(self):
self.dt_ts = Series(5, rng3, dtype="datetime64[ns]")

def time_resample(self):
self.dt_ts.resample("1S").last()
self.dt_ts.resample("1s").last()


class AsOf:
Expand Down

0 comments on commit 9ad010c

Please sign in to comment.