Commit Graph

134 Commits

Author SHA1 Message Date
Sebastián Ramírez ae02be90b6
🔨 Update translations script to remove old (removed) files (#13928)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-26 20:57:50 +02:00
Sebastián Ramírez ce26b8e1ca
🔨 Update FastAPI People sleep interval, use external settings (#13888) 2025-07-12 19:09:49 +00:00
Emmanuel Ferdman 7c04182724
🔨 Resolve Pydantic deprecation warnings in internal script (#13696)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-06-17 09:50:19 +02:00
dependabot[bot] 8c94e97c89
⬆ Bump ruff to 0.9.4 (#13299)
* ⬆ Bump ruff from 0.6.4 to 0.9.4

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.4 to 0.9.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.6.4...0.9.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update pre-commit accordingly and make formatting changes

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-06 13:18:57 +01:00
Sebastián Ramírez 0a2b24653b
♻️ Fix `notify_translations.py` empty env var handling for PR label events vs workflow_dispatch (#13272) 2025-01-28 22:30:15 +00:00
Sebastián Ramírez 326fec16b9
♻️ Refactor and move `scripts/notify_translations.py`, no need for a custom GitHub Action (#13270)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-28 21:47:33 +00:00
Sebastián Ramírez ff68d0894a
🔨 Update FastAPI People Experts script, refactor and optimize data fetching to handle rate limits (#13267) 2025-01-28 20:34:56 +00:00
Sebastián Ramírez 2ee101fb81
👷 Refactor FastAPI People Sponsors to use 2 tokens (#13228) 2025-01-18 12:58:36 +00:00
Sebastián Ramírez 9e0d4fa0ef
👷 Add independent CI automation for FastAPI People - Sponsors (#13221) 2025-01-17 17:51:19 +00:00
Alejandra 1b8f823a05
👷‍♀️ Add script for GitHub Topic Repositories and update External Links (#13135)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-01-02 20:44:50 +00:00
Sebastián Ramírez b59885c9d5
👷 Add new GitHub Action to update contributors, translators, and translation reviewers (#13136) 2025-01-02 17:03:21 +00:00
Sebastián Ramírez acd9c4e1aa
🔨 Add internal scripts to generate language translations with PydanticAI, include Spanish prompt (#13123) 2024-12-30 18:46:43 +00:00
Sebastián Ramírez 8767a31c80
📝 Update `contributing.md` docs, include note to not translate this page (#12841) 2024-11-10 17:11:56 +00:00
Sebastián Ramírez 98182d02ce
🔨 Update docs preview script to show previous version and English version (#12856) 2024-11-09 20:13:48 +00:00
Sebastián Ramírez 6384f730f7
👷 Refactor label-approved, make it an internal script instead of an external GitHub Action (#12280) 2024-10-12 13:58:30 +00:00
Sebastián Ramírez 7daaac2bc3
Add new tutorial for SQL databases with SQLModel (#12285) 2024-10-09 21:44:42 +02:00
Sebastián Ramírez c6dfdb8523
🔨 Add script to generate variants of files (#12405) 2024-10-08 11:01:17 +00:00
Sebastián Ramírez 797cad7162
📝 Fix extra mdx-base-path paths (#12397) 2024-10-07 20:18:07 +00:00
Sebastián Ramírez 55035f440b
Add support for Pydantic models for parameters using `Query`, `Cookie`, `Header` (#12199) 2024-09-17 20:54:10 +02:00
Sebastián Ramírez 2a4351105e
💡 Add comments with instructions for Playwright screenshot scripts (#12193) 2024-09-13 11:14:46 +02:00
Sebastián Ramírez 7bad7c0975
Add support for Pydantic models in `Form` parameters (#12129)
Revert "️ Temporarily revert " Add support for Pydantic models in `Form` pa…"

This reverts commit 8e6cf9ee9c.
2024-09-05 17:16:50 +02:00
Sebastián Ramírez 8e6cf9ee9c
️ Temporarily revert " Add support for Pydantic models in `Form` parameters" to make a checkpoint release (#12128)
Revert " Add support for Pydantic models in `Form` parameters (#12127)"

This reverts commit 0f3e65b007.
2024-09-05 16:55:44 +02:00
Sebastián Ramírez 0f3e65b007
Add support for Pydantic models in `Form` parameters (#12127) 2024-09-05 16:40:48 +02:00
Sebastián Ramírez 4f1eb0cd9e
🔧 Update coverage config files (#12035) 2024-08-18 16:07:03 -05:00
Sebastián Ramírez 9bfc48ad9f
📝 Update FastAPI People, do not translate to have the most recent info (#12034) 2024-08-17 16:20:31 -05:00
gitworkflows 4a7f6e0ae6
🔨 Standardize shebang across shell scripts (#11942) 2024-08-16 22:59:06 -05:00
Sławomir Ehlert 0aaaed581e
⚙️ Record and show test coverage contexts (what test covers which line) (#11518)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-08-15 20:57:38 -05:00
Sebastián Ramírez 85bd4067c2
📝 Add documentation for non-translated pages and scripts to verify them (#12020) 2024-08-14 17:57:10 -05:00
Sebastián Ramírez 06fc1c2cc8
🔨 Update docs.py script to enable dirty reload conditionally (#11986) 2024-08-09 16:30:19 -05:00
Sebastián Ramírez 8b6d9ba789
🐛 Fix deploy docs previews script to handle mkdocs.yml files (#11984) 2024-08-09 10:52:41 -05:00
Sebastián Ramírez 233bab7f41
👷 Update docs-previews to handle no docs changes (#11975) 2024-08-08 18:28:14 -05:00
Sebastián Ramírez 58279670b6
🔨 Refactor script `deploy_docs_status.py` to account for deploy URLs with or without trailing slash (#11965) 2024-08-07 16:17:14 -05:00
Sebastián Ramírez f118154576
👷🏻 Add deploy docs status and preview links to PRs (#11961) 2024-08-07 19:15:24 +00:00
Sebastián Ramírez 0cd844d387
🔧 Update docs setup with latest configs and plugins (#11953) 2024-08-05 23:48:30 -05:00
Sebastián Ramírez 8b930f8847
👷 Refactor GitHub Action to comment docs deployment URLs and update token (#11925) 2024-07-31 18:40:04 -05:00
gitworkflows 9d74b23670
♻️ Simplify internal docs script (#11777) 2024-07-14 12:10:43 -05:00
Sebastián Ramírez f49da74200
🔨 Update internal scripts and remove unused ones (#11499) 2024-04-29 17:03:14 -07:00
Sebastián Ramírez 2fe1a1387b
🔨 Verify `mkdocs.yml` languages in CI, update `docs.py` (#11009) 2024-01-22 20:26:14 +01:00
Max Su df09e0a3f6
🌐 Initialize translations for Traditional Chinese (#10505)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-17 18:15:27 +01:00
Sebastián Ramírez 0aee526de9
🔧 Add support for translations to languages with a longer code name, like `zh-hant` (#10950) 2024-01-12 14:38:17 +00:00
Craig Blaszczyk 7eeacc9958
Generate automatic language names for docs translations (#5354)
Co-authored-by: Craig Blaszczyk <craig@boughtbymany.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-01-09 20:37:09 +00:00
Sebastián Ramírez 2e14c69c31
👷 Adopt Ruff format (#10517)
* 🔧 Update pre-commit, use ruff format

* ⬆️ Upgrade dependencies, use Ruff for formatting

* 🔧 Update Ruff config

* 🔨 Update lint and format scripts, use Ruff

* 🎨 Format internals with Ruff

* 🎨 Format docs scripts

* 🎨 Format tests

* 🎨 Format extra commas in src for docs

* 📝 Update docs mentioning `@lru_cache()`, use `@lru_cache` instead to keep consistency with the format

* 🎨 Update src for docs, use plain `@lru_cache`

* 🎨 Update src for docs format and docs references
2023-10-25 00:26:06 +04:00
Sebastián Ramírez 9bfbacfe98
🐛 Fix overriding MKDocs theme lang in hook (#10490) 2023-10-21 11:10:18 +04:00
Sebastián Ramírez dc7838eec3
🔥 Drop/close Gitter chat. Questions should go to GitHub Discussions, free conversations to Discord. (#10485) 2023-10-20 12:39:03 +04:00
Sebastián Ramírez 05ca41cfd1
Add reference (code API) docs with PEP 727, add subclass with custom docstrings for `BackgroundTasks`, refactor docs structure (#10392)
*  Add mkdocstrings and griffe-typingdoc to dependencies

* 🔧 Add mkdocstrings configs to MkDocs

* 📝 Add first WIP reference page

* ⬆️ Upgrade typing-extensions to the minimum version including Doc()

* 📝 Add docs to FastAPI parameters

* 📝 Add docstrings for OpenAPI docs utils

* 📝 Add docstrings for security utils

* 📝 Add docstrings for UploadFile

* 📝 Update docstrings in FastAPI class

* 📝 Add docstrings for path operation methods

* 📝 Add docstring for jsonable_encoder

* 📝 Add docstrings for exceptions

* 📝 Add docstsrings for parameter functions

* 📝 Add docstrings for responses

* 📝 Add docstrings for APIRouter

* ♻️ Sub-class BackgroundTasks to document it with docstrings

* 📝 Update usage of background tasks in dependencies

*  Update tests with new deprecation warnings

* 📝 Add new reference docs

* 🔧 Update MkDocs with new reference docs

*  Update pytest fixture, deprecation is raised only once

* 🎨 Update format for types in exceptions.py

* ♻️ Update annotations in BackgroundTask, `Annotated` can't take ParamSpec's P.args or P.kwargs

* ✏️ Fix typos caught by @pawamoy

* 🔧 Update and fix MkDocstrings configs from @pawamoy tips

* 📝 Update reference docs

* ✏️ Fix typos found by @pawamoy

*  Add HTTPX as a dependency for docs, for the TestClient

* 🔧 Update MkDocs config, rename websockets reference

* 🔇 Add type-ignores for Doc as the stubs haven't been released for mypy

* 🔥 Remove duplicated deprecated notice

* 🔇 Remove typing error for unreleased stub in openapi/docs.py

*  Add tests for UploadFile for coverage

* ⬆️ Upgrade griffe-typingdoc==0.2.2

* 📝 Refactor docs structure

* 🔨 Update README generation with new index frontmatter and style

* 🔨 Update generation of languages, remove from top menu, keep in lang menu

* 📝 Add OpenAPI Pydantic models

* 🔨 Update docs script to not translate Reference and Release Notes

* 🔧 Add reference for OpenAPI models

* 🔧 Update MkDocs config for mkdocstrings insiders

* 👷 Install mkdocstring insiders in CI for docs

* 🐛 Fix MkDocstrings insiders install URL

*  Move dependencies shared by docs and tests to its own requirements file

* 👷 Update cache keys for test and docs dependencies

* 📝 Remove no longer needed __init__ placeholder docstrings

* 📝 Move docstring for APIRouter to the class level (not __init__ level)

* 🔥 Remove no longer needed dummy placeholder __init__ docstring
2023-10-18 16:36:40 +04:00
Sebastián Ramírez ea43f227e5
Add support for disabling the separation of input and output JSON Schemas in OpenAPI with Pydantic v2 (#10145)
* 📝 Add docs for Separate OpenAPI Schemas for Input and Output

* 🔧 Add new docs page to MkDocs config

*  Add separate_input_output_schemas parameter to FastAPI class

* 📝 Add source examples for separating OpenAPI schemas

*  Add tests for separated OpenAPI schemas

* 📝 Add source examples for Python 3.10, 3.9, and 3.7+

* 📝 Update docs for Separate OpenAPI Schemas with new multi-version examples

*  Add and update tests for different Python versions

*  Add tests for corner cases with separate_input_output_schemas

* 📝 Update tutorial to use Union instead of Optional

* 🐛 Fix type annotations

* 🐛 Fix correct import in test

* 💄 Add CSS to simulate browser windows for screenshots

*  Add playwright as a dev dependency to automate generating screenshots

* 🔨 Add Playwright scripts to generate screenshots for new docs

* 📝 Update docs, tweak text to match screenshots

* 🍱 Add screenshots for new docs
2023-08-25 21:10:22 +02:00
Sebastián Ramírez 0a8423d792
🔨 Enable linenums in MkDocs Material during local live development to simplify highlighting code (#9769) 2023-06-30 18:23:02 +02:00
Sebastián Ramírez ed297bb2e0
Add Material for MkDocs Insiders features and cards (#9748)
*  Add dependencies for MkDocs Insiders

* 🙈 Add Insider's .cache to .gitignore

* 🔧 Update MkDocs configs for Insiders

* 💄 Add custom Insiders card layout, while the custom logo is provided from upstream

* 🔨 Update docs.py script to dynamically enable insiders if it's installed

* 👷 Add cache for MkDocs Material Insiders' cards

* 🔊 Add a small log to the docs CLI

* 🔊 Tweak logs, only after exporting languages

* 🐛 Fix accessing non existing env var

* 🔧 Invalidate deps cache

* 🔧 Tweak cache IDs

* 👷 Update cache for installing insiders

* 🔊 Log insiders

* 💚 Invalidate cache

* 👷 Tweak cache keys

* 👷 Trigger CI and test cache

* 🔥 Remove cache comment

* ️ Optimize cache usage for first runs of docs

* 👷 Tweak cache for MkDocs Material cards

* 💚 Trigger CI to test cache
2023-06-26 16:05:43 +02:00
Sebastián Ramírez 5656ed09ef
Refactor docs for building scripts, use MkDocs hooks, simplify (remove) configs for languages (#9742)
*  Add MkDocs hooks to re-use all config from en, and auto-generate missing docs files form en

* 🔧 Update MkDocs config for es

* 🔧 Simplify configs for all languages

*  Compute available languages from MkDocs Material for config overrides in hooks

* 🔧 Update config for MkDocs for en, to make paths compatible for other languages

* ♻️ Refactor scripts/docs.py to remove all custom logic that is now handled by the MkDocs hooks

* 🔧 Remove ta language as it's incomplete (no translations and causing errors)

* 🔥 Remove ta lang, no translations available

* 🔥 Remove dummy overrides directories, no longer needed

*  Use the same missing-translation.md file contents for hooks

* ️ Restore and refactor new-lang command

* 📝 Update docs for contributing with new simplified workflow for translations

* 🔊 Enable logs so that MkDocs can show its standard output on the docs.py script
2023-06-25 14:33:58 +02:00
Sebastián Ramírez 51d3a8ff12
🔨 Add MkDocs hook that renames sections based on the first index file (#9737) 2023-06-24 16:47:15 +02:00