Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.14-alpine
FROM python:3.15-alpine

# Update pip and install dependencies and tools
RUN pip install --upgrade pip && \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.14
- name: Set up Python 3.15
uses: actions/setup-python@v7
with:
python-version: "3.14"
python-version: "3.15"

- name: Install dependencies
run: |
Expand All @@ -34,7 +34,7 @@ jobs:
run: pipenv run pytest -v --cov=./switcher_client --cov-report xml --cov-config=.coveragerc

- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@v8.3.0
uses: sonarsource/sonarqube-scan-action@v8.4.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
Expand All @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
os: [ ubuntu-latest, windows-latest ]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Package version to publish (e.g. 1.2.1). Leave empty to read from version.py'
description: 'Package version to publish (e.g. 1.2.2). Leave empty to read from version.py'
required: false

jobs:
Expand All @@ -21,7 +21,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v4
with:
auto-update-conda: true
python-version: "3.12"
python-version: "3.15"
channels: conda-forge
channel-priority: strict
conda-remove-defaults: true
Expand Down
54 changes: 43 additions & 11 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,60 @@ on:
description: Publish to Anaconda.org (test label)
type: boolean
default: false
rc_number:
description: RC number to append to the package version (for example, 1 for rc1)
type: string
required: true

jobs:
build:
name: Build distribution
if: inputs.deploy_testpypi
if: inputs.deploy_testpypi || inputs.deploy_anaconda
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.version.outputs.package_version }}

steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.14"
python-version: "3.15"

- name: Determine release candidate version
id: version
shell: bash
env:
RC_NUMBER: ${{ inputs.rc_number }}
run: |
BASE_VERSION=$(python -c 'from switcher_client.version import __version__; print(__version__)')
if [[ ! "$RC_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
echo "RC number must be a positive integer." >&2
exit 1
fi

PACKAGE_VERSION="${BASE_VERSION}rc${RC_NUMBER}"
echo "package_version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
echo "Using release candidate version: $PACKAGE_VERSION"

- name: Install pypa/build
if: inputs.deploy_testpypi
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
if: inputs.deploy_testpypi
env:
PACKAGE_VERSION: ${{ steps.version.outputs.package_version }}
run: |
trap 'mv "$RUNNER_TEMP/version.py" switcher_client/version.py' EXIT
cp switcher_client/version.py "$RUNNER_TEMP/version.py"
printf '__version__ = "%s"\n' "$PACKAGE_VERSION" > switcher_client/version.py
python3 -m build
- name: Store the distribution packages
if: inputs.deploy_testpypi
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
Expand All @@ -42,11 +74,9 @@ jobs:
needs: build
if: inputs.deploy_testpypi
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/switcher-client

permissions:
id-token: write

Expand All @@ -66,9 +96,10 @@ jobs:
repository-url: https://test.pypi.org/legacy/

publish-to-anaconda:
if: inputs.deploy_anaconda
needs:
- build
if: always() && inputs.deploy_anaconda && needs.build.result == 'success'
runs-on: ubuntu-latest

environment:
name: anaconda
url: https://anaconda.org/switcherapi/switcher-client
Expand All @@ -80,7 +111,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v4
with:
auto-update-conda: true
python-version: "3.12"
python-version: "3.15"
channels: conda-forge
channel-priority: strict
conda-remove-defaults: true
Expand All @@ -91,10 +122,11 @@ jobs:

- name: Get package version
shell: bash -el {0}
env:
PACKAGE_VERSION: ${{ needs.build.outputs.package_version }}
run: |
PKG_VER=$(grep '__version__' switcher_client/version.py | cut -d'"' -f2)
echo "PKG_VERSION=$PKG_VER" >> $GITHUB_ENV
printf "pkg_version:\n - $PKG_VER\n" > conda.recipe/conda_build_config.yaml
echo "PKG_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
printf "pkg_version:\n - $PACKAGE_VERSION\n" > conda.recipe/conda_build_config.yaml

- name: Build conda package
shell: bash -el {0}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
os: [ ubuntu-latest, windows-latest ]

steps:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.14"
python-version: "3.15"
- name: Install pypa/build
run: >-
python3 -m
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v4
with:
auto-update-conda: true
python-version: "3.12"
python-version: "3.15"
channels: conda-forge
channel-priority: strict
conda-remove-defaults: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
ref: ${{ steps.pr.outputs.head_sha }}
fetch-depth: 0

- name: Set up Python 3.14
- name: Set up Python 3.15
uses: actions/setup-python@v7
with:
python-version: "3.14"
python-version: "3.15"

- name: Install dependencies
run: |
Expand All @@ -47,7 +47,7 @@ jobs:
run: pipenv run pytest -v --cov=./switcher_client --cov-report xml

- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@v8.3.0
uses: sonarsource/sonarqube-scan-action@v8.4.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
python:
description: 'Python version'
required: true
default: '3.14'
default: '3.15'
os:
description: 'Operating System (ubuntu-20.04, ubuntu-latest, windows-latest)'
required: true
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typing-extensions = {version = "==4.16.0", markers = "python_version <= '3.12'"}
exceptiongroup = "*"
tomli = "*"
pylint = "==4.1.3"
pytest = "==9.1.1"
pytest = "==9.2.0"
pytest-cov = "==7.1.0"
pytest-httpx = "==0.36.2"
python-dotenv = "==1.2.4"
Expand Down
Loading
Loading