Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6.0 #1779

Draft
wants to merge 260 commits into
base: main
Choose a base branch
from
Draft

0.6.0 #1779

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
6f858a2
AsyncAPI 3.0.0 Nats naming tests
KrySeyt Jul 30, 2024
5eb290c
AsyncAPI 3.0.0 Confluent naming tests
KrySeyt Jul 30, 2024
769d2dc
AsyncAPI 3.0.0 naming tests fix
KrySeyt Jul 30, 2024
eb42a33
AsyncAPI 3.0.0 publisher message rename
KrySeyt Jul 31, 2024
37bcb3b
AsyncAPI 3.0.0 RabbitMQ publisher tests
KrySeyt Jul 31, 2024
bb7d2a8
AsyncAPI 3.0.0 Kafka publisher tests
KrySeyt Jul 31, 2024
22715fd
AsyncAPI 3.0.0 Confluent publisher tests
KrySeyt Jul 31, 2024
713727a
AsyncAPI 3.0.0 Nats publisher tests
KrySeyt Jul 31, 2024
f74068f
AsyncAPI 3.0.0 Redis publisher tests
KrySeyt Jul 31, 2024
9188743
pydantic refs support
KrySeyt Jul 31, 2024
633969c
AsyncAPI 3.0.0 RabbitMQ arguments tests
KrySeyt Jul 31, 2024
7935f8a
AsyncAPI 3.0.0 Kafka arguments tests
KrySeyt Jul 31, 2024
14b9178
AsyncAPI 3.0.0 Nats arguments tests
KrySeyt Jul 31, 2024
b2eacd5
AsyncAPI 3.0.0 Redis arguments tests
KrySeyt Jul 31, 2024
bd49362
AsyncAPI 3.0.0 Confluent arguments tests
KrySeyt Jul 31, 2024
66de63d
AsyncAPI 3.0.0 RabbitMQ router tests
KrySeyt Jul 31, 2024
62d6633
AsyncAPI 3.0.0 Kafka router tests
KrySeyt Aug 1, 2024
ce2903c
AsyncAPI 3.0.0 Nats router tests
KrySeyt Aug 1, 2024
d9312af
AsyncAPI 3.0.0 Redis router tests
KrySeyt Aug 1, 2024
97e1d31
AsyncAPI 3.0.0 Confluent router tests
KrySeyt Aug 1, 2024
f209d9a
AsyncAPI 3.0.0 Kafka router tests fix
KrySeyt Aug 1, 2024
5d32b94
AsyncAPI RabbitMQ fastapi tests
KrySeyt Aug 2, 2024
35bc863
RabbitRouter asyncapi_version argument
KrySeyt Aug 2, 2024
8136d5e
tests fix
KrySeyt Aug 2, 2024
0e477fd
KafkaBroker asyncapi_version argument
KrySeyt Aug 2, 2024
80659cb
AsyncAPI Kafka fastapi tests
KrySeyt Aug 2, 2024
b1ae755
Confluent KafkaBroker asyncapi_version argument
KrySeyt Aug 2, 2024
319da09
Confluent fastapi tests
KrySeyt Aug 2, 2024
fcb4f34
Nats fastapi tests
KrySeyt Aug 2, 2024
676a454
RedisRouter asyncapi_version argument
KrySeyt Aug 2, 2024
c91a29b
Redis asyncapi fastapi tests
KrySeyt Aug 2, 2024
3af7078
RabbitMQ asyncapi test connection
KrySeyt Aug 2, 2024
1d769af
Kafka asyncapi connection test
KrySeyt Aug 3, 2024
ae9c4e6
Confluent asyncapi connection test
KrySeyt Aug 3, 2024
29c1804
Nats asyncapi connection test
KrySeyt Aug 3, 2024
aebada3
Redis asyncapi connection test
KrySeyt Aug 3, 2024
47d5c0a
RabbitMQ AsyncAPI security tests
KrySeyt Aug 3, 2024
889a66c
Kafka AsyncAPI security tests
KrySeyt Aug 3, 2024
62d6887
Confluent AsyncAPI security tests
KrySeyt Aug 3, 2024
b04315c
Redis AsyncAPI security tests
KrySeyt Aug 3, 2024
ed7d8d9
Nats AsyncAPI kv schema test
KrySeyt Aug 3, 2024
8e7e4e6
Nats AsyncAPI obj schema test
KrySeyt Aug 3, 2024
a839768
Test file structure update
KrySeyt Aug 3, 2024
f92dc6d
AsyncAPI 3.0.0 schemas files structure refactoring
KrySeyt Aug 3, 2024
d059c61
AsyncAPI 3.0.0 Kafka connection test fix
KrySeyt Aug 3, 2024
5028e26
AsyncAPI 3.0.0 tests fix
KrySeyt Aug 3, 2024
cf69dd4
AsyncAPI schemas refactoring
KrySeyt Sep 7, 2024
9fc11d6
Remove unneccessary TODO and reorder imports
KrySeyt Aug 6, 2024
3602f4f
AsyncAPI schema generations functions splitted by AsyncAPI version
KrySeyt Aug 6, 2024
4b60bf6
AsyncAPI schema splitting by versions
KrySeyt Sep 7, 2024
85da80f
Continue AsyncAPI schema splitting by version
KrySeyt Aug 8, 2024
0b4fef8
Channel specification
KrySeyt Aug 9, 2024
6e2978b
Broker dependency from AsyncAPI 2.6.0 to internal specs representation
KrySeyt Aug 9, 2024
59ead93
AsyncAPI 3.0.0 generation from internal specs
KrySeyt Aug 11, 2024
84a8bb8
mypy satisfied
KrySeyt Aug 11, 2024
238ddc4
lint.sh satisfied
KrySeyt Aug 11, 2024
6056ff5
Merge conflict fix
KrySeyt Aug 11, 2024
516c784
Cycle import fix
KrySeyt Aug 11, 2024
e324fb1
asyncapi base restructuring
KrySeyt Aug 13, 2024
e1ad476
specification restructuring
KrySeyt Aug 13, 2024
52db91f
refactoring
KrySeyt Sep 8, 2024
c31bc57
ruff satisfied
KrySeyt Aug 13, 2024
16c36be
fix
KrySeyt Sep 8, 2024
0968a74
SpecificationProto and Application moved to specification from asyncapi
KrySeyt Aug 13, 2024
9cc59d1
errors fix
KrySeyt Aug 13, 2024
ec7db29
comments fix
KrySeyt Aug 13, 2024
20b8d80
fix
KrySeyt Sep 8, 2024
7dc7447
fix
KrySeyt Sep 8, 2024
133ad05
replace AsyncAPI 2.6.0 components via internal specs
KrySeyt Aug 14, 2024
a22fa81
Components and servers in internal specs
KrySeyt Aug 15, 2024
5459359
Remove asyncapi attr from internal schema
KrySeyt Aug 15, 2024
ebc618a
I forgot what I done here but I done a lot of good things i think
KrySeyt Aug 15, 2024
e3e6297
AsyncAPI schema generation from specs refactoring - message
KrySeyt Aug 15, 2024
7bd26fe
Remove unused ServerBinding and more refactoring
KrySeyt Aug 16, 2024
75b1cd3
Bindings building from generate.py to schemas methods
KrySeyt Aug 16, 2024
954f677
AsyncAPI 2.6.0 general ChannelBinding building refactoring
KrySeyt Aug 16, 2024
d57297b
AsyncAPI 2.6.0 general OperationBinding building refactoring
KrySeyt Aug 16, 2024
2f4d220
Remove commented code
KrySeyt Aug 16, 2024
a3393d8
AsyncAPI license generation refactoring + little things
KrySeyt Aug 16, 2024
8308022
AsyncAPI contact generation refactoring + little things
KrySeyt Aug 16, 2024
a960394
AsyncAPI 2.6.0 Channel and Operation building refactoring
KrySeyt Aug 16, 2024
2cc8086
AsyncAPI 3.0.0 generation refactoring
KrySeyt Aug 16, 2024
c50f04a
refactoring
KrySeyt Aug 16, 2024
7719ca1
AsyncAPI 2.6.0 bindings refactoring
KrySeyt Aug 16, 2024
2d0b78d
AsyncAPI 2.6.0 bindings refactoring
KrySeyt Aug 16, 2024
ae428b4
AsyncAPI 3.0.0 operations building refactoring
KrySeyt Aug 16, 2024
9592cd1
AsyncAPI 3.0.0 channels building refactoring
KrySeyt Aug 16, 2024
1120c89
Names fix
KrySeyt Aug 16, 2024
1b4a7de
AsyncAPI server schema generation simplify
KrySeyt Aug 17, 2024
4fef981
AsyncAPI schema generation refactoring
KrySeyt Aug 17, 2024
4efccb3
AsyncAPI schema generation refactoring
KrySeyt Aug 17, 2024
71e16db
AsyncAPI schemas refactoring
KrySeyt Aug 17, 2024
74245e2
Documentation generation from AsyncAPI 3.0.0 support. Documentation s…
KrySeyt Aug 17, 2024
91f2bd9
Add asyncapi in docs CLI commands
KrySeyt Aug 17, 2024
15486d4
Tests update
KrySeyt Aug 17, 2024
b06f1e3
Tests update
KrySeyt Aug 17, 2024
8738774
Tests update
KrySeyt Aug 17, 2024
a01a6c2
CLI breaking changes revert
KrySeyt Aug 18, 2024
6c68603
AsyncAPI generation version choosing API changed
KrySeyt Aug 18, 2024
b4f7357
Add kerberos support for confluent broker (#1670)
kumaranvpl Aug 12, 2024
4439479
fix: support all RMQ exchanges in AsyncAPI (#1679)
Lancetnik Aug 13, 2024
6748d3f
Remove unused ignores (#1690)
kumaranvpl Aug 16, 2024
65fcfe2
Update package versions (#1702)
kumaranvpl Aug 20, 2024
94cdefb
feat: add broker.request method (#1649)
Lancetnik Aug 24, 2024
7489bde
Schema v3 and info v3
KrySeyt Jul 22, 2024
a06426d
AsyncAPI rabbit naming test
KrySeyt Jul 28, 2024
f7561cf
AsyncAPI schemas refactoring
KrySeyt Aug 4, 2024
5b46c8e
AsyncAPI generation refactoring
KrySeyt Aug 8, 2024
8937c9f
AsyncAPI 2.6.0 generation from internal specs
KrySeyt Aug 10, 2024
3c79d1a
mypy satisfied
KrySeyt Aug 11, 2024
230c910
refactoring
KrySeyt Aug 13, 2024
caff67f
fix
KrySeyt Sep 7, 2024
fbb0864
Tests update
KrySeyt Aug 17, 2024
93ec7ec
Confluent gssapi security schema test fix
KrySeyt Sep 6, 2024
ec4534c
fix
KrySeyt Sep 7, 2024
c0578b3
fix
KrySeyt Sep 7, 2024
08cce1c
fixes
KrySeyt Sep 7, 2024
b0314e1
fixes
KrySeyt Sep 8, 2024
c92d0f3
Ruff fixes
KrySeyt Sep 8, 2024
21a0d62
Fix kafka oauth test
KrySeyt Sep 8, 2024
94adc4e
Revert start_test_env.sh script docker compose update
KrySeyt Sep 8, 2024
5dd2f7c
docs: generate API References
KrySeyt Sep 8, 2024
531e268
Fix specification bindings amqp channel Exchange
KrySeyt Sep 8, 2024
697328a
Remove unused type: ignore comments
KrySeyt Sep 8, 2024
4e9cab7
type: ignore[override]
KrySeyt Sep 8, 2024
917f7cf
mypy satisfied
KrySeyt Sep 8, 2024
6111e53
mypy satisfied
KrySeyt Sep 8, 2024
da646d5
fixes
KrySeyt Sep 8, 2024
d8a21d9
rm debug statement
KrySeyt Sep 8, 2024
c48b3e1
fixes
KrySeyt Sep 8, 2024
9bb421f
remove unused code
KrySeyt Sep 8, 2024
ec2a962
Fix AsyncAPI 3.0.0 specs error
KrySeyt Sep 8, 2024
feaf2cc
Refactoring AsyncAPI specs generation
KrySeyt Sep 8, 2024
3eaf137
Fix AsyncAPI 3.0 tests
KrySeyt Sep 9, 2024
ffa76cb
Add oauth and gssapi AsyncAPI 3.0.0 tests for Kafka and Confluent
KrySeyt Sep 9, 2024
4cb0707
refactoring
KrySeyt Sep 9, 2024
2e1212e
refactoring
KrySeyt Sep 9, 2024
ceb80c6
refactoring
KrySeyt Sep 9, 2024
aae844b
fix
KrySeyt Sep 9, 2024
346a67a
Merge pull request #1624 from KrySeyt/add_asyncapi_v3_0_support
Lancetnik Sep 10, 2024
171064b
docs: generate API References
Lancetnik Sep 10, 2024
4842baa
chore: merge main
Lancetnik Sep 11, 2024
91405d9
Merge branch 'main' into 0.6.0
KrySeyt Sep 12, 2024
432b498
Merge pull request #1787 from KrySeyt/0.6.0
Lancetnik Sep 13, 2024
dc8deef
refactor: change project structura
Lancetnik Sep 13, 2024
6b638c7
lint: add ruff TID check
Lancetnik Sep 13, 2024
485c113
tests: use request instead of rpc publish everywhere
Lancetnik Sep 13, 2024
35fa776
refactor: remove NATS publish rpc
Lancetnik Sep 13, 2024
fba8e91
tests: polish requests tests
Lancetnik Sep 13, 2024
1662627
refactor: remove RMQ publish rpc
Lancetnik Sep 13, 2024
f551c21
refactor: remove Redis publish rpc
Lancetnik Sep 13, 2024
9996650
refactor: remove Kafka & Confluent publish rpc
Lancetnik Sep 13, 2024
0d90eba
Refactor AsyncAPI 2.6.0 generation / handling + fix wrong message title
KrySeyt Sep 13, 2024
1999eb8
AsyncAPI 3.0.0 generation / char in titles support
KrySeyt Sep 14, 2024
92f7f74
AsyncAPI generation / handling tests
KrySeyt Sep 14, 2024
c6e5bad
New tests refactoring
KrySeyt Sep 14, 2024
d7c6a75
docs: generate API References
KrySeyt Sep 14, 2024
07fb943
fix: correct AsyncAPI 2.6.0 channel names
Lancetnik Sep 16, 2024
7ea8db6
Merge pull request #1790 from KrySeyt/asyncapi_3.0.0_/_support
Lancetnik Sep 16, 2024
2a978c9
chore: merge main
Lancetnik Sep 16, 2024
5d4cac1
refactor: remove global broker from context
Lancetnik Sep 16, 2024
cc55a61
tests: fix all tests
Lancetnik Sep 17, 2024
0a6b83b
tests: refactor tests
Lancetnik Sep 18, 2024
865185e
logging fsm
Lancetnik Sep 20, 2024
2ac9c80
Feat: add process msg to broker.request methods (#1800)
Flosckow Sep 20, 2024
3a8665f
refactor: remove hash logic
Lancetnik Sep 23, 2024
cbae8bc
Merge branch 'main' into 0.6.0
Lancetnik Sep 23, 2024
51ee885
chore: merge main
Lancetnik Sep 24, 2024
996d8b1
Merge branch 'main' into 0.6.0
Lancetnik Sep 24, 2024
27a910d
refactor: reuse HAS_TYPER in CLI
Lancetnik Sep 25, 2024
d595de9
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Sep 25, 2024
e2c89cd
Update specs public API (#1799)
KrySeyt Oct 1, 2024
199b3f4
refactor: change AsyncAPI inheritance tree
Lancetnik Oct 1, 2024
2ed00d7
lint: update ruff config, drop python3.8
Lancetnik Oct 2, 2024
6a38f00
chore: merge main
Lancetnik Oct 2, 2024
8c27d35
chore: merge main
Lancetnik Oct 10, 2024
50af9e3
add: NATS HowTO
Lancetnik Oct 10, 2024
e1c4d72
chore: merge main
Lancetnik Oct 17, 2024
aa6dc13
rm useless change
Lancetnik Oct 17, 2024
f63df92
refactor: create publisher factory
Lancetnik Oct 18, 2024
9a6461d
refactor: split publish to private
Lancetnik Oct 18, 2024
67ae2bf
chore: merge main
Lancetnik Oct 23, 2024
be596f0
refactor: use CMD to call publisher (#1857)
Lancetnik Oct 26, 2024
caa4cda
chore: merge main
Lancetnik Oct 28, 2024
5bbf7c8
chore: merge main
Lancetnik Oct 28, 2024
e39d0ad
Feat/fast depends 3 (#1886)
Lancetnik Oct 31, 2024
40d007b
Fixed RPC for Prometheus metrics (#1887)
roma-frolov Nov 1, 2024
0fa5fc1
tests on MetricsSettingsProvider for all brokers (#1890)
roma-frolov Nov 5, 2024
b5a123d
Merge branch 'main' into 0.6.0
Lancetnik Nov 5, 2024
0578c1b
feat/ack_middleware added middleware (#1869)
Rusich90 Nov 5, 2024
f54e5ee
refactor: use caps names for public enums
Lancetnik Nov 5, 2024
2a4c51d
refactor: little type changes
Lancetnik Nov 5, 2024
65ba4a4
refactor: new setup logic
Lancetnik Nov 6, 2024
cd87d8c
fix: correct RMQ subscriber get_one logic
Lancetnik Nov 6, 2024
af70c5b
Merge branch 'main' into 0.6.0
Lancetnik Nov 6, 2024
aa1562d
chore: fix pydantic 2.10 compatibility
Lancetnik Nov 7, 2024
4c14134
chore: merge main
Lancetnik Nov 7, 2024
362f6c9
refactor: create default middlewares in runtime
Lancetnik Nov 8, 2024
5211e43
Merge branch 'main' into 0.6.0
Lancetnik Nov 11, 2024
69f1985
refactor: add ack handling for brokers (#1897)
vectorvp Nov 12, 2024
736baba
feat: lazy decoder
Lancetnik Nov 13, 2024
9cf95c7
feat: added ack_first
Rusich90 Nov 14, 2024
d64f9f5
docs: generate API References
Rusich90 Nov 14, 2024
ad8d6b4
feat: ack_first added deprecated and docstrings to Ack_Policy
Rusich90 Nov 19, 2024
36da6ac
docs: generate API References
Rusich90 Nov 19, 2024
9b04fe8
chore: merge main
Lancetnik Nov 19, 2024
6c2d155
docs: fix typo
Lancetnik Nov 19, 2024
157151b
feat: ack_first refactored ack_first check
Rusich90 Nov 20, 2024
f22c2d5
refactor: new Specification Schema (#1843)
Lancetnik Nov 20, 2024
921ead8
fix: correct AsyncAPI 2.6 operations
Lancetnik Nov 20, 2024
181e862
tests: add Nats concurrent test
Lancetnik Nov 20, 2024
51f16eb
tests: actualize AsyncAPI 2.6.0 tests
Lancetnik Nov 20, 2024
7bd03af
fix: do not ack Nats Core message:
Lancetnik Nov 21, 2024
f269339
chore: merge main
Lancetnik Nov 22, 2024
cdeb2e8
chore: fix NATS Core acknowledgement
Lancetnik Nov 22, 2024
d1820fe
Remove `retry` from docs and add acknowledgement to getting start (#1…
sheldygg Nov 25, 2024
d81397a
tests: add middlewares enter-exit order test
Lancetnik Nov 25, 2024
08bb54d
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Nov 25, 2024
898dd53
chore: merge 0.6
Lancetnik Nov 26, 2024
de1bca8
Merge branch 'Rusich90-feat/ack_first' into 0.6.0
Lancetnik Nov 26, 2024
d13624c
feat: added ack_first (#1917)
Rusich90 Nov 26, 2024
308dc50
Merge branch 'main' into 0.6.0
Lancetnik Nov 26, 2024
9456e7a
Fix AsyncAPI 3.0.0 AMQP bindings (#1949)
KrySeyt Dec 1, 2024
f8ab59d
docs: use DeliverPolicy Enum for deliver_policy in subscriber (#1952)
Majajashka Dec 1, 2024
65312e9
chore: merge main
Lancetnik Dec 3, 2024
1fd1039
chore: remove useless
Lancetnik Dec 3, 2024
af6f92f
lint: fix mypy a bit
Lancetnik Dec 4, 2024
7eb491c
chore: merge main
Lancetnik Dec 4, 2024
f010bd3
chore: remove useless code
Lancetnik Dec 4, 2024
4100bc0
chore: merge main
Lancetnik Dec 5, 2024
9e57990
tests: make cli tests little bit clear
Lancetnik Dec 5, 2024
31d913f
refactor: make BaseMiddleware generic
Lancetnik Dec 7, 2024
d490f41
Merge branch 'main' into 0.6.0
Lancetnik Dec 7, 2024
0bf4fc7
refactor: make Prometheus middleware generic
Lancetnik Dec 7, 2024
3af457d
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Dec 7, 2024
9730784
refactor: make Telemetry middleware generic
Lancetnik Dec 7, 2024
00cce6a
refactor: deprecate subscriber/publisher-level middlewares
Lancetnik Dec 7, 2024
7b00966
refactor: deprecate filter middlewares
Lancetnik Dec 7, 2024
82e3969
tests: fix Kafka tests from main branch
Lancetnik Dec 9, 2024
baf6178
feat: init_routes added routes to init broker (#1981)
Rusich90 Dec 10, 2024
5f4c9f4
Fix: return logger (#1982)
Flosckow Dec 10, 2024
b9c7dd4
Feat: replace subscribers (#1976)
Flosckow Dec 10, 2024
a456e94
lint: fix routers types
Lancetnik Dec 11, 2024
a10d9b5
lint: fix internal broker types
Lancetnik Dec 11, 2024
4bf0e33
lint: fix ruff TC006
Lancetnik Dec 11, 2024
7025d86
lint: fix internal mypy
Lancetnik Dec 11, 2024
b84c032
feat: add application states (#1974)
Artem-Safronov Dec 12, 2024
cddf8de
fix: correct FastAPI with new state
Lancetnik Dec 12, 2024
c032ecf
tests: refactor publish js frame test
Lancetnik Dec 13, 2024
acf1d8c
feat: make return RecordMetada if not no_confirm, change annotations …
spataphore1337 Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/pr_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
pydantic-version: ["pydantic-v1", "pydantic-v2"]
fail-fast: false

Expand Down Expand Up @@ -480,7 +480,7 @@ jobs:
version: "latest"
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"

- name: Get coverage files
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type: software
authors:
- given-names: Nikita
family-names: Pastukhov
email: diementros@yandex.com
email: nikita@pastukhov-dev.ru
- given-names: Davor
family-names: Runje
email: davor@airt.ai
Expand Down
42 changes: 26 additions & 16 deletions docs/create_api_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def _get_submodules(package_name: str) -> List[str]:


def _import_submodules(
module_name: str, include_public_api_only: bool = False
module_name: str,
include_public_api_only: bool = False,
) -> Optional[List[ModuleType]]:
def _import_module(name: str) -> Optional[ModuleType]:
try:
Expand All @@ -89,7 +90,8 @@ def _import_module(name: str) -> Optional[ModuleType]:


def _import_functions_and_classes(
m: ModuleType, include_public_api_only: bool = False
m: ModuleType,
include_public_api_only: bool = False,
) -> List[Tuple[str, Union[FunctionType, Type[Any]]]]:
funcs_and_classes = []
if not include_public_api_only:
Expand All @@ -112,20 +114,23 @@ def _is_private(name: str) -> bool:


def _import_all_members(
module_name: str, include_public_api_only: bool = False
module_name: str,
include_public_api_only: bool = False,
) -> List[str]:
submodules = _import_submodules(
module_name, include_public_api_only=include_public_api_only
module_name,
include_public_api_only=include_public_api_only,
)
members: List[Tuple[str, Union[FunctionType, Type[Any]]]] = list(
itertools.chain(
*[
_import_functions_and_classes(
m, include_public_api_only=include_public_api_only
m,
include_public_api_only=include_public_api_only,
)
for m in submodules
]
)
],
),
)

names = [
Expand Down Expand Up @@ -168,9 +173,8 @@ def _get_api_summary_item(x: str) -> str:
if x.endswith("."):
indent = " " * (4 * (len(xs) - 1 + 1))
return f"{indent}- {xs[-2]}"
else:
indent = " " * (4 * (len(xs) + 1))
return f"{indent}- [{xs[-1]}](api/{'/'.join(xs)}.md)"
indent = " " * (4 * (len(xs) + 1))
return f"{indent}- [{xs[-1]}](api/{'/'.join(xs)}.md)"


def _get_api_summary(members: List[str]) -> str:
Expand Down Expand Up @@ -236,7 +240,9 @@ def _load_submodules(


def _update_single_api_doc(
symbol: Union[FunctionType, Type[Any]], docs_path: Path, module_name: str
symbol: Union[FunctionType, Type[Any]],
docs_path: Path,
module_name: str,
) -> None:
en_docs_path = docs_path / "docs" / "en"

Expand All @@ -263,11 +269,15 @@ def _update_single_api_doc(


def _update_api_docs(
symbols: List[Union[FunctionType, Type[Any]]], docs_path: Path, module_name: str
symbols: List[Union[FunctionType, Type[Any]]],
docs_path: Path,
module_name: str,
) -> None:
for symbol in symbols:
_update_single_api_doc(
symbol=symbol, docs_path=docs_path, module_name=module_name
symbol=symbol,
docs_path=docs_path,
module_name=module_name,
)


Expand All @@ -284,8 +294,8 @@ def _generate_api_docs_for_module(root_path: Path, module_name: str) -> Tuple[st
"""
public_api_summary = _get_api_summary(
_add_all_submodules(
_import_all_members(module_name, include_public_api_only=True)
)
_import_all_members(module_name, include_public_api_only=True),
),
)
# Using public_api/ symlink pointing to api/ because of the issue
# https://github.com/mkdocs/mkdocs/issues/1974
Expand All @@ -308,7 +318,7 @@ def _generate_api_docs_for_module(root_path: Path, module_name: str) -> Tuple[st

_update_api_docs(symbols, root_path, module_name)

# todo: fix the problem and remove this
# TODO: fix the problem and remove this
src = """ - [ContactDict](api/faststream/asyncapi/schema/info/ContactDict.md)
"""
dst = """ - [ContactDict](api/faststream/asyncapi/schema/info/ContactDict.md)
Expand Down
13 changes: 6 additions & 7 deletions docs/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
CONFIG = BASE_DIR / "mkdocs.yml"
DOCS_DIR = BASE_DIR / "docs"
LANGUAGES_DIRS = tuple(
filter(lambda f: f.is_dir() and f.name not in IGNORE_DIRS, DOCS_DIR.iterdir())
filter(lambda f: f.is_dir() and f.name not in IGNORE_DIRS, DOCS_DIR.iterdir()),
)
BUILD_DIR = BASE_DIR / "site"

Expand Down Expand Up @@ -125,7 +125,7 @@ def add(path=typer.Argument(...)):
not_exists.append(i)
file.write_text(
f"# {title or get_default_title(file)} \n"
"{! " + get_in_progress(i.name) + " !}"
"{! " + get_in_progress(i.name) + " !}",
)
typer.echo(f"{file} - write `in progress`")

Expand All @@ -134,7 +134,7 @@ def add(path=typer.Argument(...)):
file = i / path
file.write_text(
f"# {title or get_default_title(file)} \n"
"{! " + get_missing_translation(i.name) + " !}"
"{! " + get_missing_translation(i.name) + " !}",
)
typer.echo(f"{file} - write `missing translation`")

Expand Down Expand Up @@ -172,9 +172,8 @@ def mv(path: str = typer.Argument(...), new_path: str = typer.Argument(...)):
@app.command()
def update_readme() -> None:
"""Update README.md by expanding embeddings in docs/docs/en/index.md."""
# todo: fix this function
# TODO: fix this function
typer.echo("Skipping updating README.md for now")
return None

# typer.echo(f"Updating README.md")
# expand_markdown(input_markdown_path=EN_INDEX_PATH, output_markdown_path=README_PATH)
Expand Down Expand Up @@ -208,9 +207,9 @@ def update_contributing():
(
f"> **_NOTE:_** This is an auto-generated file. Please edit {relative_path} instead.",
*content,
)
),
)
+ "\n"
+ "\n",
)


Expand Down
Loading
Loading