Skip to content

Commit

Permalink
Merge branch 'main' into new-deprecation-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloqeely authored Jun 6, 2024
2 parents c96551c + 0e90f66 commit 235c6fe
Show file tree
Hide file tree
Showing 177 changed files with 2,389 additions and 1,489 deletions.
72 changes: 45 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,64 @@
version: 2.1

jobs:
test-arm:
test-linux-arm:
machine:
image: default
resource_class: arm.large
environment:
ENV_FILE: ci/deps/circle-310-arm64.yaml
ENV_FILE: ci/deps/circle-311-arm64.yaml
PYTEST_WORKERS: auto
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
PYTEST_TARGET: "pandas"
PANDAS_CI: "1"
steps:
- checkout
- run: .circleci/setup_env.sh
- run: >
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
ci/run_tests.sh
linux-musl:
- run:
name: Install Environment and Run Tests
shell: /bin/bash -exuo pipefail
command: |
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh"
wget -q $MAMBA_URL -O minimamba.sh
chmod +x minimamba.sh
MAMBA_DIR="$HOME/miniconda3"
rm -rf $MAMBA_DIR
./minimamba.sh -b -p $MAMBA_DIR
export PATH=$MAMBA_DIR/bin:$PATH
conda info -a
conda env create -q -n pandas-dev -f $ENV_FILE
conda list -n pandas-dev
source activate pandas-dev
if pip show pandas 1>/dev/null; then
pip uninstall -y pandas
fi
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
ci/run_tests.sh
test-linux-musl:
docker:
- image: quay.io/pypa/musllinux_1_1_aarch64
resource_class: arm.large
steps:
# Install pkgs first to have git in the image
# (needed for checkout)
- run: |
apk update
apk add git
apk add musl-locales
- run:
name: Install System Packages
command: |
apk update
apk add git
apk add musl-locales
- checkout
- run: |
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
. ~/virtualenvs/pandas-dev/bin/activate
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
python -m pip list --no-cache-dir
- run: |
. ~/virtualenvs/pandas-dev/bin/activate
export PANDAS_CI=1
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
- run:
name: Install Environment and Run Tests
command: |
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
. ~/virtualenvs/pandas-dev/bin/activate
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
python -m pip list --no-cache-dir
export PANDAS_CI=1
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
build-aarch64:
parameters:
cibw-build:
Expand Down Expand Up @@ -71,7 +89,7 @@ jobs:
name: Build aarch64 wheels
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
command: |
pip3 install cibuildwheel==2.15.0
pip3 install cibuildwheel==2.18.1
cibuildwheel --prerelease-pythons --output-dir wheelhouse
environment:
Expand All @@ -81,7 +99,7 @@ jobs:
name: Install Anaconda Client & Upload Wheels
command: |
echo "Install Mambaforge"
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh"
echo "Downloading $MAMBA_URL"
wget -q $MAMBA_URL -O minimamba.sh
chmod +x minimamba.sh
Expand All @@ -107,14 +125,14 @@ workflows:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- test-arm
- test-linux-arm
test-musl:
# Don't run trigger this one when scheduled pipeline runs
when:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- linux-musl
- test-linux-musl
build-wheels:
jobs:
- build-aarch64:
Expand Down
60 changes: 0 additions & 60 deletions .circleci/setup_env.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"

