Skip to content

Commit 1045543

Browse files
authored
Merge branch 'pandas-dev:main' into main
2 parents df965f3 + fb19ddb commit 1045543

File tree

207 files changed

+1835
-1858
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+1835
-1858
lines changed

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ body:
6868
attributes:
6969
label: Additional Context
7070
description: >
71-
Please provide any relevant Github issues, code examples or references that help describe and support
71+
Please provide any relevant GitHub issues, code examples or references that help describe and support
7272
the feature request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
1+
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
22
- [ ] [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
33
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
44
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.

.github/workflows/macos-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows-MacOS
1+
name: Windows-macOS
22

33
on:
44
push:

.github/workflows/python-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# In general, this file will remain frozen(present, but not running) until:
55
# - The next unreleased Python version has released beta 1
6-
# - This version should be available on Github Actions.
6+
# - This version should be available on GitHub Actions.
77
# - Our required build/runtime dependencies(numpy, pytz, Cython, python-dateutil)
88
# support that unreleased Python version.
99
# To unfreeze, comment out the ``if: false`` condition, and make sure you update

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
# Ensure that a wheel builder finishes even if another fails
4545
fail-fast: false
4646
matrix:
47-
# Github Actions doesn't support pairing matrix values together, let's improvise
47+
# GitHub Actions doesn't support pairing matrix values together, let's improvise
4848
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
4949
buildplat:
5050
- [ubuntu-20.04, manylinux_x86_64]

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ repos:
251251
files: ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
252252
- id: validate-errors-locations
253253
name: Validate errors locations
254-
description: Validate errors are in approriate locations.
254+
description: Validate errors are in appropriate locations.
255255
entry: python scripts/validate_exception_location.py
256256
language: python
257257
files: ^pandas/

asv_bench/benchmarks/multiindex_object.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,11 @@ class SetOperations:
239239
("monotonic", "non_monotonic"),
240240
("datetime", "int", "string", "ea_int"),
241241
("intersection", "union", "symmetric_difference"),
242+
(False, None),
242243
]
243-
param_names = ["index_structure", "dtype", "method"]
244+
param_names = ["index_structure", "dtype", "method", "sort"]
244245

245-
def setup(self, index_structure, dtype, method):
246+
def setup(self, index_structure, dtype, method, sort):
246247
N = 10**5
247248
level1 = range(1000)
248249

@@ -272,8 +273,8 @@ def setup(self, index_structure, dtype, method):
272273
self.left = data[dtype]["left"]
273274
self.right = data[dtype]["right"]
274275

275-
def time_operation(self, index_structure, dtype, method):
276-
getattr(self.left, method)(self.right)
276+
def time_operation(self, index_structure, dtype, method, sort):
277+
getattr(self.left, method)(self.right, sort=sort)
277278

278279

279280
class Difference:

doc/redirects.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ contributing_docstring,development/contributing_docstring
4545
developer,development/developer
4646
extending,development/extending
4747
internals,development/internals
48+
development/meeting,community
4849

4950
# api moved function
5051
reference/api/pandas.io.json.json_normalize,pandas.json_normalize

