diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d276769..d4eb7f1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,27 +7,33 @@ on: workflow_dispatch: env: - FORCE_COLOR: "1" # Make tools pretty. - PYTHON_LATEST: "3.11" + FORCE_COLOR: "1" + PYTHON_LATEST: "3.13" jobs: deploy-pypi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 with: python-version: ${{ env.PYTHON_LATEST }} + - uses: snok/install-poetry@v1 with: - version: 1.3.0 + version: 2.1.1 + plugins: "poetry-dynamic-versioning[plugin]" + - name: Install dependencies run: | - poetry self add "poetry-dynamic-versioning[plugin]" + pip install setuptools - run: poetry build - name: Publish package if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') run: | - poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} + poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87ee60e..573829a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,8 @@ permissions: contents: read env: - FORCE_COLOR: "1" # Make tools pretty. - PYTHON_LATEST: "3.11" - POETRY_VIRTUALENVS_CREATE: false - + FORCE_COLOR: "1" + PYTHON_LATEST: "3.13" jobs: linting: @@ -29,21 +27,20 @@ jobs: python-version: ${{ env.PYTHON_LATEST }} - uses: snok/install-poetry@v1 with: - version: 1.3.0 + version: 2.1.1 virtualenvs-create: true - name: Install dependencies run: | - poetry self add "poetry-dynamic-versioning[plugin]" poetry install --only=dev - name: black - run: python -m black --check --diff . + run: poetry run python -m black --check --diff . - name: flake8 - run: python -m flake8 . + run: poetry run python -m flake8 . - name: isort - run: python -m isort --check-only -v --profile black . + run: poetry run python -m isort --check-only -v --profile black . typing: name: Typing @@ -56,15 +53,15 @@ jobs: python-version: ${{ env.PYTHON_LATEST }} - uses: snok/install-poetry@v1 with: - version: 1.3.0 + version: 2.1.1 virtualenvs-create: true - name: Install dependencies run: | - poetry self add "poetry-dynamic-versioning[plugin]" + pip install setuptools poetry install - name: mypy - run: python -m mypy . + run: poetry run python -m mypy . tests: @@ -73,7 +70,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11"] + python-version: ["3.13"] steps: - uses: actions/checkout@v3 @@ -82,11 +79,11 @@ jobs: python-version: ${{ matrix.python-version }} - uses: snok/install-poetry@v1 with: - version: 1.3.0 + version: 2.1.1 virtualenvs-create: true - name: Install dependencies run: | - poetry self add "poetry-dynamic-versioning[plugin]" + pip install setuptools poetry install - name: Setup Git @@ -140,6 +137,9 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 with: python-version: ${{ env.PYTHON_LATEST }} @@ -162,8 +162,12 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 with: python-version: ${{ env.PYTHON_LATEST }} + - run: python -m pip install -e . - run: python -c 'import foxops_client; print(foxops_client.__version__)' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1f645a7..0263082 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ .dmypy.json .idea/ dist/ +*.pyc \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index ad51f6c..d6bfc82 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "anyio" @@ -361,61 +361,62 @@ gitdb = ">=4.0.1,<5" [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] name = "httpcore" -version = "0.17.3" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-0.17.3-py3-none-any.whl", hash = "sha256:c2789b767ddddfa2a5782e3199b2b7f6894540b17b16ec26b2c4d8e103510b87"}, - {file = "httpcore-0.17.3.tar.gz", hash = "sha256:a6f30213335e34c1ade7be6ec7c47f19f50c56db36abef1a9dfa3815b1cb3888"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] -anyio = ">=3.0,<5.0" certifi = "*" -h11 = ">=0.13,<0.15" -sniffio = "==1.*" +h11 = ">=0.16" [package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<1.0)"] [[package]] name = "httpx" -version = "0.24.1" +version = "0.28.1" description = "The next generation HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd"}, - {file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] +anyio = "*" certifi = "*" -httpcore = ">=0.15.0,<0.18.0" +httpcore = "==1.*" idna = "*" -sniffio = "*" [package.extras] brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" @@ -856,5 +857,5 @@ test = ["websockets"] [metadata] lock-version = "2.1" -python-versions = ">=3.11,<4.0" -content-hash = "6ed832d7cb7be44355e52aa316ad3b010bf0e5a1c9326ebd2181cbe027264562" +python-versions = ">=3.13,<3.14" +content-hash = "13c4d6f1937da27589f6b6134b1d4b6b7c05a7e39d8bb53f92137a65c243875a" diff --git a/pyproject.toml b/pyproject.toml index dae7a3b..4884b6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,5 @@ [tool.poetry] name = "foxops-client" -# managed by poetry-dynamic-versioning, do not change. version = "0.0.0" description = "Foxops API Client" authors = [ @@ -9,26 +8,21 @@ authors = [ readme = "README.md" [tool.poetry.dependencies] -python = ">=3.11,<4.0" -httpx = "^0.24.1" -tenacity = "^9.0.0" +python = ">=3.13,<3.14" +httpx = "^0.28.1" +tenacity = "^9.1.2" structlog = "^23.1.0" [tool.poetry.group.dev.dependencies] -# Linting black = "^23.7.0" flake8 = "^6.1.0" flake8-bugbear = "^23.7.10" isort = "^5.9.3" - -# Testing pytest = "^7.1.3" pytest-asyncio = "^0.21.1" pytest-cov = "^4.0.0" pytest-docker-tools = "^3.1.3" pytest-mock = "^3.10.0" - -# Typing mypy = "^1.5.1" GitPython = "^3.1.29" @@ -51,5 +45,5 @@ module = "pytest_docker_tools" ignore_missing_imports = true [build-system] -requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=2.1.1", "wheel", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] +build-backend = "poetry_dynamic_versioning.backend"