Находки в опенсорсе: Python
854 subscribers
4 photos
130 links
Легкие задачки в опенсорсе из мира Python

Чат: @opensource_findings_chat
Download Telegram
Нужно добавить хук на смену темы виджета Gurubase при изменении темы основной документации FastStream

Готовый пример кода для работы с mkdocs уже есть в репозитории Gurubase. Все ссылки – в описании Issue

https://github.com/airtai/faststream/issues/2110

upd: решено

#documentation #faststream
👍5
FastStream снова нужна ваша помощь. Текущая версия документации сильно разбита на фрагменты для того, чтобы их можно было инклудить в разные переводы документации.
Но от идеи с разными переводами отказались, поэтому текущие атомы, которые используются только в одном месте нужно заинлайнить прямо в место использования для повышения удоства работы с исходниками доки.

Файлов много – поэтому принимаются любые PR'ы на любое количетсво файлов) Насколько хватит усидчивости – столько и приносите😅 Проекту действительно нужна ваша помощь, какой бы дурацкой не выглядела задача😢

Подробности есть в описание Issue, а к нему прикреплен даже PR-образец, чтобы было понятно, что ожидается от контрибуторов. Спасибо за внимание!

#documentation #faststream

upd: уже 6 разных контрибуторов влились в движуху

https://github.com/airtai/faststream/issues/2109
👍8🌚3🔥1
Еще одна небольшая правка по документации FastStream – нужно заменить использование f-строк в логировании в примерах кода документации. В Issue приведен конкретный пример, но нужно найти все такие места и исправить их.

https://github.com/airtai/faststream/issues/2122

#documentation #faststream
https://github.com/ag2ai/faststream/issues/2180

Очень простой Issue на расширение документации об использовании RPC в FastStream. Нужно добавить примеры использования Response классов и того, как должен выглядить subscriber, способный ответить на сообщение

#documentation #faststream
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Figure out why sphinx does not link HttpResponse as a return type (#153)

See https://github.com/wemake-services/django-modern-rest/blob/7aa23316219d4226d7c49435f9b028130f8c5dbc/docs/conf.py#L98-L99

When make -C docs clean html is generated without this line, sphinx produces:

django-modern-rest/django_modern_rest/errors.py:docstring of django_modern_rest.errors.global_error_handler:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
django-modern-rest/django_modern_rest/endpoint.py:docstring of django_modern_rest.endpoint.Endpoint.__call__:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
django-modern-rest/django_modern_rest/endpoint.py:docstring of django_modern_rest.endpoint.Endpoint.handle_async_error:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
django-modern-rest/django_modern_rest/endpoint.py:docstring of django_modern_rest.endpoint.Endpoint.handle_error:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]


This does not seem right, because everything is configure: intersphinx, imports, etc.

• Links in the form of inline :class: roles are rendered correctly

<img width="721" height="115" alt="Image" src="https://github.com/user-attachments/assets/91a0e5ee-90de-4e04-ae52-58514cc275f4" />

• The link in the annotations is not generated

<img width="737" height="377" alt="Image" src="https://github.com/user-attachments/assets/9ab218c1-0153-45f4-836f-e2d2eaaec92b" />

#documentation #helpwanted #goodfirst_issue

sent via relator
1
New issue to wemake-services/django-modern-rest by @sobolevn
Split code from `middleware.rst` into its own example file
(#186)

We store our examples as independent files, so it would be easier for us to work with them: type checking, linting, etc.

Right now middleware.rst has a lot of code with no examples. We need to create a new example/middleware/<example_name>.py and split the code.

#django_modern_rest #documentation #good_first_issue #help_wanted

sent via relator
New issue to wemake-services/django-modern-rest by @sobolevn
Customize `.. literalinclude` directive to automatically create links to the source files
(#191)

Some examples have a big number of import statements that take around 30%-50% of the whole example. We can use :lines: NUM- to hide imports, but, we still want to show the whole file when needed.

To fix this I propose adding a sphinx custom directive called .. literalincludelinked, which will produce

🖼️Image

Here are some basic examples of how to do something similar:
https://chatgpt.com/share/68ff5943-c07c-8009-8ae1-cc6520b452d7

PRs are very welcome!

#django_modern_rest #documentation #help_wanted #enhancement #good_first_issue

sent via relator