Skip to content

Commit 86b2b1c

Browse files
chore(deps): update from template
1 parent 9482680 commit 86b2b1c

8 files changed

Lines changed: 78 additions & 72 deletions

File tree

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_commit: v0.8.7
1+
_commit: v0.8.11
22
_src_path: gh:helmut-hoffer-von-ankershoffen/oe-python-template
33
attestations_enabled: true
44
author_email: helmuthva@gmail.com

.github/workflows/vercel-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
cd dist_vercel
2929
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
3030
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
31-
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
31+
vercel deploy --prebuilt --archive=tgz --token=${{ secrets.VERCEL_TOKEN }}

.github/workflows/vercel-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
cd dist_vercel
2929
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
3030
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
31-
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
31+
vercel deploy --prebuilt --archive=tgz --prod --token=${{ secrets.VERCEL_TOKEN }}

ATTRIBUTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9984,7 +9984,7 @@ License: LGPL-2.1-or-later
99849984

99859985
```
99869986

9987-
## oe-python-template-example (0.2.11) - MIT License
9987+
## oe-python-template-example (0.2.12) - MIT License
99889988

99899989
🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
99909990

VERCEL.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,58 @@ You can host the API as a serverless function on Vercel
1212
pnpm i -g vercel
1313
```
1414

15-
## Generate, link and deploy Vercel Distribution
15+
Note:
16+
1. If `pnpm` is not available because you did not run `./install.sh`,
17+
you can install it manually with `brew install pnpm`.
18+
19+
## Generate Vercel Distribution
1620

1721
```shell
1822
make dist_vercel
19-
vercel login
23+
```
24+
25+
Notes:
26+
1. Builds and outputs a wheel of the project into vercel_dist/wheels/
27+
2. Generates a vercel_dist/requirements.txt from pyproject.toml including a reference to the wheel.
28+
29+
30+
## Link with Vercel project
31+
32+
```shell
2033
vercel link --cwd dist_vercel --project oe-python-template-example --yes
21-
vercel deploy --cwd dist_vercel
34+
```
35+
36+
Notes:
37+
1. Creates the Vercel project if not yet existing.
38+
2. Links the dist_vercel/ directory with that project
39+
40+
## Run function locally
41+
42+
```shell
43+
vercel dev --cwd dist_vercel
44+
```
45+
46+
Notes:
47+
1. Runs a local server on port 3000
48+
49+
## Deploy distribution to production on Vercel
50+
51+
```shell
52+
vercel deploy --cwd dist_vercel --archive=tgz --prod
2253
```
2354

