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
16 changes: 11 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
34 changes: 19 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -73,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.13"]

steps:
- uses: actions/checkout@v3
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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__)'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.dmypy.json
.idea/
dist/
*.pyc
41 changes: 21 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 5 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand All @@ -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"

Expand All @@ -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"