Skip to content

Commit 410a0fb

Browse files
authored
Use pip install --no-deps to avoid overwiting packages from the conda environment (#2829)
1 parent a0c594e commit 410a0fb

File tree

9 files changed

+27
-20
lines changed

9 files changed

+27
-20
lines changed

.circleci/config.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ commands:
3131
mkdir -p test-reports
3232
. /opt/conda/etc/profile.d/conda.sh
3333
conda activate esmvaltool
34+
pip check
3435
pytest -n 4 --junitxml=test-reports/report.xml << parameters.args >>
3536
esmvaltool version
3637
- store_test_results:
@@ -54,7 +55,7 @@ commands:
5455
type: string
5556
default: "test"
5657
flags:
57-
description: pip install flags
58+
description: pip install --no-deps flags
5859
type: string
5960
default: ""
6061
upstream_packages:
@@ -130,7 +131,7 @@ jobs:
130131
. /opt/conda/etc/profile.d/conda.sh
131132
mkdir /logs
132133
conda activate esmvaltool
133-
pip install .[test] > /logs/install.txt 2>&1
134+
pip install --no-deps .[test] > /logs/install.txt 2>&1
134135
- test_and_report:
135136
args: --cov
136137
- save_cache:
@@ -220,7 +221,8 @@ jobs:
220221
# Install
221222
mamba env create -n esmvaltool -f environment.yml
222223
conda activate esmvaltool
223-
pip install .[doc]
224+
pip install --no-deps .[doc]
225+
pip check
224226
# Log versions
225227
dpkg -l | tee /logs/versions.txt
226228
conda env export | tee /logs/environment.yml

.github/workflows/create-condalock-file.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ jobs:
6161
- name: Show environment contents
6262
run: conda list
6363
- name: Install esmvalcore
64-
run: pip install -e .[develop]
64+
run: pip install --no-deps -e .[develop]
6565
- name: Run basic commands
6666
run: |
67+
pip check
6768
esmvaltool --help
6869
esmvaltool version
6970
- name: Run pytests

.github/workflows/install-from-condalock-file.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
- run: conda create --name esmvaltool-fromlock --file conda-linux-64.lock
5050
- run: which python
5151
- run: pip --version
52-
- run: pip install -e .[develop]
52+
- run: pip install --no-deps -e .[develop]
53+
- run: pip check
5354
- run: esmvaltool --help
5455
- run: esmvaltool version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
5556
- run: pytest -n 2 -m "not installation"

.github/workflows/install-from-pypi.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ jobs:
6161
python -V 2>&1 | tee pip_install_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
6262
pip -V 2>&1 | tee pip_install_linux_artifacts_python_${{ matrix.python-version }}/pip_version.txt
6363
- name: Install
64-
run: pip install esmvalcore 2>&1 | tee pip_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
64+
run: pip install --no-deps esmvalcore 2>&1 | tee pip_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
6565
- name: Verify installation
6666
run: |
67+
pip check
6768
esmvaltool --help
6869
esmvaltool version 2>&1 | tee pip_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
6970
- name: Upload artifacts
@@ -99,7 +100,7 @@ jobs:
99100
python -V 2>&1 | tee pip_install_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
100101
pip -V 2>&1 | tee pip_install_osx_artifacts_python_${{ matrix.python-version }}/pip_version.txt
101102
- name: Install
102-
run: pip install esmvalcore 2>&1 | tee pip_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
103+
run: pip install --no-deps esmvalcore 2>&1 | tee pip_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
103104
- name: Verify installation
104105
run: |
105106
esmvaltool --help

.github/workflows/install-from-source.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ jobs:
5858
mamba --version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
5959
python -V 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
6060
- name: Install
61-
run: pip install -e .[develop] 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
61+
run: pip install --no-deps -e .[develop] 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
6262
- name: Verify installation
6363
run: |
64+
pip check
6465
esmvaltool --help
6566
esmvaltool version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
6667
- name: Upload artifacts
@@ -99,7 +100,7 @@ jobs:
99100
- name: Force install x64 git
100101
run: mamba install -c conda-forge git
101102
- name: Install
102-
run: pip install -e .[develop] 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
103+
run: pip install --no-deps -e .[develop] 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt
103104
- name: Verify installation
104105
run: |
105106
esmvaltool --help

.github/workflows/run-tests-monitor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
- run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }}
4141
- run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
4242
- run: python -V 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
43-
- run: pip install pytest-monitor
44-
- run: pip install -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt
43+
- run: pip install --no-deps pytest-monitor
44+
- run: pip install --no-deps -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt
4545
- run: pytest -n 2 -m "not installation" --db ../.pymon 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/test_report.txt
4646
- run: python tests/parse_pymon.py
4747
- name: Upload artifacts
@@ -76,8 +76,8 @@ jobs:
7676
- run: conda --version 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/conda_version.txt
7777
- run: python -V 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
7878
- run: mamba install -c conda-forge git
79-
- run: pip install pytest-monitor
80-
- run: pip install -e .[develop] 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/install.txt
79+
- run: pip install --no-deps pytest-monitor
80+
- run: pip install --no-deps -e .[develop] 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/install.txt
8181
- run: conda list
8282
- run: pytest -n 2 -m "not installation" --db ../.pymon 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/test_report.txt
8383
- run: python tests/parse_pymon.py