2455
Visit the [production deployment](https://oe-python-template-example.vercel.app/)
2556

26-
## Wire the CI/CD
57+
## Wire Vercel with GitHub for Continuous Deployment
2758

2859
1. Show organisation and project id by executing `cat dist_vercel/.vercel/project.json`
29-
2. [Create secret](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new) called `VERCEL_PROJECT_ID` with the value of `projectId` from step 1
30-
3. [Create secret](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new) called `VERCEL_ORG_ID` with the value of `orgId` from step 1
31-
4. Goto [Vercel Account Settings](https://vercel.com/account/settings/tokens) and create a new token with project scope, copy the token to clipboard.
32-
5. [Create secret](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new) called `VERCEL_TOKEN` with the value of `projectId` from the previous command
60+
2. [Create secret](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new) called `VERCEL_PROJECT_ID` with the
61+
value of `projectId` from step 1
62+
3. [Create secret](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new) called `VERCEL_ORG_ID` with the value
63+
of `orgId` from step 1
64+
4. Goto [Vercel Account Settings](https://vercel.com/account/settings/tokens) and create a new token with project scope,
65+
copy the token to clipboard.
66+
5. [Create secret](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new) called `VERCEL_TOKEN` with the value
67+
of `projectId` from the previous command
3368

3469
That's it. The rest is automatic, deploy happening on build of main.

docs/source/_static/openapi_v1.yaml

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ openapi: 3.1.0
9090
paths:
9191
/echo/{text}:
9292
get:
93-
description: "Echo back the provided text.\n\nArgs:\n text (str): The
94-
text\
95-
\ to echo.\n\nReturns:\n Echo: The echo.\n\nRaises:\n 422
96-
Unprocessable\
93+
description: "Echo back the provided text.\n\nArgs:\n text (str): The text\
94+
\ to echo.\n\nReturns:\n Echo: The echo.\n\nRaises:\n 422 Unprocessable\
9795
\ Entity: If text is not provided or empty."
9896
operationId: echo_echo__text__get
9997
parameters:
@@ -121,18 +119,12 @@ Unprocessable\
121119
- Basics
122120
/health:
123121
get:
124-
description: "Check the health of the service.\n\nThis endpoint returns
125-
the\
126-
\ health status of the service.\nThe health status can be either UP or
127-
DOWN.\n\
128-
If the service is healthy, the status will be UP.\nIf the service is
129-
unhealthy,\
130-
\ the status will be DOWN and a reason will be provided.\nThe response
131-
will\
132-
\ have a 200 OK status code if the service is healthy,\nand a 500
133-
Internal\
134-
\ Server Error status code if the service is unhealthy.\n\nReturns:\n
135-
Health:\
122+
description: "Check the health of the service.\n\nThis endpoint returns the\
123+
\ health status of the service.\nThe health status can be either UP or DOWN.\n\
124+
If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
125+
\ the status will be DOWN and a reason will be provided.\nThe response will\
126+
\ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
127+
\ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
136128
\ The health status of the service."
137129
operationId: health_health_get
138130
responses:
@@ -147,18 +139,12 @@ Health:\
147139
- Observability
148140
/healthz:
149141
get:
150-
description: "Check the health of the service.\n\nThis endpoint returns
151-
the\
152-
\ health status of the service.\nThe health status can be either UP or
153-
DOWN.\n\
154-
If the service is healthy, the status will be UP.\nIf the service is
155-
unhealthy,\
156-
\ the status will be DOWN and a reason will be provided.\nThe response
157-
will\
158-
\ have a 200 OK status code if the service is healthy,\nand a 500
159-
Internal\
160-
\ Server Error status code if the service is unhealthy.\n\nReturns:\n
161-
Health:\
142+
description: "Check the health of the service.\n\nThis endpoint returns the\
143+
\ health status of the service.\nThe health status can be either UP or DOWN.\n\
144+
If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
145+
\ the status will be DOWN and a reason will be provided.\nThe response will\
146+
\ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
147+
\ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
162148
\ The health status of the service."
163149
operationId: health_healthz_get
164150
responses:
@@ -173,8 +159,7 @@ Health:\
173159
- Observability
174160
/hello-world:
175161
get:
176-
description: "Return a hello world message.\n\nReturns:\n
177-
_HelloWorldResponse:\
162+
description: "Return a hello world message.\n\nReturns:\n _HelloWorldResponse:\
178163
\ A response containing the hello world message."
179164
operationId: hello_world_hello_world_get
180165
responses:

docs/source/_static/openapi_v2.yaml

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ openapi: 3.1.0
104104
paths:
105105
/echo:
106106
post:
107-
description: "Echo back the provided utterance.\n\nArgs:\n request
108-
(Utterance):\
109-
\ The utterance to echo back.\n\nReturns:\n Echo: The
110-
echo.\n\nRaises:\n\
107+
description: "Echo back the provided utterance.\n\nArgs:\n request (Utterance):\
108+
\ The utterance to echo back.\n\nReturns:\n Echo: The echo.\n\nRaises:\n\
111109
\ 422 Unprocessable Entity: If utterance is not provided or empty."
112110
operationId: echo_v2_echo_post
113111
requestBody:
@@ -134,18 +132,12 @@ echo.\n\nRaises:\n\
134132
- Basics
135133
/health:
136134
get:
137-
description: "Check the health of the service.\n\nThis endpoint returns
138-
the\
139-
\ health status of the service.\nThe health status can be either UP or
140-
DOWN.\n\
141-
If the service is healthy, the status will be UP.\nIf the service is
142-
unhealthy,\
143-
\ the status will be DOWN and a reason will be provided.\nThe response
144-
will\
145-
\ have a 200 OK status code if the service is healthy,\nand a 500
146-
Internal\
147-
\ Server Error status code if the service is unhealthy.\n\nReturns:\n
148-
Health:\
135+
description: "Check the health of the service.\n\nThis endpoint returns the\
136+
\ health status of the service.\nThe health status can be either UP or DOWN.\n\
137+
If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
138+
\ the status will be DOWN and a reason will be provided.\nThe response will\
139+
\ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
140+
\ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
149141
\ The health status of the service."
150142
operationId: health_health_get
151143
responses:
@@ -160,18 +152,12 @@ Health:\
160152
- Observability
161153
/healthz:
162154
get:
163-
description: "Check the health of the service.\n\nThis endpoint returns
164-
the\
165-
\ health status of the service.\nThe health status can be either UP or
166-
DOWN.\n\
167-
If the service is healthy, the status will be UP.\nIf the service is
168-
unhealthy,\
169-
\ the status will be DOWN and a reason will be provided.\nThe response
170-
will\
171-
\ have a 200 OK status code if the service is healthy,\nand a 500
172-
Internal\
173-
\ Server Error status code if the service is unhealthy.\n\nReturns:\n
174-
Health:\
155+
description: "Check the health of the service.\n\nThis endpoint returns the\
156+
\ health status of the service.\nThe health status can be either UP or DOWN.\n\
157+
If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
158+
\ the status will be DOWN and a reason will be provided.\nThe response will\
159+
\ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
160+
\ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
175161
\ The health status of the service."
176162
operationId: health_healthz_get
177163
responses:
@@ -186,8 +172,7 @@ Health:\
186172
- Observability
187173
/hello-world:
188174
get:
189-
description: "Return a hello world message.\n\nReturns:\n
190-
_HelloWorldResponse:\
175+
description: "Return a hello world message.\n\nReturns:\n _HelloWorldResponse:\
191176
\ A response containing the hello world message."
192177
operationId: hello_world_hello_world_get
193178
responses:

install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ BREW_TOOLS=(
1717
"act;act;https://nektosact.com/"
1818
"pinact;pinact;https://github.com/suzuki-shunsuke/pinact"
1919
"trivy;trivy;https://trivy.dev/latest/"
20+
"pnpm;pnpm;https://pnpm.io/"
2021
)
2122

2223
MAC_BREW_TOOLS=(

0 commit comments

Comments
 (0)