From 6f9ef8f02c68100aa92ddc1be4381201c5e562fb Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Tue, 27 Jun 2023 11:58:26 +0200 Subject: [PATCH 1/8] Update ubuntu runner to latest available version --- .github/workflows/nestbuildmatrix.yml | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml index d6d9362185..17605430e3 100644 --- a/.github/workflows/nestbuildmatrix.yml +++ b/.github/workflows/nestbuildmatrix.yml @@ -8,7 +8,7 @@ on: [push, pull_request] jobs: clang-format: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" env: CLANG_REQUIRE_VERSION: 13 CLANG_FORMAT_FILE: ".clang-format" @@ -28,7 +28,7 @@ jobs: diff -u <(cat ${files}) <(clang-format ${files}) cppcheck: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -45,7 +45,7 @@ jobs: cppcheck --enable=all --language=c++ --std=c++11 -i sli/ --suppressions-list=.cppcheck_suppressions ./ rstcheck: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -66,7 +66,7 @@ jobs: rstcheck -r doc/ vale: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -92,7 +92,7 @@ jobs: ./vale doc copyright_headers: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -113,7 +113,7 @@ jobs: python build_support/check_copyright_headers.py unused_names: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -130,7 +130,7 @@ jobs: python build_support/check_unused_names.py forbidden_types: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -142,7 +142,7 @@ jobs: ./build_support/check_forbidden_types.sh lychee_IGNORED: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -163,7 +163,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pydocstyle: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -184,7 +184,7 @@ jobs: pydocstyle pynest/ mypy: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -205,7 +205,7 @@ jobs: mypy pynest/ # pytest-linux: - # runs-on: "ubuntu-20.04" + # runs-on: "ubuntu-latest" # needs: [build_linux] # env: # NEST_VPATH: "build" @@ -214,7 +214,7 @@ jobs: # strategy: # fail-fast: true # matrix: - # os: ["ubuntu-20.04"] + # os: ["ubuntu-latest"] # cpp_compiler: ["gcc"] # # available use flags (all default to "OFF"): @@ -271,7 +271,7 @@ jobs: # pytest pynest/ pylint: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -292,7 +292,7 @@ jobs: pylint --jobs=$(nproc) pynest/ testsuite/pytests/*.py testsuite/regressiontests/*.py black: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -304,7 +304,7 @@ jobs: jupyter: true flake8: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -326,7 +326,7 @@ jobs: sphinx-rtd: # as close as possible to the Readthedocs setup (system install cmake, pip install -r doc/requirements.txt) - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" needs: [pydocstyle, rstcheck, vale] steps: - name: "Checkout repository content" @@ -365,7 +365,7 @@ jobs: sphinx-conda: # as close as possible to the suggested user docs build in the documentation - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" if: false needs: [pydocstyle, rstcheck, vale] steps: @@ -414,7 +414,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-20.04"] + os: ["ubuntu-latest"] cpp_compiler: ["gcc"] # available use flags (all default to "OFF"): From 7033849700ce65190fb526c5830cc54fa5ff0d1f Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Tue, 27 Jun 2023 14:51:28 +0200 Subject: [PATCH 2/8] CI runners Python version bumped to 3.10 --- .github/workflows/nestbuildmatrix.yml | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml index 17605430e3..7ac114352c 100644 --- a/.github/workflows/nestbuildmatrix.yml +++ b/.github/workflows/nestbuildmatrix.yml @@ -55,7 +55,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -76,7 +76,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -102,7 +102,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -123,7 +123,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Check for unused nest::names..." run: | @@ -173,7 +173,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -194,7 +194,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -233,7 +233,7 @@ jobs: # - name: "Set up Python 3.x" # uses: actions/setup-python@v4 # with: - # python-version: 3.9 + # python-version: 3.10 # - name: "Install dependencies" # run: | @@ -260,7 +260,7 @@ jobs: # - name: "Set up Python 3.x" # uses: actions/setup-python@v4 # with: - # python-version: 3.9 + # python-version: 3.10 # - name: "Install dependencies" # run: | @@ -281,7 +281,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -314,7 +314,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install dependencies" run: | @@ -339,7 +339,7 @@ jobs: with: # Using 3.8 because Read the docs does not work with higher versions. # See also: https://github.com/nest/nest-simulator/pull/2744 - python-version: 3.8 + python-version: 3.10 - name: "Install dependencies" run: | @@ -378,7 +378,7 @@ jobs: uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # v2.2.0 with: auto-update-conda: true - python-version: "3.7" + python-version: 3.10 - name: Install conda dependencies shell: bash -l {0} @@ -434,7 +434,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Restore apt cache" uses: actions/cache@v3 @@ -633,7 +633,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: "Install MacOS system dependencies" run: | From 6f270f1a18ebc5c5bcea969d74d37acec496fca5 Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Tue, 27 Jun 2023 15:06:06 +0200 Subject: [PATCH 3/8] Contain version specification --- .github/workflows/nestbuildmatrix.yml | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml index 7ac114352c..c06b5239df 100644 --- a/.github/workflows/nestbuildmatrix.yml +++ b/.github/workflows/nestbuildmatrix.yml @@ -18,7 +18,7 @@ jobs: with: fetch-depth: 0 - - name: "Instal dependencies" + - name: "Install dependencies" run: | python -m pip install --force-reinstall clang-format==${{ env.CLANG_REQUIRE_VERSION }} @@ -55,7 +55,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -76,7 +76,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -102,7 +102,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -123,7 +123,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Check for unused nest::names..." run: | @@ -173,7 +173,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -194,7 +194,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -233,7 +233,7 @@ jobs: # - name: "Set up Python 3.x" # uses: actions/setup-python@v4 # with: - # python-version: 3.10 + # python-version: "3.10" # - name: "Install dependencies" # run: | @@ -260,7 +260,7 @@ jobs: # - name: "Set up Python 3.x" # uses: actions/setup-python@v4 # with: - # python-version: 3.10 + # python-version: "3.10" # - name: "Install dependencies" # run: | @@ -281,7 +281,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -314,7 +314,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -339,7 +339,7 @@ jobs: with: # Using 3.8 because Read the docs does not work with higher versions. # See also: https://github.com/nest/nest-simulator/pull/2744 - python-version: 3.10 + python-version: "3.10" - name: "Install dependencies" run: | @@ -378,7 +378,7 @@ jobs: uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # v2.2.0 with: auto-update-conda: true - python-version: 3.10 + python-version: "3.10" - name: Install conda dependencies shell: bash -l {0} @@ -434,7 +434,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Restore apt cache" uses: actions/cache@v3 @@ -633,7 +633,7 @@ jobs: - name: "Set up Python 3.x" uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: "3.10" - name: "Install MacOS system dependencies" run: | From 7d7566a3e76253e75858ade361ac1c7f74ea7e15 Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Tue, 27 Jun 2023 15:44:37 +0200 Subject: [PATCH 4/8] Specify ubuntu version explicitly --- .github/workflows/nestbuildmatrix.yml | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml index c06b5239df..fa53566843 100644 --- a/.github/workflows/nestbuildmatrix.yml +++ b/.github/workflows/nestbuildmatrix.yml @@ -8,7 +8,7 @@ on: [push, pull_request] jobs: clang-format: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" env: CLANG_REQUIRE_VERSION: 13 CLANG_FORMAT_FILE: ".clang-format" @@ -28,7 +28,7 @@ jobs: diff -u <(cat ${files}) <(clang-format ${files}) cppcheck: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -45,7 +45,7 @@ jobs: cppcheck --enable=all --language=c++ --std=c++11 -i sli/ --suppressions-list=.cppcheck_suppressions ./ rstcheck: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -66,7 +66,7 @@ jobs: rstcheck -r doc/ vale: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -92,7 +92,7 @@ jobs: ./vale doc copyright_headers: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -113,7 +113,7 @@ jobs: python build_support/check_copyright_headers.py unused_names: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -130,7 +130,7 @@ jobs: python build_support/check_unused_names.py forbidden_types: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -142,7 +142,7 @@ jobs: ./build_support/check_forbidden_types.sh lychee_IGNORED: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -163,7 +163,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pydocstyle: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -184,7 +184,7 @@ jobs: pydocstyle pynest/ mypy: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -205,7 +205,7 @@ jobs: mypy pynest/ # pytest-linux: - # runs-on: "ubuntu-latest" + # runs-on: "ubuntu-22.04" # needs: [build_linux] # env: # NEST_VPATH: "build" @@ -214,7 +214,7 @@ jobs: # strategy: # fail-fast: true # matrix: - # os: ["ubuntu-latest"] + # os: ["ubuntu-22.04"] # cpp_compiler: ["gcc"] # # available use flags (all default to "OFF"): @@ -271,7 +271,7 @@ jobs: # pytest pynest/ pylint: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -292,7 +292,7 @@ jobs: pylint --jobs=$(nproc) pynest/ testsuite/pytests/*.py testsuite/regressiontests/*.py black: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -304,7 +304,7 @@ jobs: jupyter: true flake8: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" steps: - name: "Checkout repository content" uses: actions/checkout@v3 @@ -326,7 +326,7 @@ jobs: sphinx-rtd: # as close as possible to the Readthedocs setup (system install cmake, pip install -r doc/requirements.txt) - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" needs: [pydocstyle, rstcheck, vale] steps: - name: "Checkout repository content" @@ -365,7 +365,7 @@ jobs: sphinx-conda: # as close as possible to the suggested user docs build in the documentation - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" if: false needs: [pydocstyle, rstcheck, vale] steps: @@ -414,7 +414,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest"] + os: ["ubuntu-22.04"] cpp_compiler: ["gcc"] # available use flags (all default to "OFF"): From 31d8e62a5007f7f2b2e7ad1792a9eb06e842158f Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Wed, 28 Jun 2023 13:58:29 +0200 Subject: [PATCH 5/8] Update versions in documentation --- doc/htmldoc/_ext/versions.json | 47 +++++++++++++++------------------ doc/htmldoc/troubleshooting.rst | 2 +- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/doc/htmldoc/_ext/versions.json b/doc/htmldoc/_ext/versions.json index b233087279..45fc0a0f39 100644 --- a/doc/htmldoc/_ext/versions.json +++ b/doc/htmldoc/_ext/versions.json @@ -1,23 +1,18 @@ { - "python": - { - "min": 3.8 + "python": { + "min": 3.10 }, - "pip": - { + "pip": { "min": "20.3.3" }, - "cmake": - { + "cmake": { "min": 3.12, "max": 3.16 }, - "cython": - { + "cython": { "min": "0.28.3" }, - "openmpi": - { + "openmpi": { "min": "4.0.3" }, "boost": { @@ -26,32 +21,34 @@ "gsl": { "min": 1.11 }, - "libtool": - { + "libtool": { "min": "2.4.6" }, - "readline": - { + "readline": { "min": 8.0 }, - "numpy": - { + "hdf5": { + "min": 1.12 + }, + "numpy": { "min": "1.19.4" }, - "scipy": - { + "scipy": { "min": "1.5.4" }, - "matplotlib": - { + "matplotlib": { "min": 3.0 }, - "ipython": - { + "pandas": { + "min": 2.0 + }, + "h5py": { + "min": 3.9 + }, + "ipython": { "min": "5.8.0" }, - "libncurses": - { + "libncurses": { "min": 6.2 } } diff --git a/doc/htmldoc/troubleshooting.rst b/doc/htmldoc/troubleshooting.rst index 85c999e703..d1f9446d8f 100644 --- a/doc/htmldoc/troubleshooting.rst +++ b/doc/htmldoc/troubleshooting.rst @@ -118,7 +118,7 @@ This error message means something in your environment is not set correctly, dep 1. Check which Python version you are running - You must use **Python 3.8** or newer if you installed NEST with + You must use **Python 3.10** or newer if you installed NEST with a. the Ubuntu PPA, b. the conda-forge package, From b15f986a0f5878b384fae8418de3ec27edb63bc2 Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Thu, 29 Jun 2023 14:37:42 +0200 Subject: [PATCH 6/8] Sort imports --- doc/htmldoc/_ext/VersionSyncRole.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/htmldoc/_ext/VersionSyncRole.py b/doc/htmldoc/_ext/VersionSyncRole.py index c30fdb9c06..0f52dc51ce 100644 --- a/doc/htmldoc/_ext/VersionSyncRole.py +++ b/doc/htmldoc/_ext/VersionSyncRole.py @@ -21,6 +21,7 @@ import json from pathlib import Path + from docutils import nodes From 9a1a0bbca5519e59b024572d0743d0bdcbe8c08a Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Thu, 29 Jun 2023 14:46:24 +0200 Subject: [PATCH 7/8] Automatic version retrieval --- doc/htmldoc/troubleshooting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/htmldoc/troubleshooting.rst b/doc/htmldoc/troubleshooting.rst index d1f9446d8f..3d1adb2788 100644 --- a/doc/htmldoc/troubleshooting.rst +++ b/doc/htmldoc/troubleshooting.rst @@ -118,7 +118,7 @@ This error message means something in your environment is not set correctly, dep 1. Check which Python version you are running - You must use **Python 3.10** or newer if you installed NEST with + You must use Python :version:`python` or newer if you installed NEST with a. the Ubuntu PPA, b. the conda-forge package, From c8a5ff1244eb7fc6d3234678d3314007ac5edd98 Mon Sep 17 00:00:00 2001 From: Nicolai Haug Date: Thu, 29 Jun 2023 14:53:09 +0200 Subject: [PATCH 8/8] Change dtype to str --- doc/htmldoc/_ext/versions.json | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/doc/htmldoc/_ext/versions.json b/doc/htmldoc/_ext/versions.json index 45fc0a0f39..56e61e0288 100644 --- a/doc/htmldoc/_ext/versions.json +++ b/doc/htmldoc/_ext/versions.json @@ -1,13 +1,12 @@ { "python": { - "min": 3.10 + "min": "3.10" }, "pip": { "min": "20.3.3" }, "cmake": { - "min": 3.12, - "max": 3.16 + "min": "3.12" }, "cython": { "min": "0.28.3" @@ -16,19 +15,19 @@ "min": "4.0.3" }, "boost": { - "min": 1.69 + "min": "1.69" }, "gsl": { - "min": 1.11 + "min": "1.11" }, "libtool": { "min": "2.4.6" }, "readline": { - "min": 8.0 + "min": "8.0" }, "hdf5": { - "min": 1.12 + "min": "1.12" }, "numpy": { "min": "1.19.4" @@ -37,18 +36,18 @@ "min": "1.5.4" }, "matplotlib": { - "min": 3.0 + "min": "3.0" }, "pandas": { - "min": 2.0 + "min": "2.0" }, "h5py": { - "min": 3.9 + "min": "3.9" }, "ipython": { "min": "5.8.0" }, "libncurses": { - "min": 6.2 + "min": "6.2" } }