Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Add clarifications to docs for setting up a development environment #56201

Merged
merged 6 commits into from
Nov 28, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions doc/source/development/contributing_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ and consult the ``Linux`` instructions below.
**macOS**

To use the :ref:`mamba <contributing.mamba>`-based compilers, you will need to install the
Developer Tools using ``xcode-select --install``. Otherwise
information about compiler installation can be found here:
Developer Tools using ``xcode-select --install``.

If you prefer to use a different compiler, general information can be found here:
https://devguide.python.org/setup/#macos

**Linux**
Expand Down Expand Up @@ -87,14 +88,24 @@ Option 1: using mamba (recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Install `mamba <https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html>`_
(the instructions may direct you to install `miniforge <https://github.com/conda-forge/miniforge>`_,
which is OK - it includes mamba)
smij720 marked this conversation as resolved.
Show resolved Hide resolved
* Make sure your mamba is up to date (``mamba update mamba``)
* Create and activate the ``pandas-dev`` mamba environment using the following commands:

.. code-block:: none

# Create and activate the build environment
mamba env create --file environment.yml
mamba activate pandas-dev

* Ensure any python packages without a version specified in the ``environment.yml`` file
smij720 marked this conversation as resolved.
Show resolved Hide resolved
in the root directory are the most recent version:

.. code-block:: none

mamba activate pandas-dev
mamba update --all

.. _contributing.pip:

Option 2: using pip
Expand Down Expand Up @@ -273,13 +284,21 @@ uses to import the extension from the build folder, which may cause errors such
You will need to repeat this step each time the C extensions change, for example
if you modified any file in ``pandas/_libs`` or if you did a fetch and merge from ``upstream/main``.

**Checking the build**

At this point you should be able to import pandas from your locally built version::

$ python
>>> import pandas
>>> print(pandas.__version__) # note: the exact output may differ
2.0.0.dev0+880.g2b9e661fbb.dirty


At this point you may want to try
`running the test suite <https://pandas.pydata.org/docs/dev/development/contributing_codebase.html#running-the-test-suite>`_.

**Keeping up to date with the latest build**

When building pandas with meson, importing pandas will automatically trigger a rebuild, even when C/Cython files are modified.
By default, no output will be produced by this rebuild (the import will just take longer). If you would like to see meson's
output when importing pandas, you can set the environment variable ``MESONPY_EDTIABLE_VERBOSE``. For example, this would be::
Expand Down
Loading