From 7d9c06224e2ebfc249449d7e7559dc9a4f4636c9 Mon Sep 17 00:00:00 2001 From: Bouwe Andela Date: Thu, 4 Sep 2025 11:46:27 +0200 Subject: [PATCH 1/5] Use --no-deps to avoid messing up the conda environment --- .circleci/config.yml | 12 +++++++----- doc/sphinx/source/quickstart/installation.rst | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b90ac7d626..64ca97a73d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,6 +41,7 @@ commands: command: | . /opt/conda/etc/profile.d/conda.sh conda activate esmvaltool + pip check pytest -n 4 --junitxml=test-reports/report.xml esmvaltool version esmvaltool -- --help @@ -95,7 +96,7 @@ commands: conda env create -n esmvaltool -f environment.yml --verbose conda activate esmvaltool mamba list >> /logs/conda.txt - pip install << parameters.flags >> ".[<>]"> /logs/install.txt 2>&1 + pip --no-deps install << parameters.flags >> ".[<>]"> /logs/install.txt 2>&1 if [[ "<>" != *'--editable'* ]] then rm -r esmvaltool @@ -135,7 +136,7 @@ jobs: . /opt/conda/etc/profile.d/conda.sh conda activate esmvaltool mkdir /logs - pip install .[test] > /logs/install.txt 2>&1 + pip --no-deps install .[test] > /logs/install.txt 2>&1 - run: name: Check Python code style and mistakes command: | @@ -206,9 +207,9 @@ jobs: conda env create -n esmvaltool -f environment.yml --verbose conda activate esmvaltool mamba list >> /logs/conda.txt - pip install --editable .[develop] + pip install --no-deps --editable .[develop] git clone https://github.com/ESMValGroup/ESMValCore $HOME/ESMValCore - pip install --editable $HOME/ESMValCore[develop] + pip install --no-deps --editable $HOME/ESMValCore[develop] - log_versions - test_and_report - run: @@ -246,7 +247,8 @@ jobs: # Install conda env create -n esmvaltool -f environment_python.yml conda activate esmvaltool - pip install .[doc] + pip install --no-deps .[doc] + pip check # Log versions dpkg -l > /logs/versions.txt conda env export > /logs/environment.yml diff --git a/doc/sphinx/source/quickstart/installation.rst b/doc/sphinx/source/quickstart/installation.rst index c65ad981cc..b7688ae058 100644 --- a/doc/sphinx/source/quickstart/installation.rst +++ b/doc/sphinx/source/quickstart/installation.rst @@ -372,7 +372,7 @@ code (called ``ESMValTool`` if you did not choose a different name): .. code-block:: bash - pip install --editable '.[develop]' + pip install --no-deps --editable '.[develop]' Using the ``--editable`` flag will cause the installer to create a symbolic link from the installation location to your source code, so any changes you make to @@ -471,7 +471,7 @@ and then install ESMValCore in development mode .. code-block:: bash - pip install --editable '.[develop]' + pip install --no-deps --editable '.[develop]' To check that the installation was successful, run @@ -484,7 +484,7 @@ this should show the directory of the source code that you just downloaded. If the command above shows a directory inside your conda environment instead, e.g. ``~/miniforge3/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore``, you may need to manually remove that directory and run -``pip install --editable '.[develop]'`` again. +``pip install --no-deps --editable '.[develop]'`` again. Finally, also install the :ref:`esmvaltool:pre-commit` hooks by running: @@ -688,7 +688,7 @@ trust the usual PyPI URLs you can declare them with the option .. code-block:: bash - pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org -e .[develop] + pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --no-deps -e .[develop] If R packages fail to download, you might be able to solve this by setting the environment variable ``http_proxy`` to the correct value, e.g. From 8f71ace9f26e17bb101641f4a1680b53dd8abf0a Mon Sep 17 00:00:00 2001 From: Bouwe Andela Date: Thu, 4 Sep 2025 11:50:01 +0200 Subject: [PATCH 2/5] Fix order of arguments --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 64ca97a73d..ddaa056fb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,7 +96,7 @@ commands: conda env create -n esmvaltool -f environment.yml --verbose conda activate esmvaltool mamba list >> /logs/conda.txt - pip --no-deps install << parameters.flags >> ".[<>]"> /logs/install.txt 2>&1 + pip install --no-deps << parameters.flags >> ".[<>]"> /logs/install.txt 2>&1 if [[ "<>" != *'--editable'* ]] then rm -r esmvaltool @@ -136,7 +136,7 @@ jobs: . /opt/conda/etc/profile.d/conda.sh conda activate esmvaltool mkdir /logs - pip --no-deps install .[test] > /logs/install.txt 2>&1 + pip install --no-deps .[test] > /logs/install.txt 2>&1 - run: name: Check Python code style and mistakes command: | From a0813a1d1655c5a1d21448955e15e94fd2c61077 Mon Sep 17 00:00:00 2001 From: Bouwe Andela Date: Thu, 4 Sep 2025 12:04:56 +0200 Subject: [PATCH 3/5] Add upper pin that is not declared in nbsphinx feedstock --- environment.yml | 2 +- environment_osx.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index f5e50a4d9a..1691e604a8 100644 --- a/environment.yml +++ b/environment.yml @@ -80,7 +80,7 @@ dependencies: # Python packages needed for building docs - autodocsumm >=0.2.2 - nbsphinx - - sphinx >=6.1.3 + - sphinx >=6.1.3,<8.2 # Upper pin is a requirement of nbsphinx 0.9.7 - pydata-sphinx-theme # Python packages needed for development - codespell ==2.3.0 diff --git a/environment_osx.yml b/environment_osx.yml index 0f8050e92f..e945f93e0d 100644 --- a/environment_osx.yml +++ b/environment_osx.yml @@ -80,7 +80,7 @@ dependencies: # Python packages needed for building docs - autodocsumm >=0.2.2 - nbsphinx - - sphinx >=6.1.3 + - sphinx >=6.1.3,<8.2 # Upper pin is a requirement of nbsphinx 0.9.7 - pydata-sphinx-theme # Python packages needed for development - codespell ==2.3.0 From f421ea53d66685ba97b54c3098ed8628596818e1 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Mon, 15 Sep 2025 15:49:19 +0100 Subject: [PATCH 4/5] install pytest-mon with deps --- .github/workflows/run-tests-monitor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests-monitor.yml b/.github/workflows/run-tests-monitor.yml index 1d725fc442..a859efb89b 100644 --- a/.github/workflows/run-tests-monitor.yml +++ b/.github/workflows/run-tests-monitor.yml @@ -46,7 +46,7 @@ jobs: - name: Inspect environment run: conda list - name: Install pytest-monitor - run: pip install --no-deps pytest-monitor + run: pip install pytest-monitor - name: Install ESMValTool run: pip install --no-deps -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt - name: Run tests @@ -95,7 +95,7 @@ jobs: - name: Install git run: mamba install -c conda-forge git - name: Install pytest-monitor - run: pip install --no-deps pytest-monitor + run: pip install pytest-monitor - name: Install ESMValTool run: > pip install --no-deps -e .[develop] 2>&1 From 4a5dbb0ae980a2b9f5104c8097627ec04b4047dd Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Mon, 15 Sep 2025 15:49:47 +0100 Subject: [PATCH 5/5] rm nbsphinx from conda lock --- conda-linux-64.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/conda-linux-64.lock b/conda-linux-64.lock index 356309f68f..6555cc8a5b 100644 --- a/conda-linux-64.lock +++ b/conda-linux-64.lock @@ -730,7 +730,6 @@ https://conda.anaconda.org/conda-forge/noarch/r-spei-1.8.1-r44hc72bb7e_2.conda#a https://conda.anaconda.org/conda-forge/linux-64/r-geomap-2.5_11-r44h2b5f3a1_1.conda#8edbf8d4946a8acc22828afe13264132 https://conda.anaconda.org/conda-forge/noarch/r-s2dverification-2.10.3-r44hc72bb7e_3.conda#102a36eae44cdb684f36ac1148a6aee8 https://conda.anaconda.org/conda-forge/noarch/autodocsumm-0.2.14-pyhd8ed1ab_0.conda#351a11ac1215eb4f6c5b82e30070277a -https://conda.anaconda.org/conda-forge/noarch/nbsphinx-0.9.7-pyhd8ed1ab_0.conda#9a3844478c73b5fe288426d001453261 https://conda.anaconda.org/conda-forge/noarch/pydata-sphinx-theme-0.16.1-pyhd8ed1ab_0.conda#837aaf71ddf3b27acae0e7e9015eebc6 https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_1.conda#16e3f039c0aa6446513e94ab18a8784b https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-devhelp-2.0.0-pyhd8ed1ab_1.conda#910f28a05c178feba832f842155cbfff