doc/source/development/community.rst

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
.. _community:
2+
3+
=====================
4+
Contributor community
5+
=====================
6+
7+
pandas is a community-driven open source project developed by a large group
8+
of `contributors <https://github.com/pandas-dev/pandas/graphs/contributors>`_
9+
and a smaller group of `maintainers <https://pandas.pydata.org/about/team.html>`_.
10+
The pandas leadership has made a strong commitment to creating an open,
11+
inclusive, and positive community. Please read the pandas `Code of Conduct
12+
<https://pandas.pydata.org/community/coc.html>`_ for guidance on how to
13+
interact with others in a way that makes the community thrive.
14+
15+
We offer several meetings and communication channels to share knowledge and
16+
connect with others within the pandas community.
17+
18+
Community meeting
19+
-----------------
20+
21+
The pandas Community Meeting is a regular sync meeting for the project's
22+
maintainers which is open to the community. Everyone is welcome to attend and
23+
contribute to conversations.
24+
25+
The meetings take place on the second Wednesday of each month at 18:00 UTC.
26+
27+
The minutes of past meetings are available in `this Google Document <https://docs.google.com/document/d/1tGbTiYORHiSPgVMXawiweGJlBw5dOkVJLY-licoBmBU/edit?usp=sharing>`__.
28+
29+
30+
New contributor meeting
31+
-----------------------
32+
33+
On the third Wednesday of the month, we hold meetings to welcome and support
34+
new contributors in our community.
35+
36+
| 👋 you all are invited
37+
| 💬 everyone can present (add yourself to the hackMD agenda)
38+
| 👀 anyone can sit in and listen
39+
40+
Attendees are new and experienced contributors, as well as a few maintainers.
41+
We aim to answer questions about getting started, or help with work in
42+
progress when possible, as well as get to know each other and share our
43+
learnings and experiences.
44+
45+
The agenda for the next meeting and minutes of past meetings are available in
46+
`this HackMD <https://hackmd.io/@pandas-dev/HJgQt1Tei>`__.
47+
48+
Calendar
49+
--------
50+
51+
This calendar shows all the community meetings. Our community meetings are
52+
ideal for anyone wanting to contribute to pandas, or just curious to know how
53+
current development is going.
54+
55+
.. raw:: html
56+
57+
<iframe src="https://calendar.google.com/calendar/embed?src=pgbn14p6poja8a1cf2dv2jhrmg%40group.calendar.google.com" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
58+
59+
You can subscribe to this calendar with the following links:
60+
61+
* `iCal <https://calendar.google.com/calendar/ical/pgbn14p6poja8a1cf2dv2jhrmg%40group.calendar.google.com/public/basic.ics>`__
62+
* `Google calendar <https://calendar.google.com/calendar/[email protected]>`__
63+
64+
Additionally, we'll sometimes have one-off meetings on specific topics.
65+
These will be published on the same calendar.
66+
67+
`GitHub issue tracker <https://github.com/pandas-dev/pandas/issues>`_
68+
----------------------------------------------------------------------
69+
70+
The pandas contributor community conducts conversations mainly via this channel.
71+
Any community member can open issues to:
72+
73+
- Report bugs, e.g. "I noticed the behavior of a certain function is
74+
incorrect"
75+
- Request features, e.g. "I would like this error message to be more readable"
76+
- Request documentation improvements, e.g. "I found this section unclear"
77+
- Ask questions, e.g. "I noticed the behavior of a certain function
78+
changed between versions. Is this expected?".
79+
80+
Ideally your questions should be related to how pandas work rather
81+
than how you use pandas. `StackOverflow <https://stackoverflow.com/>`_ is
82+
better suited for answering usage questions, and we ask that all usage
83+
questions are first asked on StackOverflow. Thank you for respecting are
84+
time and wishes. 🙇
85+
86+
Maintainers and frequent contributors might also open issues to discuss the
87+
ongoing development of the project. For example:
88+
89+
- Report issues with the CI, GitHub Actions, or the performance of pandas
90+
- Open issues relating to the internals
91+
- Start roadmap discussion aligning on proposals what to do in future
92+
releases or changes to the API.
93+
- Open issues relating to the project's website, logo, or governance
94+
95+
The developer mailing list
96+
--------------------------
97+
98+
The pandas mailing list `[email protected] <mailto://pandas-dev@python
99+
.org>`_ is used for long form
100+
conversations and to engages people in the wider community who might not
101+
be active on the issue tracker but we would like to include in discussions.
102+
103+
Community slack
104+
---------------
105+
106+
We have a chat platform for contributors, maintainers and potential
107+
contributors. This is not a space for user questions, rather for questions about
108+
contributing to pandas. The slack is a private space, specifically meant for
109+
people who are hesitant to bring up their questions or ideas on a large public
110+
mailing list or GitHub.
111+
112+
If this sounds like the right place for you, you are welcome to join! Email us
113+
at `[email protected] <mailto://[email protected]>`_ and let us
114+
know that you read and agree to our `Code of Conduct <https://pandas.pydata.org/community/coc.html>`_
115+
😉 to get an invite. And please remember the slack is not meant to replace the
116+
mailing list or issue tracker - all important announcements and conversations
117+
should still happen there.

doc/source/development/contributing_codebase.rst

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Otherwise, you need to do it manually:
139139
warnings.warn(
140140
'Use new_func instead.',
141141
FutureWarning,
142-
stacklevel=find_stack_level(inspect.currentframe()),
142+
stacklevel=find_stack_level(),
143143
)
144144
new_func()
145145
@@ -651,7 +651,7 @@ Example
651651
^^^^^^^
652652

