From 58858b7fdd28bc955e9c5bf956363a01d2064976 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 13 Nov 2023 08:03:16 -0500 Subject: [PATCH] refactor: support python3.12, various updates (#145) * fix awvwgk/setup-fortran -> fortran-lang/setup-fortran * remove pytest-virtualenv testing dependency * add python 3.12 classifier in pyproject.toml * update CI workflows to use python 3.12 * add IDE/venv folders to .gitignore --- .github/workflows/main.yml | 6 ++---- .github/workflows/pymake-gcc.yml | 14 ++++++-------- .github/workflows/pymake-linting-install.yml | 6 ++---- .github/workflows/pymake-requests.yml | 4 +--- .github/workflows/pymake-rtd.yml | 2 -- .gitignore | 5 ++++- pyproject.toml | 2 +- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b491945e..2ef411a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,6 @@ on: schedule: - cron: '0 7 * * *' # run at 7 AM UTC every day push: - branches: - - master pull_request: branches: - master @@ -27,7 +25,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Intel Fortran Classic - uses: awvwgk/setup-fortran@v1 + uses: fortran-lang/setup-fortran@v1 with: compiler: intel-classic version: "2021.7" @@ -39,7 +37,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Install python packages run: | diff --git a/.github/workflows/pymake-gcc.yml b/.github/workflows/pymake-gcc.yml index e905eed0..769d8a64 100644 --- a/.github/workflows/pymake-gcc.yml +++ b/.github/workflows/pymake-gcc.yml @@ -4,8 +4,6 @@ on: schedule: - cron: '0 7 * * *' # run at 7 AM UTC every day push: - branches: - - master pull_request: branches: - master @@ -19,17 +17,17 @@ jobs: matrix: include: # test latest gcc and python - - {os: ubuntu-latest, gcc: 13, python: "3.11"} - - {os: windows-latest, gcc: 12, python: "3.11"} - - {os: macos-latest, gcc: 13, python: "3.11"} + - {os: ubuntu-latest, gcc: 13, python: "3.12"} + - {os: windows-latest, gcc: 13, python: "3.12"} + - {os: macos-latest, gcc: 13, python: "3.12"} # test latest gcc and previous python - {os: ubuntu-latest, gcc: 13, python: "3.11"} - {os: ubuntu-latest, gcc: 13, python: "3.10"} - {os: ubuntu-latest, gcc: 13, python: 3.9} - {os: ubuntu-latest, gcc: 13, python: 3.8} # test latest python and previous gcc - - {os: ubuntu-latest, gcc: 12, python: "3.11"} - - {os: ubuntu-latest, gcc: 11, python: "3.11"} + - {os: ubuntu-latest, gcc: 12, python: "3.12"} + - {os: ubuntu-latest, gcc: 11, python: "3.12"} defaults: run: shell: bash @@ -53,7 +51,7 @@ jobs: pip install ".[test]" - name: Setup GNU Fortran - uses: awvwgk/setup-fortran@v1 + uses: fortran-lang/setup-fortran@v1 with: compiler: gcc version: ${{ matrix.gcc }} diff --git a/.github/workflows/pymake-linting-install.yml b/.github/workflows/pymake-linting-install.yml index 65a990c1..1299d002 100644 --- a/.github/workflows/pymake-linting-install.yml +++ b/.github/workflows/pymake-linting-install.yml @@ -4,8 +4,6 @@ on: schedule: - cron: '0 3 * * 3' # run at 3 AM UTC every Wednesday push: - branches: - - master pull_request: branches: - master @@ -24,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Setup Graphviz uses: ts-graphviz/setup-graphviz@v1 @@ -76,7 +74,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Upgrade pip and install build and twine run: | diff --git a/.github/workflows/pymake-requests.yml b/.github/workflows/pymake-requests.yml index aae381b9..c06c33f8 100644 --- a/.github/workflows/pymake-requests.yml +++ b/.github/workflows/pymake-requests.yml @@ -4,8 +4,6 @@ on: schedule: - cron: '0 7 * * *' # run at 7 AM UTC every day push: - branches: - - master pull_request: branches: - master @@ -25,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Install python packages run: | diff --git a/.github/workflows/pymake-rtd.yml b/.github/workflows/pymake-rtd.yml index a5ef599e..49e6f8d0 100644 --- a/.github/workflows/pymake-rtd.yml +++ b/.github/workflows/pymake-rtd.yml @@ -4,8 +4,6 @@ on: schedule: - cron: '0 3 * * 3' # run at 3 AM UTC every Wednesday push: - branches: - - master pull_request: branches: - master diff --git a/.gitignore b/.gitignore index b73444ff..9fc119c5 100644 --- a/.gitignore +++ b/.gitignore @@ -57,8 +57,9 @@ docs/_build/ # PyBuilder target/ -# PyCharm +# IDEs .idea/ +.vscode/ # files in the autotest directory autotest/temp*/ @@ -73,3 +74,5 @@ Dependencies # files in the doc directory docs/source/ +# local python environments +venv/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 833738b5..cc6077cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Hydrology", ] requires-python = ">=3.8" @@ -57,7 +58,6 @@ test = [ "pytest-cov", "pytest-dependency", "pytest-dotenv", - "pytest-virtualenv", "pytest-xdist", "appdirs", "matplotlib",