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 .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
prefix: ⬆
labels: [dependencies, internal]
# Python
- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install build dependencies
run: pip install build
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build distribution
run: python -m build
run: uv build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.13.0
run: uv publish
8 changes: 3 additions & 5 deletions .github/workflows/test-redistribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.10"
python-version-file: "pyproject.toml"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
Expand All @@ -36,9 +36,7 @@ jobs:
- name: Install test dependencies
run: |
cd dist/fastapi_cloud_cli*/
pip install -r requirements-tests.txt
env:
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
pip install --group dev .
- name: Run source distribution tests
run: |
cd dist/fastapi_cloud_cli*/
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,30 @@ jobs:
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-{{ matrix.pydantic-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
run: uv sync --locked --all-extras --dev
- name: Install Pydantic v1
if: matrix.pydantic-version == 'v1'
run: pip install "pydantic<2.0.0"
run: uv pip install "pydantic<2.0.0"
- name: Lint
run: bash scripts/lint.sh
run: uv run --no-sync scripts/lint.sh
- run: mkdir coverage
- name: Test
run: bash scripts/test.sh
run: uv run --no-sync scripts/test.sh
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
Expand All @@ -94,9 +90,9 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: '3.8'
python-version-file: "pyproject.toml"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8
18 changes: 12 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"typer >= 0.12.3",
Expand All @@ -44,6 +43,17 @@ dependencies = [
[project.optional-dependencies]
standard = ["uvicorn[standard] >= 0.15.0"]

[dependency-groups]
dev = [
"pre-commit>=2.17.0,<5.0.0",
"pytest>=4.4.0,<9.0.0",
"coverage[toml]>=6.2,<8.0",
"mypy==1.14.1",
"ruff==0.13.0",
"respx==0.22.0",
"time-machine==2.15.0",
]

[project.urls]
Homepage = "https://github.com/fastapilabs/fastapi-cloud-cli"
Documentation = "https://fastapi.tiangolo.com/fastapi-cloud-cli/"
Expand All @@ -60,7 +70,7 @@ version = { source = "file", path = "src/fastapi_cloud_cli/__init__.py" }
distribution = true

[tool.pdm.build]
source-includes = ["tests/", "requirements*.txt", "scripts/"]
source-includes = ["tests/", "scripts/"]

[tool.pytest.ini_options]
addopts = ["--strict-config", "--strict-markers"]
Expand Down Expand Up @@ -109,10 +119,6 @@ ignore = [
"W191", # indentation contains tabs
]

# [tool.ruff.lint.per-file-ignores]
# "__init__.py" = ["F401"]


[tool.ruff.lint.isort]
known-third-party = ["typer", "fastapi"]

Expand Down
8 changes: 0 additions & 8 deletions requirements-tests.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

Loading