653653
Here is an example of a self-contained set of tests in a file ``pandas/tests/test_cool_feature.py``
654-
that illustrate multiple features that we like to use. Please remember to add the Github Issue Number
654+
that illustrate multiple features that we like to use. Please remember to add the GitHub Issue Number
655655
as a comment to a new test.
656656

657657
.. code-block:: python
@@ -790,14 +790,11 @@ Or with one of the following constructs::
790790
pytest pandas/tests/[test-module].py::[TestClass]
791791
pytest pandas/tests/[test-module].py::[TestClass]::[test_method]
792792

793-
Using `pytest-xdist <https://pypi.org/project/pytest-xdist>`_, one can
794-
speed up local testing on multicore machines. To use this feature, you will
795-
need to install ``pytest-xdist`` via::
796-
797-
pip install pytest-xdist
798-
799-
The ``-n`` flag then can be specified when running ``pytest`` to parallelize a test run
800-
across the number of specified cores or ``auto`` to utilize all the available cores on your machine.
793+
Using `pytest-xdist <https://pypi.org/project/pytest-xdist>`_, which is
794+
included in our 'pandas-dev' environment, one can speed up local testing on
795+
multicore machines. The ``-n`` number flag then can be specified when running
796+
pytest to parallelize a test run across the number of specified cores or auto to
797+
utilize all the available cores on your machine.
801798

802799
.. code-block:: bash
803800
@@ -807,8 +804,57 @@ across the number of specified cores or ``auto`` to utilize all the available co
807804
# Utilizes all available cores
808805
pytest -n auto pandas
809806
810-
This can significantly reduce the time it takes to locally run tests before
811-
submitting a pull request.
807+
If you'd like to speed things along further a more advanced use of this
808+
command would look like this
809+
810+
.. code-block:: bash
811+
812+
pytest pandas -n 4 -m "not slow and not network and not db and not single_cpu" -r sxX
813+
814+
In addition to the multithreaded performance increase this improves test
815+
speed by skipping some tests using the ``-m`` mark flag:
816+
817+
- slow: any test taking long (think seconds rather than milliseconds)
818+
- network: tests requiring network connectivity
819+
- db: tests requiring a database (mysql or postgres)
820+
- single_cpu: tests that should run on a single cpu only
821+
822+
You might want to enable the following option if it's relevant for you:
823+
824+
- arm_slow: any test taking long on arm64 architecture
825+
826+
These markers are defined `in this toml file <https://github.com/pandas-dev/pandas/blob/main/pyproject.toml>`_
827+
, under ``[tool.pytest.ini_options]`` in a list called ``markers``, in case
828+
you want to check if new ones have been created which are of interest to you.
829+
830+
The ``-r`` report flag will display a short summary info (see `pytest
831+
documentation <https://docs.pytest.org/en/4.6.x/usage.html#detailed-summary-report>`_)
832+
. Here we are displaying the number of:
833+
834+
- s: skipped tests
835+
- x: xfailed tests
836+
- X: xpassed tests
837+
838+
The summary is optional and can be removed if you don't need the added
839+
information. Using the parallelization option can significantly reduce the
840+
time it takes to locally run tests before submitting a pull request.
841+
842+
If you require assistance with the results,
843+
which has happened in the past, please set a seed before running the command
844+
and opening a bug report, that way we can reproduce it. Here's an example
845+
for setting a seed on windows
846+
847+
.. code-block:: bash
848+
849+
set PYTHONHASHSEED=314159265
850+
pytest pandas -n 4 -m "not slow and not network and not db and not single_cpu" -r sxX
851+
852+
On Unix use
853+
854+
.. code-block:: bash
855+
856+
export PYTHONHASHSEED=314159265
857+
pytest pandas -n 4 -m "not slow and not network and not db and not single_cpu" -r sxX
812858
813859
For more, see the `pytest <https://docs.pytest.org/en/latest/>`_ documentation.
814860

doc/source/development/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ Development
2323
developer
2424
policies
2525
roadmap
26-
meeting
26+
community

doc/source/development/maintaining.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,15 @@ pandas supports point releases (e.g. ``1.4.3``) that aim to:
210210

