Skip to content

Commit 9614312

Browse files
authored
Merge branch 'main' into feat/get_app_docs_url
2 parents 648ce18 + 8cf6369 commit 9614312

File tree

14 files changed

+154
-53
lines changed

14 files changed

+154
-53
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ contact_links:
44
about: Please report security vulnerabilities to [email protected]
55
- name: Question or Problem
66
about: Ask a question or ask about a problem in GitHub Discussions.
7-
url: https://github.com/tiangolo/fastapi-cli/discussions/categories/questions
7+
url: https://github.com/fastapi/fastapi-cli/discussions/categories/questions
88
- name: Feature Request
99
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
10-
url: https://github.com/tiangolo/fastapi-cli/discussions/categories/questions
10+
url: https://github.com/fastapi/fastapi-cli/discussions/categories/questions

.github/labeler.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
docs:
2+
- all:
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- README.md
6+
- all-globs-to-all-files:
7+
- '!src/**'
8+
- '!pyproject.toml'
9+
10+
internal:
11+
- all:
12+
- changed-files:
13+
- any-glob-to-any-file:
14+
- .github/**
15+
- scripts/**
16+
- .gitignore
17+
- .pre-commit-config.yaml
18+
- pdm_build.py
19+
- requirements*.txt
20+
- all-globs-to-all-files:
21+
- README.md
22+
- '!src/**'
23+
- '!pyproject.toml'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Add to Project
2+
3+
on:
4+
pull_request_target:
5+
issues:
6+
types:
7+
- opened
8+
- reopened
9+
10+
jobs:
11+
add-to-project:
12+
name: Add to project
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
with:
17+
project-url: https://github.com/orgs/fastapi/projects/2
18+
github-token: ${{ secrets.PROJECTS_TOKEN }}

.github/workflows/issue-manager.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ on:
1414
- labeled
1515
workflow_dispatch:
1616

17+
permissions:
18+
issues: write
19+
1720
jobs:
1821
issue-manager:
19-
if: github.repository_owner == 'tiangolo'
22+
if: github.repository_owner == 'fastapi'
2023
runs-on: ubuntu-latest
2124
steps:
2225
- name: Dump GitHub context

.github/workflows/labeler.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Labels
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
# For label-checker
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
labeler:
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/labeler@v5
20+
with:
21+
sync-labels: true
22+
# Run this after labeler applied labels
23+
check-labels:
24+
needs:
25+
- labeler
26+
permissions:
27+
pull-requests: read
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: docker://agilepathway/pull-request-label-checker:latest
31+
with:
32+
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
33+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
3636
run: python -m build
3737
- name: Publish
38-
uses: pypa/gh-action-pypi-publish@v1.8.14
38+
uses: pypa/gh-action-pypi-publish@v1.9.0

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_language_version:
44
python: python3.10
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.5.0
7+
rev: v4.6.0
88
hooks:
99
- id: check-added-large-files
1010
- id: check-toml
@@ -14,7 +14,7 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.2.0
17+
rev: v0.5.5
1818
hooks:
1919
- id: ruff
2020
args:

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ authors:
1212
family-names: Ramírez
1313
1414
identifiers:
15-
repository-code: 'https://github.com/tiangolo/fastapi-cli'
15+
repository-code: 'https://github.com/fastapi/fastapi-cli'
1616
url: 'https://fastapi.tiangolo.com'
1717
abstract: >-
1818
Run and manage FastAPI apps from the command line with FastAPI CLI. 🚀

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# FastAPI CLI
22

3-
<a href="https://github.com/tiangolo/fastapi-cli/actions/workflows/test.yml" target="_blank">
4-
<img src="https://github.com/tiangolo/fastapi-cli/actions/workflows/test.yml/badge.svg" alt="Test">
3+
<a href="https://github.com/fastapi/fastapi-cli/actions/workflows/test.yml" target="_blank">
4+
<img src="https://github.com/fastapi/fastapi-cli/actions/workflows/test.yml/badge.svg" alt="Test">
55
</a>
6-
<a href="https://github.com/tiangolo/fastapi-cli/actions/workflows/publish.yml" target="_blank">
7-
<img src="https://github.com/tiangolo/fastapi-cli/actions/workflows/publish.yml/badge.svg" alt="Publish">
6+
<a href="https://github.com/fastapi/fastapi-cli/actions/workflows/publish.yml" target="_blank">
7+
<img src="https://github.com/fastapi/fastapi-cli/actions/workflows/publish.yml/badge.svg" alt="Publish">
88
</a>
9-
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/fastapi-cli" target="_blank">
10-
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/fastapi-cli.svg" alt="Coverage">
9+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi-cli" target="_blank">
10+
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi-cli.svg" alt="Coverage">
1111
<a href="https://pypi.org/project/fastapi-cli" target="_blank">
1212
<img src="https://img.shields.io/pypi/v/fastapi-cli?color=%2334D058&label=pypi%20package" alt="Package version">
1313
</a>
1414

1515
---
1616

17-
**Source Code**: <a href="https://github.com/tiangolo/fastapi-cli" target="_blank">https://github.com/tiangolo/fastapi-cli</a>
17+
**Source Code**: <a href="https://github.com/fastapi/fastapi-cli" target="_blank">https://github.com/fastapi/fastapi-cli</a>
1818

1919
---
2020

@@ -24,7 +24,7 @@ Run and manage FastAPI apps from the command line with FastAPI CLI. 🚀
2424

2525
**FastAPI CLI** is a command line program `fastapi` that you can use to serve your FastAPI app, manage your FastAPI project, and more.
2626

27-
When you install FastAPI (e.g. with `pip install fastapi`), it includes a package called `fastapi-cli`, this package provides the `fastapi` command in the terminal.
27+
When you install FastAPI (e.g. with `pip install "fastapi[standard]"`), it includes a package called `fastapi-cli`, this package provides the `fastapi` command in the terminal.
2828

2929
To run your FastAPI app for development, you can use the `fastapi dev` command:
3030

pdm_build.py

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from typing import Any, Dict, List
2+
from typing import Any, Dict
33

44
from pdm.backend.hooks import Context
55

@@ -11,29 +11,10 @@ def pdm_build_initialize(context: Context):
1111
# Get custom config for the current package, from the env var
1212
config: Dict[str, Any] = context.config.data["tool"]["tiangolo"][
1313
"_internal-slim-build"
14-
]["packages"][TIANGOLO_BUILD_PACKAGE]
14+
]["packages"].get(TIANGOLO_BUILD_PACKAGE)
15+
if not config:
16+
return
1517
project_config: Dict[str, Any] = config["project"]
16-
# Get main optional dependencies, extras
17-
optional_dependencies: Dict[str, List[str]] = metadata.get(
18-
"optional-dependencies", {}
19-
)
20-
# Get custom optional dependencies name to always include in this (non-slim) package
21-
include_optional_dependencies: List[str] = config.get(
22-
"include-optional-dependencies", []
23-
)
2418
# Override main [project] configs with custom configs for this package
2519
for key, value in project_config.items():
2620
metadata[key] = value
27-
# Get custom build config for the current package
28-
build_config: Dict[str, Any] = (
29-
config.get("tool", {}).get("pdm", {}).get("build", {})
30-
)
31-
# Override PDM build config with custom build config for this package
32-
for key, value in build_config.items():
33-
context.config.build_config[key] = value
34-
# Get main dependencies
35-
dependencies: List[str] = metadata.get("dependencies", [])
36-
# Add optional dependencies to the default dependencies for this (non-slim) package
37-
for include_optional in include_optional_dependencies:
38-
optional_dependencies_group = optional_dependencies.get(include_optional, [])
39-
dependencies.extend(optional_dependencies_group)

0 commit comments

Comments
 (0)