Skip to content

Commit 31d4141

Browse files
Dr-IrvMarcoGorelliphofl
authored
DOC: add instructions for updating environment (#51388)
* DOC: add instructions for updating environment * Use -r instead of -f in the pip line for upgrading Co-authored-by: Marco Edward Gorelli <[email protected]> --------- Co-authored-by: Marco Edward Gorelli <[email protected]> Co-authored-by: Patrick Hoefler <[email protected]>
1 parent a108ffa commit 31d4141

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

doc/source/development/contributing.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,26 @@ To automatically fix formatting errors on each commit you make, you can
331331
set up pre-commit yourself. First, create a Python :ref:`environment
332332
<contributing_environment>` and then set up :ref:`pre-commit <contributing.pre-commit>`.
333333

334+
.. _contributing.update-dev:
335+
336+
Updating the development environment
337+
------------------------------------
338+
339+
After updating your branch to merge in main from upstream, you may need to update
340+
your development environment to reflect any changes to the various packages that
341+
are used during development.
342+
343+
If using :ref:`mamba <contributing.mamba>`, do::
344+
345+
mamba deactivate
346+
mamba env update -f environment.yml
347+
mamba activate pandas-dev
348+
349+
If using :ref:`pip <contributing.pip>` , do::
350+
351+
# activate the virtual environment based on your platform
352+
pythom -m pip install --upgrade -r requirements-dev.txt
353+
334354
Tips for a successful pull request
335355
==================================
336356

doc/source/development/contributing_codebase.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ without needing to have done ``pre-commit install`` beforehand.
8989
you may run into issues if you're using conda. To solve this, you can downgrade
9090
``virtualenv`` to version ``20.0.33``.
9191

92+
.. note::
93+
94+
If you have recently merged in main from the upstream branch, some of the
95+
dependencies used by ``pre-commit`` may have changed. Make sure to
96+
:ref:`update your development environment <contributing.update-dev>`.
97+
9298
Optional dependencies
9399
---------------------
94100

doc/source/development/contributing_environment.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ Option 1: using mamba (recommended)
9595
mamba env create --file environment.yml
9696
mamba activate pandas-dev
9797
98+
.. _contributing.pip:
99+
98100
Option 2: using pip
99101
~~~~~~~~~~~~~~~~~~~
100102

0 commit comments

Comments
 (0)