Skip to content

Commit

Permalink
DOC: Recommend conda from miniforge for contributing environment (#59894
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mroeschke authored Sep 26, 2024
1 parent b948821 commit 23c497b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions doc/source/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,15 @@ It is important to periodically update your local ``main`` branch with updates f
branch and update your development environment to reflect any changes to the various packages that
are used during development.

If using :ref:`mamba <contributing.mamba>`, run:
If using :ref:`conda <contributing.conda>`, run:

.. code-block:: shell
git checkout main
git fetch upstream
git merge upstream/main
mamba activate pandas-dev
mamba env update -f environment.yml --prune
conda activate pandas-dev
conda env update -f environment.yml --prune
If using :ref:`pip <contributing.pip>` , do:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/development/contributing_codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ in your python environment.

.. warning::

* Please be aware that the above commands will use the current python environment. If your python packages are older/newer than those installed by the pandas CI, the above commands might fail. This is often the case when the ``mypy`` or ``numpy`` versions do not match. Please see :ref:`how to setup the python environment <contributing.mamba>` or select a `recently succeeded workflow <https://github.com/pandas-dev/pandas/actions/workflows/code-checks.yml?query=branch%3Amain+is%3Asuccess>`_, select the "Docstring validation, typing, and other manual pre-commit hooks" job, then click on "Set up Conda" and "Environment info" to see which versions the pandas CI installs.
* Please be aware that the above commands will use the current python environment. If your python packages are older/newer than those installed by the pandas CI, the above commands might fail. This is often the case when the ``mypy`` or ``numpy`` versions do not match. Please see :ref:`how to setup the python environment <contributing.conda>` or select a `recently succeeded workflow <https://github.com/pandas-dev/pandas/actions/workflows/code-checks.yml?query=branch%3Amain+is%3Asuccess>`_, select the "Docstring validation, typing, and other manual pre-commit hooks" job, then click on "Set up Conda" and "Environment info" to see which versions the pandas CI installs.

.. _contributing.ci:

Expand Down
23 changes: 11 additions & 12 deletions doc/source/development/contributing_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ and consult the ``Linux`` instructions below.

**macOS**

To use the :ref:`mamba <contributing.mamba>`-based compilers, you will need to install the
To use the :ref:`conda <contributing.conda>`-based compilers, you will need to install the
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**

For Linux-based :ref:`mamba <contributing.mamba>` installations, you won't have to install any
additional components outside of the mamba environment. The instructions
below are only needed if your setup isn't based on mamba environments.
For Linux-based :ref:`conda <contributing.conda>` installations, you won't have to install any
additional components outside of the conda environment. The instructions
below are only needed if your setup isn't based on conda environments.

Some Linux distributions will come with a pre-installed C compiler. To find out
which compilers (and versions) are installed on your system::
Expand Down Expand Up @@ -82,19 +82,18 @@ Before we begin, please:
* Make sure that you have :any:`cloned the repository <contributing.forking>`
* ``cd`` to the pandas source directory you just created with the clone command

.. _contributing.mamba:
.. _contributing.conda:

Option 1: using mamba (recommended)
Option 1: using conda (recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Install miniforge to get `mamba <https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html>`_
* Make sure your mamba is up to date (``mamba update mamba``)
* Create and activate the ``pandas-dev`` mamba environment using the following commands:
* Install miniforge to get `conda <https://github.com/conda-forge/miniforge?tab=readme-ov-file#download>`_
* Create and activate the ``pandas-dev`` conda environment using the following commands:

.. code-block:: none
.. code-block:: bash
mamba env create --file environment.yml
mamba activate pandas-dev
conda env create --file environment.yml
conda activate pandas-dev
.. _contributing.pip:

Expand Down

0 comments on commit 23c497b

Please sign in to comment.