diff --git a/.clabot b/.clabot new file mode 100644 index 0000000..9278130 --- /dev/null +++ b/.clabot @@ -0,0 +1,3 @@ +{ + "contributors": "https://api.infrasonar.com/contributors" +} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af8d079..4f4f754 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.12 - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - name: Set up Python 3.14 + uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -26,4 +26,4 @@ jobs: find . -name \*.py -exec pycodestyle {} + - name: Type checking with PyRight run: | - pyright \ No newline at end of file + pyright diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9a0a5e0..3c78a3c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v4 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -29,7 +29,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v6 with: images: ${{ env.REGISTRY }}/infrasonar/http-probe @@ -38,7 +38,7 @@ jobs: run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v7 env: PAT: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa58c0c..38f5a0b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,10 +19,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v4 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -30,7 +30,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v6 with: images: ${{ env.REGISTRY }}/infrasonar/http-probe @@ -39,7 +39,7 @@ jobs: run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v7 env: PAT: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/Dockerfile b/Dockerfile index c5db2ce..75ce03e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/infrasonar/python:3.12.9 +FROM ghcr.io/infrasonar/python:3.14.3 ADD . /code WORKDIR /code RUN pip install --no-cache-dir -r requirements.txt diff --git a/lib/connector.py b/lib/connector.py index c259368..3f8a117 100644 --- a/lib/connector.py +++ b/lib/connector.py @@ -1,4 +1,3 @@ -from typing import Optional import ssl import aiohttp import asyncio @@ -23,7 +22,7 @@ def get_connector( verify_ssl: bool, - loop: Optional[asyncio.AbstractEventLoop] = None + loop: asyncio.AbstractEventLoop | None = None ) -> aiohttp.TCPConnector: if loop is None: loop = asyncio.get_running_loop() diff --git a/lib/utils.py b/lib/utils.py index 3f48203..111345c 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -1,7 +1,7 @@ from urllib.parse import urlparse -def check_config(uri): +def check_config(uri: str): o = urlparse(uri) if o.scheme not in ('http', 'https'): raise Exception(f'uri should start with "http" or "https", got: {uri}') diff --git a/requirements.txt b/requirements.txt index a14426f..9456007 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -aiohttp== 3.13.2 -libprobe==2.0.2 +aiohttp==3.13.5 +libprobe==2.0.6