.github/workflows/run-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ jobs:
5858
- run: conda --version 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/conda_version.txt
5959
- run: python -V 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/python_version.txt
6060
- run: conda list
61-
- run: pip install -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt
61+
- run: pip install --no-deps -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt
6262
- run: conda list
63+
- run: pip check
6364
- run: |
6465
pre-commit install
6566
pre-commit run -a
@@ -97,7 +98,7 @@ jobs:
9798
- run: python -V 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/python_version.txt
9899
- run: mamba install -c conda-forge git
99100
- run: conda list
100-
- run: pip install -e .[develop] 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/install.txt
101+
- run: pip install --no-deps -e .[develop] 2>&1 | tee test_osx_artifacts_python_${{ matrix.python-version }}/install.txt
101102
- run: conda list
102103
- run: |
103104
pre-commit install

doc/quickstart/install.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ Finally, activate the newly created environment
6363
6464
conda activate esmvalcore
6565
66-
and install ESMValCore as well as any remaining dependencies with the command:
66+
and install ESMValCore with the command:
6767

6868
.. code-block:: bash
6969
70-
pip install esmvalcore
70+
pip install --no-deps esmvalcore
7171
7272
7373
Docker installation
@@ -189,10 +189,10 @@ To install from source for development, follow these instructions.
189189
- Create the esmvalcore conda environment
190190
``conda env create --name esmvalcore --file environment.yml``
191191
- Activate the esmvalcore environment: ``conda activate esmvalcore``
192-
- Install in development mode: ``pip install -e '.[develop]'``. If you
192+
- Install in development mode: ``pip install --no-deps -e '.[develop]'``. If you
193193
are installing behind a proxy that does not trust the usual pip-urls
194194
you can declare them with the option ``--trusted-host``,
195-
e.g. ``pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org -e .[develop]``
195+
e.g. ``pip install --no-deps --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org -e .[develop]``
196196
- Test that your installation was successful by running
197197
``esmvaltool -h``.
198198
- Install the :ref:`esmvaltool:pre-commit` hooks by running:

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies:
5454
- autodocsumm >=0.2.2
5555
- ipython <9.0 # github.com/ESMValGroup/ESMValCore/issues/2680
5656
- nbsphinx >=0.9.7 # github.com/ESMValGroup/ESMValCore/issues/2669
57-
- sphinx >=6.1.3
57+
- sphinx >=6.1.3,<8.2 # Upper pin is a requirement of nbsphinx 0.9.7
5858
- pydata-sphinx-theme
5959
# Python packages needed for testing
6060
- pre-commit

0 commit comments

Comments
 (0)