From f16443e43c3e89dcd78f16e657de17ed0fd39d13 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Sat, 16 Nov 2024 15:04:08 +0000 Subject: [PATCH] Update to python 3.13 Signed-off-by: Prabhu Subramanian --- .github/workflows/containers.yml | 12 ++++++------ .github/workflows/master.yml | 16 ++++++++-------- .github/workflows/pr.yml | 4 ++-- .github/workflows/release.yml | 8 ++++---- .github/workflows/win_compat.yml | 2 +- chenpy/cli.py | 10 +++++----- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 98af7e17..efee8cb1 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -43,7 +43,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Use Node.js uses: actions/setup-node@v4 with: @@ -68,13 +68,13 @@ jobs: sbt stage createDistribution env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" - name: Export python requirements run: | - python3.12 -m pip install --upgrade pip - python3.12 -m pip install poetry - python3.12 -m poetry export -f requirements.txt --with=science --without-hashes --output target/chen-science-requirements.txt - python3.12 -m poetry export -f requirements.txt --with=database --without-hashes --output target/chen-database-requirements.txt + python3.13 -m pip install --upgrade pip + python3.13 -m pip install poetry + python3.13 -m poetry export -f requirements.txt --with=science --without-hashes --output target/chen-science-requirements.txt + python3.13 -m poetry export -f requirements.txt --with=database --without-hashes --output target/chen-database-requirements.txt - name: Upload chen to ghcr run: | cd target diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 130c8881..276de081 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Use Node.js uses: actions/setup-node@v4 with: @@ -54,11 +54,11 @@ jobs: run: | bash ./platform/frontends/php2atom/install.sh npm install -g @appthreat/atom - python3.12 -m pip install --upgrade pip - python3.12 -m pip install poetry - python3.12 -m poetry config virtualenvs.create false - python3.12 -m poetry install --no-cache - python3.12 -m poetry run flake8 chenpy --count --select=E9,F63,F7,F82 --show-source --statistics + python3.13 -m pip install --upgrade pip + python3.13 -m pip install poetry + python3.13 -m poetry config virtualenvs.create false + python3.13 -m poetry install --no-cache + python3.13 -m poetry run flake8 chenpy --count --select=E9,F63,F7,F82 --show-source --statistics - uses: actions/cache@v4 with: path: | @@ -69,7 +69,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8 -Djna.library.path=${{ env.Python3_ROOT_DIR }}" - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" if: runner.os != 'Windows' - name: Compile and run tests run: sbt scalafmtCheck +test @@ -84,4 +84,4 @@ jobs: cdxgen -t sbt -o bom.json . -p --no-recurse env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index be11863a..57072168 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Use Node.js uses: actions/setup-node@v4 with: @@ -73,7 +73,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8 -Djna.library.path=${{ env.Python3_ROOT_DIR }}" - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" if: runner.os != 'Windows' - name: Compile and run tests run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c543101f..f48c9683 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Use Node.js uses: actions/setup-node@v4 with: @@ -57,14 +57,14 @@ jobs: sbt createDistribution env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" - name: sbt publish run: | sbt publish if: startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" - name: Install and test run: | npm install -g @appthreat/atom @@ -102,7 +102,7 @@ jobs: cdxgen -t sbt -o bom.json . --no-recurse env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SCALAPY_PYTHON_LIBRARY: "python3.12" + SCALAPY_PYTHON_LIBRARY: "python3.13" - name: Create Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/win_compat.yml b/.github/workflows/win_compat.yml index 897ea4e7..8c2e98e6 100644 --- a/.github/workflows/win_compat.yml +++ b/.github/workflows/win_compat.yml @@ -8,7 +8,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.10','3.11','3.12'] + python-version: ['3.10','3.11','3.12','3.13'] with-science: ["--download", "--download --with-science"] fail-fast: false diff --git a/chenpy/cli.py b/chenpy/cli.py index 4e8ec1fe..b1db9006 100644 --- a/chenpy/cli.py +++ b/chenpy/cli.py @@ -179,11 +179,11 @@ def install_py_modules(pack="database"): ) with Progress(transient=True) as progress: conda_install_script = """conda create --name chenpy-local python=3.12 -y -conda install -n chenpy-local conda-libmamba-solver -y -conda install -n chenpy-local -c conda-forge networkx --solver=libmamba -y -conda install -n chenpy-local -c pytorch pytorch torchtext cpuonly --solver=libmamba -y -conda install -n chenpy-local -c conda-forge numpy packageurl-python nbconvert jupyter_core jupyter_client notebook --solver=libmamba -y -conda install -n chenpy-local -c conda-forge oras-py==0.1.26 httpx websockets orjson rich appdirs psutil gitpython --solver=libmamba -y""" +conda install -n chenpy-local -y +conda install -n chenpy-local -c conda-forge networkx -y +conda install -n chenpy-local -c pytorch pytorch torchtext cpuonly -y +conda install -n chenpy-local -c conda-forge numpy packageurl-python nbconvert jupyter_core jupyter_client notebook -y +conda install -n chenpy-local -c conda-forge oras-py==0.1.26 httpx websockets orjson rich appdirs psutil gitpython -y""" for line in conda_install_script.split("\n"): if line.strip(): task = progress.add_task(line, start=False, total=100)