- name: Build wheels
uses: pypa/[email protected].0
uses: pypa/[email protected].1
with:
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
env:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ci:
skip: [pyright, mypy]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
rev: v0.4.7
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
Expand All @@ -40,7 +40,7 @@ repos:
pass_filenames: true
require_serial: false
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
types_or: [python, rst, markdown, cython, c]
Expand Down Expand Up @@ -92,7 +92,7 @@ repos:
- id: sphinx-lint
args: ["--enable", "all", "--disable", "line-too-long"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.4
rev: v18.1.5
hooks:
- id: clang-format
files: ^pandas/_libs/src|^pandas/_libs/include
Expand Down
8 changes: 8 additions & 0 deletions asv_bench/benchmarks/tslibs/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ class TimeGetTimedeltaField:
def setup(self, size, field):
arr = np.random.randint(0, 10, size=size, dtype="i8")
self.i8data = arr
arr = np.random.randint(-86400 * 1_000_000_000, 0, size=size, dtype="i8")
self.i8data_negative = arr

def time_get_timedelta_field(self, size, field):
get_timedelta_field(self.i8data, field)

def time_get_timedelta_field_negative_td(self, size, field):
get_timedelta_field(self.i8data_negative, field)


class TimeGetDateField:
params = [
Expand Down Expand Up @@ -72,3 +77,6 @@ def setup(self, size, side, period, freqstr, month_kw):

def time_get_start_end_field(self, size, side, period, freqstr, month_kw):
get_start_end_field(self.i8data, self.attrname, freqstr, month_kw=month_kw)


from ..pandas_vb_common import setup # noqa: F401 isort:skip
41 changes: 4 additions & 37 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,39 +74,31 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.DataFrame.mean RT03,SA01" \
-i "pandas.DataFrame.median RT03,SA01" \
-i "pandas.DataFrame.min RT03" \
-i "pandas.DataFrame.plot PR02,SA01" \
-i "pandas.DataFrame.plot PR02" \
-i "pandas.Grouper PR02" \
-i "pandas.MultiIndex PR01" \
-i "pandas.MultiIndex.append PR07,SA01" \
-i "pandas.MultiIndex.copy PR07,RT03,SA01" \
-i "pandas.MultiIndex.drop PR07,RT03,SA01" \
-i "pandas.MultiIndex.dtypes SA01" \
-i "pandas.MultiIndex.get_level_values SA01" \
-i "pandas.MultiIndex.get_loc PR07" \
-i "pandas.MultiIndex.get_loc_level PR07" \
-i "pandas.MultiIndex.levels SA01" \
-i "pandas.MultiIndex.levshape SA01" \
-i "pandas.MultiIndex.names SA01" \
-i "pandas.MultiIndex.nlevels SA01" \
-i "pandas.MultiIndex.remove_unused_levels RT03,SA01" \
-i "pandas.MultiIndex.reorder_levels RT03,SA01" \
-i "pandas.MultiIndex.set_codes SA01" \
-i "pandas.MultiIndex.set_levels RT03,SA01" \
-i "pandas.MultiIndex.sortlevel PR07,SA01" \
-i "pandas.MultiIndex.to_frame RT03" \
-i "pandas.MultiIndex.truncate SA01" \
-i "pandas.NA SA01" \
-i "pandas.NaT SA01" \
-i "pandas.NamedAgg SA01" \
-i "pandas.Period SA01" \
-i "pandas.Period.asfreq SA01" \
-i "pandas.Period.freq GL08" \
-i "pandas.Period.freqstr SA01" \
-i "pandas.Period.is_leap_year SA01" \
-i "pandas.Period.month SA01" \
-i "pandas.Period.now SA01" \
-i "pandas.Period.ordinal GL08" \
-i "pandas.Period.quarter SA01" \
-i "pandas.Period.strftime PR01,SA01" \
-i "pandas.Period.to_timestamp SA01" \
-i "pandas.Period.year SA01" \
Expand Down Expand Up @@ -172,7 +164,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.lt SA01" \
-i "pandas.Series.ne SA01" \
-i "pandas.Series.pad PR01,SA01" \
-i "pandas.Series.plot PR02,SA01" \
-i "pandas.Series.plot PR02" \
-i "pandas.Series.pop RT03,SA01" \
-i "pandas.Series.prod RT03" \
-i "pandas.Series.product RT03" \
Expand Down Expand Up @@ -351,7 +343,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.arrays.NumpyExtensionArray SA01" \
-i "pandas.arrays.SparseArray PR07,SA01" \
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
-i "pandas.bdate_range RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.__iter__ RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.agg RT03" \
-i "pandas.core.groupby.DataFrameGroupBy.aggregate RT03" \
Expand All @@ -367,7 +358,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.ohlc SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
-i "pandas.core.groupby.DataFrameGroupBy.prod SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.sum SA01" \
Expand All @@ -385,7 +376,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.groupby.SeriesGroupBy.min SA01" \
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
-i "pandas.core.groupby.SeriesGroupBy.ohlc SA01" \
-i "pandas.core.groupby.SeriesGroupBy.plot PR02,SA01" \
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
-i "pandas.core.groupby.SeriesGroupBy.prod SA01" \
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
-i "pandas.core.groupby.SeriesGroupBy.sum SA01" \
Expand All @@ -412,7 +403,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.window.rolling.Window.std PR01" \
-i "pandas.core.window.rolling.Window.var PR01" \
-i "pandas.date_range RT03" \
-i "pandas.describe_option SA01" \
-i "pandas.errors.AbstractMethodError PR01,SA01" \
-i "pandas.errors.AttributeConflictWarning SA01" \
-i "pandas.errors.CSSWarning SA01" \
Expand Down Expand Up @@ -441,7 +431,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.errors.UnsupportedFunctionCall SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.infer_freq SA01" \
-i "pandas.interval_range RT03" \
-i "pandas.io.formats.style.Styler.apply RT03" \
-i "pandas.io.formats.style.Styler.apply_index RT03" \
-i "pandas.io.formats.style.Styler.background_gradient RT03" \
Expand Down Expand Up @@ -478,32 +467,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.json_normalize RT03,SA01" \
-i "pandas.merge PR07" \
-i "pandas.merge_asof PR07,RT03" \
-i "pandas.merge_ordered PR07" \
-i "pandas.option_context SA01" \
-i "pandas.period_range RT03,SA01" \
-i "pandas.pivot PR07" \
-i "pandas.pivot_table PR07" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.plotting.autocorrelation_plot RT03,SA01" \
-i "pandas.plotting.lag_plot RT03,SA01" \
-i "pandas.plotting.parallel_coordinates PR07,RT03,SA01" \
-i "pandas.plotting.plot_params SA01" \
-i "pandas.plotting.scatter_matrix PR07,SA01" \
-i "pandas.plotting.table PR07,RT03,SA01" \
-i "pandas.qcut PR07,SA01" \
-i "pandas.read_feather SA01" \
-i "pandas.read_orc SA01" \
-i "pandas.read_sas SA01" \
-i "pandas.read_spss SA01" \
-i "pandas.reset_option SA01" \
-i "pandas.set_eng_float_format RT03,SA01" \
-i "pandas.set_option SA01" \
-i "pandas.show_versions SA01" \
-i "pandas.test SA01" \
-i "pandas.testing.assert_extension_array_equal SA01" \
-i "pandas.testing.assert_index_equal PR07,SA01" \
-i "pandas.testing.assert_series_equal PR07,SA01" \
-i "pandas.timedelta_range SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
-i "pandas.tseries.offsets.BQuarterBegin PR02" \
-i "pandas.tseries.offsets.BQuarterBegin.freqstr SA01" \
Expand Down Expand Up @@ -788,16 +758,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.YearBegin.nanos GL08" \
-i "pandas.tseries.offsets.YearBegin.normalize GL08" \
-i "pandas.tseries.offsets.YearBegin.rule_code GL08" \
-i "pandas.tseries.offsets.YearEnd PR02" \
-i "pandas.tseries.offsets.YearEnd.freqstr SA01" \
-i "pandas.tseries.offsets.YearEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.YearEnd.month GL08" \
-i "pandas.tseries.offsets.YearEnd.n GL08" \
-i "pandas.tseries.offsets.YearEnd.nanos GL08" \
-i "pandas.tseries.offsets.YearEnd.normalize GL08" \
-i "pandas.tseries.offsets.YearEnd.rule_code GL08" \
-i "pandas.unique PR07" \
-i "pandas.util.hash_array PR07,SA01" \
-i "pandas.util.hash_pandas_object PR07,SA01" # There should be no backslash in the final line, please keep this comment in the last ignored function

RET=$(($RET + $?)) ; echo $MSG "DONE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11

# build dependencies
- versioneer[toml]
Expand Down
Loading

0 comments on commit 235c6fe

Please sign in to comment.