Skip to content

Commit 85ebc7e

Browse files
committed
DC updates
1 parent 2738352 commit 85ebc7e

9 files changed

+24
-46
lines changed

Diff for: .devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG VARIANT=bullseye
2-
FROM --platform=amd64 mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
2+
FROM --platform=amd64 mcr.microsoft.com/devcontainers/python:0-${VARIANT}
33
RUN curl -fsSL https://aka.ms/install-azd.sh | bash \
44
&& curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
55
&& mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg \

Diff for: .devcontainer/devcontainer.json

+12-21
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,26 @@
33
"build": {
44
"dockerfile": "Dockerfile",
55
"args": {
6-
"VARIANT": "bullseye"
6+
"VARIANT": "3.10-bullseye"
77
}
88
},
99
"features": {
10-
"ghcr.io/devcontainers/features/azure-cli:1": {
11-
"version": "2.38"
12-
},
13-
"ghcr.io/devcontainers/features/docker-from-docker:1": {
14-
"version": "20.10"
15-
},
16-
"ghcr.io/devcontainers/features/github-cli:1": {
17-
"version": "2"
18-
},
1910
"ghcr.io/devcontainers/features/node:1": {
2011
"version": "16",
2112
"nodeGypDependencies": false
22-
},
23-
"ghcr.io/devcontainers/features/python:1": {
24-
"version": "os-provided"
2513
}
2614
},
27-
"extensions": [
28-
"ms-azuretools.azure-dev",
29-
"ms-azuretools.vscode-bicep",
30-
"ms-azuretools.vscode-docker",
31-
"ms-vscode.vscode-node-azure-pack",
32-
"ms-python.python",
33-
"ms-azuretools.vscode-azurefunctions"
34-
],
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"ms-azuretools.azure-dev",
19+
"ms-azuretools.vscode-bicep",
20+
"ms-vscode.vscode-node-azure-pack",
21+
"ms-python.python",
22+
"ms-azuretools.vscode-azurefunctions"
23+
]
24+
}
25+
},
3526
"forwardPorts": [
3627
8000,
3728
7071

Diff for: .github/workflows/azure-dev-validate.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Azure CLI script
2121
uses: azure/CLI@v1
2222
with:
23-
inlineScript: az bicep build -f infra/main.bicep
23+
inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep

Diff for: .github/workflows/python-check.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: ["ubuntu-20.04"]
17-
python_version: ["3.9"]
17+
python_version: ["3.9", "3.10"]
1818
steps:
1919
- uses: actions/checkout@v3
2020
- name: Setup python
@@ -29,7 +29,7 @@ jobs:
2929
- name: Lint with ruff
3030
run: ruff api/
3131
- name: Check pyupgrade
32-
run: pyupgrade --py39-plus api/*.py
32+
run: pyupgrade --py310-plus api/*.py
3333
- name: Check formatting with black
3434
run: black api/ --check --verbose
3535
- name: Check Python import sorting

Diff for: .pre-commit-config.yaml

+2-12
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,11 @@ repos:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88
- repo: https://github.com/charliermarsh/ruff-pre-commit
9-
rev: v0.0.121
9+
rev: v0.0.237
1010
hooks:
1111
- id: ruff
12-
- repo: https://github.com/asottile/pyupgrade
13-
rev: v3.1.0
14-
hooks:
15-
- id: pyupgrade
16-
args: ['--py39-plus']
1712
- repo: https://github.com/psf/black
18-
rev: 22.3.0
13+
rev: 22.12.0
1914
hooks:
2015
- id: black
2116
args: ['--config=./pyproject.toml']
22-
- repo: https://github.com/pycqa/isort
23-
rev: 5.10.1
24-
hooks:
25-
- id: isort
26-
name: isort (python)

Diff for: azure.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
22

33
name: fastapi-azure-function-apim
4-
4+
metadata:
5+
56
services:
67
api:
78
project: .

Diff for: infra/main.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module functionApp 'core/host/functions.bicep' = {
8686
applicationInsightsName: appInsightsName
8787
appServicePlanId: appServicePlan.outputs.id
8888
runtimeName: 'python'
89-
runtimeVersion: '3.9'
89+
runtimeVersion: '3.10'
9090
storageAccountName: storageAccount.outputs.name
9191
}
9292
}

Diff for: pyproject.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[tool.black]
22
line-length = 120
3-
target-version = ['py39']
3+
target-version = ['py30']
44

55
[tool.ruff]
66
line-length = 120
7-
ignore = ['D203']
8-
9-
[tool.isort]
10-
profile = "black"
7+
target-version = "py310"
8+
select = ["E", "F", "I", "UP"]
119

1210
[tool.pytest.ini_options]
1311
addopts = "-ra --cov --cov-fail-under=100"

Diff for: requirements-dev.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
-r requirements.txt
22
fastapi[all]
33
black
4-
isort
54
ruff
6-
pyupgrade
75
pytest
86
coverage
97
pytest-cov

0 commit comments

Comments
 (0)