Skip to content

Commit

Permalink
Resolve merge conflicts for code_checks docstrings...
Browse files Browse the repository at this point in the history
  • Loading branch information
veljanin committed Nov 6, 2024
2 parents 902601f + e49ab80 commit 482080d
Show file tree
Hide file tree
Showing 124 changed files with 1,287 additions and 684 deletions.
7 changes: 0 additions & 7 deletions .github/actions/build_pandas/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ runs:
fi
shell: bash -el {0}

- name: Uninstall nomkl
run: |
if conda list nomkl | grep nomkl 1>/dev/null; then
conda remove nomkl -y
fi
shell: bash -el {0}

- name: Build Pandas
run: |
if [[ ${{ inputs.editable }} == "true" ]]; then
Expand Down
2 changes: 0 additions & 2 deletions .github/actions/setup-conda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ runs:
- name: Install ${{ inputs.environment-file }}
uses: mamba-org/setup-micromamba@v1
with:
# Pinning to avoid 2.0 failures
micromamba-version: '1.5.10-0'
environment-file: ${{ inputs.environment-file }}
environment-name: test
condarc-file: ci/.condarc
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
TEST_ARGS: ${{ matrix.test_args || '' }}
PYTEST_WORKERS: 'auto'
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
NPY_PROMOTION_STATE: ${{ matrix.env_file == 'actions-311-numpydev.yaml' && 'weak' || 'legacy' }}
# Clipboard tests
QT_QPA_PLATFORM: offscreen
REMOVE_PYARROW: ${{ matrix.name == 'Future infer strings (without pyarrow)' && '1' || '0' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"

- name: Build wheels
uses: pypa/[email protected].0
uses: pypa/[email protected].3
with:
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
env:
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ minimum_pre_commit_version: 2.15.0
exclude: ^LICENSES/|\.(html|csv|svg)$
# reserve "manual" for relatively slow hooks which we still want to run in CI
default_stages: [
commit,
merge-commit,
push,
pre-commit,
pre-merge-commit,
pre-push,
prepare-commit-msg,
commit-msg,
post-checkout,
Expand All @@ -19,7 +19,7 @@ ci:
skip: [pyright, mypy]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.2
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
Expand Down Expand Up @@ -74,7 +74,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py310-plus]
Expand All @@ -95,7 +95,7 @@ repos:
- id: sphinx-lint
args: ["--enable", "all", "--disable", "line-too-long"]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.1
rev: v19.1.3
hooks:
- id: clang-format
files: ^pandas/_libs/src|^pandas/_libs/include
Expand Down
49 changes: 0 additions & 49 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,30 +73,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Period.freq GL08" \
-i "pandas.Period.ordinal GL08" \
-i "pandas.RangeIndex.from_range PR01,SA01" \
-i "pandas.Series.cat.add_categories PR01,PR02" \
-i "pandas.Series.cat.as_ordered PR01" \
-i "pandas.Series.cat.as_unordered PR01" \
-i "pandas.Series.cat.remove_categories PR01,PR02" \
-i "pandas.Series.cat.remove_unused_categories PR01" \
-i "pandas.Series.cat.rename_categories PR01,PR02" \
-i "pandas.Series.cat.reorder_categories PR01,PR02" \
-i "pandas.Series.cat.set_categories PR01,PR02" \
-i "pandas.Series.dt.as_unit PR01,PR02" \
-i "pandas.Series.dt.ceil PR01,PR02" \
-i "pandas.Series.dt.day_name PR01,PR02" \
-i "pandas.Series.dt.floor PR01,PR02" \
-i "pandas.Series.dt.freq GL08" \
-i "pandas.Series.dt.month_name PR01,PR02" \
-i "pandas.Series.dt.normalize PR01" \
-i "pandas.Series.dt.round PR01,PR02" \
-i "pandas.Series.dt.strftime PR01,PR02" \
-i "pandas.Series.dt.to_period PR01,PR02" \
-i "pandas.Series.dt.total_seconds PR01" \
-i "pandas.Series.dt.tz_convert PR01,PR02" \
-i "pandas.Series.dt.tz_localize PR01,PR02" \
-i "pandas.Series.dt.unit GL08" \
-i "pandas.Series.pad PR01,SA01" \
-i "pandas.Series.sparse.from_coo PR07,SA01" \
-i "pandas.Timedelta.max PR02" \
-i "pandas.Timedelta.min PR02" \
-i "pandas.Timedelta.resolution PR02" \
Expand All @@ -106,90 +85,63 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.tzinfo GL08" \
-i "pandas.Timestamp.year GL08" \
-i "pandas.api.types.is_float PR01,SA01" \
-i "pandas.api.types.is_integer PR01,SA01" \
-i "pandas.api.types.is_iterator PR07,SA01" \
-i "pandas.api.types.is_re_compilable PR07,SA01" \
-i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
-i "pandas.arrays.DatetimeArray SA01" \
-i "pandas.arrays.IntegerArray SA01" \
-i "pandas.arrays.IntervalArray.left SA01" \
-i "pandas.arrays.IntervalArray.length SA01" \
-i "pandas.arrays.IntervalArray.right SA01" \
-i "pandas.arrays.NumpyExtensionArray SA01" \
-i "pandas.arrays.SparseArray PR07,SA01" \
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.__iter__ RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.groups SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
-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" \
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
-i "pandas.core.groupby.SeriesGroupBy.__iter__ RT03,SA01" \
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
-i "pandas.core.groupby.SeriesGroupBy.groups SA01" \
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
-i "pandas.core.groupby.SeriesGroupBy.ohlc SA01" \
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
-i "pandas.core.resample.Resampler.__iter__ RT03,SA01" \
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \
-i "pandas.core.resample.Resampler.groups SA01" \
-i "pandas.core.resample.Resampler.indices SA01" \
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.mean SA01" \
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.ohlc SA01" \
-i "pandas.core.resample.Resampler.prod SA01" \
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
-i "pandas.core.resample.Resampler.sem SA01" \
-i "pandas.core.resample.Resampler.std SA01" \
-i "pandas.core.resample.Resampler.sum SA01" \
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.var SA01" \
-i "pandas.errors.AttributeConflictWarning SA01" \
-i "pandas.errors.CSSWarning SA01" \
-i "pandas.errors.CategoricalConversionWarning SA01" \
-i "pandas.errors.ChainedAssignmentError SA01" \
-i "pandas.errors.DataError SA01" \
-i "pandas.errors.DuplicateLabelError SA01" \
-i "pandas.errors.IntCastingNaNError SA01" \
-i "pandas.errors.InvalidIndexError SA01" \
-i "pandas.errors.InvalidVersion SA01" \
-i "pandas.errors.NullFrequencyError SA01" \
-i "pandas.errors.NumExprClobberingError SA01" \
-i "pandas.errors.NumbaUtilError SA01" \
-i "pandas.errors.OptionError SA01" \
-i "pandas.errors.OutOfBoundsTimedelta SA01" \
-i "pandas.errors.PerformanceWarning SA01" \
-i "pandas.errors.PossibleDataLossError SA01" \
-i "pandas.errors.PossiblePrecisionLoss SA01" \
-i "pandas.errors.SpecificationError SA01" \
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
-i "pandas.errors.UnsortedIndexError SA01" \
-i "pandas.errors.UnsupportedFunctionCall SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.infer_freq SA01" \
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
-i "pandas.io.stata.StataReader.data_label SA01" \
-i "pandas.io.stata.StataReader.value_labels RT03,SA01" \
-i "pandas.io.stata.StataReader.variable_labels RT03,SA01" \
-i "pandas.io.stata.StataWriter.write_file SA01" \
-i "pandas.json_normalize RT03,SA01" \
-i "pandas.period_range RT03,SA01" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.plotting.lag_plot RT03,SA01" \
-i "pandas.plotting.scatter_matrix PR07,SA01" \
-i "pandas.set_eng_float_format RT03,SA01" \
-i "pandas.testing.assert_extension_array_equal SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.BQuarterBegin.n GL08" \
Expand Down Expand Up @@ -335,7 +287,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Second.is_on_offset GL08" \
-i "pandas.tseries.offsets.Second.n GL08" \
-i "pandas.tseries.offsets.Second.normalize GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.day_of_month GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin.n GL08" \
Expand Down
4 changes: 2 additions & 2 deletions ci/deps/actions-310-minimum_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ dependencies:
- python=3.10

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-310.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies:
- python=3.10

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down Expand Up @@ -52,7 +52,7 @@ dependencies:
- scipy>=1.10.0
- sqlalchemy>=2.0.0
- tabulate>=0.9.0
- xarray>=2022.12.0
- xarray>=2022.12.0, <=2024.9.0
- xlrd>=2.0.1
- xlsxwriter>=3.0.5
- zstandard>=0.19.0
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-311-downstream_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dependencies:
- python=3.11

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down Expand Up @@ -53,7 +53,7 @@ dependencies:
- scipy>=1.10.0
- sqlalchemy>=2.0.0
- tabulate>=0.9.0
- xarray>=2022.12.0
- xarray>=2022.12.0, <=2024.9.0
- xlrd>=2.0.1
- xlsxwriter>=3.0.5
- zstandard>=0.19.0
Expand Down
4 changes: 2 additions & 2 deletions ci/deps/actions-311-numpydev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ dependencies:
- python=3.11

# build dependencies
- versioneer[toml]
- meson[ninja]=1.2.1
- versioneer
- meson=1.2.1
- meson-python=0.13.1
- cython>=0.29.33

Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-311-pyarrownightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ dependencies:
- python=3.11

# build dependencies
- versioneer[toml]
- meson[ninja]=1.2.1
- versioneer
- meson=1.2.1
- cython>=0.29.33
- meson-python=0.13.1

Expand All @@ -18,7 +18,7 @@ dependencies:

# required dependencies
- python-dateutil
- numpy<2
- numpy
- pip

- pip:
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies:
- python=3.11

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down Expand Up @@ -52,7 +52,7 @@ dependencies:
- scipy>=1.10.0
- sqlalchemy>=2.0.0
- tabulate>=0.9.0
- xarray>=2022.12.0
- xarray>=2022.12.0, <=2024.9.0
- xlrd>=2.0.1
- xlsxwriter>=3.0.5
- zstandard>=0.19.0
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/actions-312.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies:
- python=3.12

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down Expand Up @@ -52,7 +52,7 @@ dependencies:
- scipy>=1.10.0
- sqlalchemy>=2.0.0
- tabulate>=0.9.0
- xarray>=2022.12.0
- xarray>=2022.12.0, <=2024.9.0
- xlrd>=2.0.1
- xlsxwriter>=3.0.5
- zstandard>=0.19.0
Expand Down
4 changes: 2 additions & 2 deletions ci/deps/actions-pypy-39.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies:
- python=3.9[build=*_pypy]

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down
6 changes: 3 additions & 3 deletions ci/deps/circle-311-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies:
- python=3.11

# build dependencies
- versioneer[toml]
- versioneer
- cython>=0.29.33
- meson[ninja]=1.2.1
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
Expand Down Expand Up @@ -52,7 +52,7 @@ dependencies:
- scipy>=1.10.0
- sqlalchemy>=2.0.0
- tabulate>=0.9.0
- xarray>=2022.12.0
- xarray>=2022.12.0, <2024.10.0
- xlrd>=2.0.1
- xlsxwriter>=3.0.5
- zstandard>=0.19.0
Expand Down
6 changes: 6 additions & 0 deletions doc/source/development/contributing_codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ So, before actually writing any code, you should write your tests. Often the te
taken from the original GitHub issue. However, it is always worth considering additional
use cases and writing corresponding tests.

We use `code coverage <https://en.wikipedia.org/wiki/Code_coverage>`_ to help understand
the amount of code which is covered by a test. We recommend striving to ensure code
you add or change within Pandas is covered by a test. Please see our
`code coverage dashboard through Codecov <https://app.codecov.io/github/pandas-dev/pandas>`_
for more information.

Adding tests is one of the most common requests after code is pushed to pandas. Therefore,
it is worth getting in the habit of writing tests ahead of time so this is never an issue.

Expand Down
4 changes: 4 additions & 0 deletions doc/source/development/contributing_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ You will need `Build Tools for Visual Studio 2022
scrolling down to "All downloads" -> "Tools for Visual Studio".
In the installer, select the "Desktop development with C++" Workloads.

If you encounter an error indicating ``cl.exe`` is not found when building with Meson,
reopen the installer and also select the optional component
**MSVC v142 - VS 2019 C++ x64/x86 build tools** in the right pane for installation.

Alternatively, you can install the necessary components on the commandline using
`vs_BuildTools.exe <https://learn.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?source=recommendations&view=vs-2022>`_

Expand Down
Loading

0 comments on commit 482080d

Please sign in to comment.