Browse Source

Merge remote-tracking branch 'upstream/master' into add-missing-tests-for-code-examples

pull/14569/head
Yurii Motov 7 months ago
parent
commit
406de37882
  1. 16
      .github/workflows/pre-commit.yml
  2. 9
      docs/en/docs/release-notes.md
  3. 46
      docs/uk/llm-prompt.md
  4. 2
      docs_src/python_types/tutorial005_py39.py
  5. 2
      requirements.txt

16
.github/workflows/pre-commit.yml

@ -21,14 +21,21 @@ jobs:
name: Checkout PR for own repo
if: env.IS_FORK == 'false'
with:
# To be able to commit it needs more than the last commit
# To be able to commit it needs to fetch the head of the branch, not the
# merge commit
ref: ${{ github.head_ref }}
# And it needs the full history to be able to compute diffs
fetch-depth: 0
# A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
token: ${{ secrets.PRE_COMMIT }}
# pre-commit lite ci needs the default checkout configs to work
- uses: actions/checkout@v5
name: Checkout PR for fork
if: env.IS_FORK == 'true'
with:
# To be able to commit it needs the head branch of the PR, the remote one
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
@ -44,12 +51,9 @@ jobs:
run: |
uv venv
uv pip install -r requirements.txt
- name: Run pre-commit
- name: Run prek - pre-commit
id: precommit
run: |
# Fetch the base branch for comparison
git fetch origin ${{ github.base_ref }}
uvx pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD --show-diff-on-failure
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
continue-on-error: true
- name: Commit and push changes
if: env.IS_FORK == 'false'

9
docs/en/docs/release-notes.md

@ -7,8 +7,17 @@ hide:
## Latest Changes
### Docs
* 📝 Fix duplicated variable in `docs_src/python_types/tutorial005_py39.py`. PR [#14565](https://github.com/fastapi/fastapi/pull/14565) by [@paras-verma7454](https://github.com/paras-verma7454).
### Translations
* 🔧 Add LLM prompt file for Ukrainian, generated from the existing translations. PR [#14548](https://github.com/fastapi/fastapi/pull/14548) by [@tiangolo](https://github.com/tiangolo).
### Internal
* ⬆️ Use prek as a pre-commit alternative. PR [#14572](https://github.com/fastapi/fastapi/pull/14572) by [@tiangolo](https://github.com/tiangolo).
* 👷 Add performance tests with CodSpeed. PR [#14558](https://github.com/fastapi/fastapi/pull/14558) by [@tiangolo](https://github.com/tiangolo).
## 0.125.0

46
docs/uk/llm-prompt.md

@ -0,0 +1,46 @@
### Target language
Translate to Ukrainian (українська).
Language code: uk.
### Grammar and tone
1) Use polite/formal address consistent with existing Ukrainian docs (use “ви/ваш”).
2) Keep the tone concise and technical.
### Headings
1) Follow existing Ukrainian heading style; keep headings short and instructional.
2) Do not add trailing punctuation to headings.
### Quotes
1) Prefer Ukrainian guillemets «…» for quoted terms in prose, matching existing Ukrainian docs.
2) Never change quotes inside inline code, code blocks, URLs, or file paths.
### Ellipsis
1) Keep ellipsis style consistent with existing Ukrainian docs.
2) Never change `...` in code, URLs, or CLI examples.
### Preferred translations / glossary
Use the following preferred translations when they apply in documentation prose:
- request (HTTP): запит
- response (HTTP): відповідь
- path operation: операція шляху
- path operation function: функція операції шляху
### `///` admonitions
1) Keep the admonition keyword in English (do not translate `note`, `tip`, etc.).
2) If a title is present, prefer these canonical titles (choose one canonical form where variants exist):
- `/// note | Примітка`
- `/// note | Технічні деталі`
- `/// tip | Порада`
- `/// warning | Попередження`
- `/// info | Інформація`
- `/// danger | Обережно`

2
docs_src/python_types/tutorial005_py39.py

@ -1,2 +1,2 @@
def get_items(item_a: str, item_b: int, item_c: float, item_d: bool, item_e: bytes):
return item_a, item_b, item_c, item_d, item_d, item_e
return item_a, item_b, item_c, item_d, item_e

2
requirements.txt

@ -2,6 +2,6 @@
-r requirements-tests.txt
-r requirements-docs.txt
-r requirements-translations.txt
pre-commit >=4.5.0,<5.0.0
prek==0.2.22
# For generating screenshots
playwright

Loading…
Cancel
Save