211211
* e.g. If a feature worked in ``1.2`` and stopped working since ``1.3``, a fix can be applied in ``1.4.3``.
212212

213-
Since pandas minor releases are based on Github branches (e.g. point release of ``1.4`` are based off the ``1.4.x`` branch),
213+
Since pandas minor releases are based on GitHub branches (e.g. point release of ``1.4`` are based off the ``1.4.x`` branch),
214214
"backporting" means merging a pull request fix to the ``main`` branch and correct minor branch associated with the next point release.
215215

216-
By default, if a pull request is assigned to the next point release milestone within the Github interface,
216+
By default, if a pull request is assigned to the next point release milestone within the GitHub interface,
217217
the backporting process should happen automatically by the ``@meeseeksdev`` bot once the pull request is merged.
218218
A new pull request will be made backporting the pull request to the correct version branch.
219219
Sometimes due to merge conflicts, a manual pull request will need to be made addressing the code conflict.
220220

221-
If the bot does not automatically start the backporting process, you can also write a Github comment in the merged pull request
221+
If the bot does not automatically start the backporting process, you can also write a GitHub comment in the merged pull request
222222
to trigger the backport::
223223

224224
@meeseeksdev backport version-branch
@@ -271,14 +271,14 @@ being helpful on the issue tracker.
271271
The required steps for adding a maintainer are:
272272

273273
1. Contact the contributor and ask their interest to join.
274-
2. Add the contributor to the appropriate `Github Team <https://github.com/orgs/pandas-dev/teams>`_ if accepted the invitation.
274+
2. Add the contributor to the appropriate `GitHub Team <https://github.com/orgs/pandas-dev/teams>`_ if accepted the invitation.
275275

276276
* ``pandas-core`` is for core team members
277277
* ``pandas-triage`` is for pandas triage members
278278

279279
3. Add the contributor to the pandas Google group.
280-
4. Create a pull request to add the contributor's Github handle to ``pandas-dev/pandas/web/pandas/config.yml``.
281-
5. Create a pull request to add the contributor's name/Github handle to the `governance document <https://github.com/pandas-dev/pandas-governance/blob/master/people.md>`_.
280+
4. Create a pull request to add the contributor's GitHub handle to ``pandas-dev/pandas/web/pandas/config.yml``.
281+
5. Create a pull request to add the contributor's name/GitHub handle to the `governance document <https://github.com/pandas-dev/pandas-governance/blob/master/people.md>`_.
282282

283283
The current list of core-team members is at
284284
https://github.com/pandas-dev/pandas-governance/blob/master/people.md
@@ -328,7 +328,7 @@ The machine can be configured with the `Ansible <http://docs.ansible.com/ansible
328328
Publishing
329329
``````````
330330

331-
The results are published to another Github repository, https://github.com/tomaugspurger/asv-collection.
331+
The results are published to another GitHub repository, https://github.com/tomaugspurger/asv-collection.
332332
Finally, we have a cron job on our docs server to pull from https://github.com/tomaugspurger/asv-collection, to serve them from ``/speed``.
333333
Ask Tom or Joris for access to the webserver.
334334

doc/source/development/meeting.rst

Lines changed: 0 additions & 31 deletions
This file was deleted.

doc/source/ecosystem.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ development to remain focused around it's original requirements.
1919
This is an inexhaustive list of projects that build on pandas in order to provide
2020
tools in the PyData space. For a list of projects that depend on pandas,
2121
see the
22-
`Github network dependents for pandas <https://github.com/pandas-dev/pandas/network/dependents>`_
22+
`GitHub network dependents for pandas <https://github.com/pandas-dev/pandas/network/dependents>`_
2323
or `search pypi for pandas <https://pypi.org/search/?q=pandas>`_.
2424

2525
We'd like to make it easier for users to find these projects, if you know of other
@@ -599,4 +599,4 @@ Install pandas-stubs to enable basic type coverage of pandas API.
599599

600600
Learn more by reading through :issue:`14468`, :issue:`26766`, :issue:`28142`.
601601

602-
See installation and usage instructions on the `github page <https://github.com/pandas-dev/pandas-stubs>`__.
602+
See installation and usage instructions on the `GitHub page <https://github.com/pandas-dev/pandas-stubs>`__.

0 commit comments

Comments
 (0)