Skip to content

Commit 382f0fb

Browse files
author
Coding Agent
committed
Last task was great. Can you add readme in hindi, ...
1 parent d1ac6da commit 382f0fb

6 files changed

Lines changed: 468 additions & 0 deletions

File tree

README-es.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
El proyecto es un fork del proyecto original - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
# PyDocSmith
6+
7+
PyDocSmith es un paquete Python versátil diseñado para analizar, detectar y componer docstrings en varios estilos. Soporta múltiples convenciones de docstrings, incluyendo reStructuredText (reST), Google, NumPydoc y Epydoc, proporcionando flexibilidad en las prácticas de documentación para desarrolladores de Python.
8+
9+
## Características
10+
11+
- **Detección de estilo de docstring:** Detectar automáticamente el estilo de docstrings (por ejemplo, reST, Google, NumPydoc, Epydoc) usando heurísticas simples.
12+
- **Análisis de docstrings:** Convertir docstrings en representaciones estructuradas, facilitando el análisis y manipulación de la documentación.
13+
- **Composición de docstrings:** Renderizar docstrings estructuradas de vuelta a texto, permitiendo la generación y modificación automatizada de docstrings.
14+
- **Docstrings de atributos:** Analizar docstrings de atributos definidos a nivel de clase y módulo, mejorando la documentación de propiedades de clase y variables a nivel de módulo.
15+
16+
## Instalación
17+
18+
```bash
19+
pip install PyDocSmith
20+
```
21+
22+
## Uso
23+
24+
### Detección de estilo de docstring
25+
26+
Detectar el estilo de docstring de un texto dado:
27+
28+
```python
29+
from PyDocSmith import detect_docstring_style, DocstringStyle
30+
31+
docstring = """
32+
This is an example docstring.
33+
:param param1: Description of param1
34+
:return: Description of return value
35+
"""
36+
style = detect_docstring_style(docstring)
37+
print(style) # Outputs: DocstringStyle.EPYDOC
38+
```
39+
40+
### Análisis de docstrings
41+
42+
Analizar una docstring en sus componentes:
43+
44+
```python
45+
from PyDocSmith import parse, DocstringStyle
46+
47+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
48+
print(parsed_docstring)
49+
```
50+
51+
### Composición de docstrings
52+
53+
Renderizar una docstring analizada de vuelta a texto:
54+
55+
```python
56+
from PyDocSmith import compose
57+
58+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
59+
print(docstring_text)
60+
```
61+
62+
## Características avanzadas
63+
64+
- **Analizar desde objeto:** PyDocSmith puede analizar docstrings directamente desde objetos Python, incluyendo clases y módulos, incorporando docstrings de atributos en la representación estructurada.
65+
- **Estilos de renderizado personalizados:** Personalizar el renderizado de docstrings con estilos compactos o detallados, y especificar indentación personalizada para el texto de docstring generado.
66+
67+
## Cosas que han sido modificadas con respecto a docstring_parser
68+
69+
1. Mejores heurísticas para detectar el estilo de docstring
70+
2. Google Docstring ha sido modificado para acomodar Notes, Examples
71+
3. A veces GoogleDoc string no tiene la indentación correcta, especialmente cuando se genera desde LLMs como GPT o Mistral. PyDocSmith puede corregir esas malas docstrings.
72+
4. Casos de prueba adicionales fueron añadidos para acomodar diferentes estilos de GoogleDocstring
73+
74+
He actualizado esto basado en el caso de uso para - https://www.penify.dev
75+
76+
## Contribución
77+
78+
¡Las contribuciones son bienvenidas! Por favor, envíe pull requests o reporte problemas en la página de GitHub del proyecto.

README-fr.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Le projet est un fork du projet original - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
# PyDocSmith
6+
7+
PyDocSmith est un package Python polyvalent conçu pour analyser, détecter et composer des docstrings dans divers styles. Il prend en charge plusieurs conventions de docstrings, y compris reStructuredText (reST), Google, NumPydoc et Epydoc, offrant une flexibilité dans les pratiques de documentation pour les développeurs Python.
8+
9+
## Fonctionnalités
10+
11+
- **Détection du style de docstring :** Détecter automatiquement le style des docstrings (par exemple, reST, Google, NumPydoc, Epydoc) en utilisant des heuristiques simples.
12+
- **Analyse des docstrings :** Convertir les docstrings en représentations structurées, facilitant l'analyse et la manipulation de la documentation.
13+
- **Composition des docstrings :** Rendre les docstrings structurées en texte, permettant la génération et la modification automatisées des docstrings.
14+
- **Docstrings d'attributs :** Analyser les docstrings d'attributs définis au niveau des classes et des modules, améliorant la documentation des propriétés de classe et des variables au niveau du module.
15+
16+
## Installation
17+
18+
```bash
19+
pip install PyDocSmith
20+
```
21+
22+
## Utilisation
23+
24+
### Détection du style de docstring
25+
26+
Détecter le style de docstring d'un texte donné :
27+
28+
```python
29+
from PyDocSmith import detect_docstring_style, DocstringStyle
30+
31+
docstring = """
32+
This is an example docstring.
33+
:param param1: Description of param1
34+
:return: Description of return value
35+
"""
36+
style = detect_docstring_style(docstring)
37+
print(style) # Outputs: DocstringStyle.EPYDOC
38+
```
39+
40+
### Analyse des docstrings
41+
42+
Analyser une docstring en ses composants :
43+
44+
```python
45+
from PyDocSmith import parse, DocstringStyle
46+
47+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
48+
print(parsed_docstring)
49+
```
50+
51+
### Composition des docstrings
52+
53+
Rendre une docstring analysée en texte :
54+
55+
```python
56+
from PyDocSmith import compose
57+
58+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
59+
print(docstring_text)
60+
```
61+
62+
## Fonctionnalités avancées
63+
64+
- **Analyser depuis l'objet :** PyDocSmith peut analyser les docstrings directement depuis les objets Python, y compris les classes et les modules, en incorporant les docstrings d'attributs dans la représentation structurée.
65+
- **Styles de rendu personnalisés :** Personnaliser le rendu des docstrings avec des styles compacts ou détaillés, et spécifier une indentation personnalisée pour le texte de docstring généré.
66+
67+
## Choses qui ont été modifiées par rapport à docstring_parser
68+
69+
1. Meilleures heuristiques pour détecter le style de docstring
70+
2. Google Docstring a été modifié pour accommoder Notes, Examples
71+
3. Parfois, GoogleDoc string n'a pas la bonne indentation, surtout lorsqu'il est généré à partir de LLMs comme GPT ou Mistral. PyDocSmith peut corriger ces mauvaises docstrings.
72+
4. Des cas de test supplémentaires ont été ajoutés pour accommoder différents styles de GoogleDocstring
73+
74+
J'ai mis à jour cela basé sur le cas d'utilisation pour - https://www.penify.dev
75+
76+
## Contribution
77+
78+
Les contributions sont les bienvenues ! Veuillez soumettre des pull requests ou signaler des problèmes sur la page GitHub du projet.

README-hi.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
यह परियोजना मूल परियोजना से एक फोर्क है - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
# PyDocSmith
6+
7+
PyDocSmith विभिन्न शैलियों में docstrings को पार्स करने, पता लगाने और लिखने के लिए डिज़ाइन किया गया एक बहुमुखी Python पैकेज है। यह reStructuredText (reST), Google, NumPydoc, और Epydoc सहित कई docstring सम्मेलनों का समर्थन करता है, Python डेवलपर्स के लिए दस्तावेज़ीकरण प्रथाओं में लचीलापन प्रदान करता है।
8+
9+
## विशेषताएँ
10+
11+
- **Docstring शैली का पता लगाना:** सरल heuristics का उपयोग करके docstrings की शैली (जैसे, reST, Google, NumPydoc, Epydoc) को स्वचालित रूप से पता लगाएं।
12+
- **Docstring पार्सिंग:** docstrings को संरचित प्रतिनिधित्व में परिवर्तित करें, जिससे दस्तावेज़ीकरण का विश्लेषण और हेरफेर करना आसान हो जाए।
13+
- **Docstring रचना:** संरचित docstrings को वापस टेक्स्ट में रेंडर करें, जिससे स्वचालित docstring निर्माण और संशोधन की अनुमति मिले।
14+
- **विशेषता Docstrings:** कक्षा और मॉड्यूल स्तर पर परिभाषित विशेषता docstrings को पार्स करें, कक्षा गुणों और मॉड्यूल-स्तरीय चरों के दस्तावेज़ीकरण को बढ़ाएं।
15+
16+
## स्थापना
17+
18+
```bash
19+
pip install PyDocSmith
20+
```
21+
22+
## उपयोग
23+
24+
### Docstring शैली का पता लगाना
25+
26+
दिए गए टेक्स्ट की docstring शैली का पता लगाएं:
27+
28+
```python
29+
from PyDocSmith import detect_docstring_style, DocstringStyle
30+
31+
docstring = """
32+
This is an example docstring.
33+
:param param1: Description of param1
34+
:return: Description of return value
35+
"""
36+
style = detect_docstring_style(docstring)
37+
print(style) # Outputs: DocstringStyle.EPYDOC
38+
```
39+
40+
### Docstrings पार्स करना
41+
42+
एक docstring को उसके घटकों में पार्स करें:
43+
44+
```python
45+
from PyDocSmith import parse, DocstringStyle
46+
47+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
48+
print(parsed_docstring)
49+
```
50+
51+
### Docstrings रचना करना
52+
53+
एक पार्स किए गए docstring को वापस टेक्स्ट में रेंडर करें:
54+
55+
```python
56+
from PyDocSmith import compose
57+
58+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
59+
print(docstring_text)
60+
```
61+
62+
## उन्नत विशेषताएँ
63+
64+
- **ऑब्जेक्ट से पार्स करें:** PyDocSmith Python ऑब्जेक्ट्स से सीधे docstrings पार्स कर सकता है, जिसमें कक्षाएं और मॉड्यूल शामिल हैं, विशेषता docstrings को संरचित प्रतिनिधित्व में शामिल करते हुए।
65+
- **कस्टम रेंडरिंग शैलियाँ:** कॉम्पैक्ट या विस्तृत शैलियों के साथ docstrings के रेंडरिंग को कस्टमाइज़ करें, और उत्पन्न docstring टेक्स्ट के लिए कस्टम इंडेंटेशन निर्दिष्ट करें।
66+
67+
## docstring_parser के संबंध में संशोधित चीजें
68+
69+
1. Docstring शैली का पता लगाने के लिए बेहतर heuristics
70+
2. Google Docstring को Notes, Examples को समायोजित करने के लिए संशोधित किया गया है
71+
3. कभी-कभी GoogleDoc string में उचित इंडेंटेशन नहीं होता है, विशेष रूप से जब LLMs जैसे GPT या Mistral से उत्पन्न किया जाता है। PyDocSmith उन खराब docstrings को ठीक कर सकता है।
72+
4. विभिन्न शैलियों के GoogleDocstring को समायोजित करने के लिए अतिरिक्त टेस्ट-केस जोड़े गए
73+
74+
मैंने इसे उपयोग के मामले के आधार पर अपडेट किया है - https://www.penify.dev
75+
76+
## योगदान
77+
78+
योगदान स्वागत योग्य हैं! कृपया परियोजना के GitHub पेज पर पुल अनुरोध सबमिट करें या मुद्दे रिपोर्ट करें।

README-ja.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
このプロジェクトは元のプロジェクトのフォークです - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
# PyDocSmith
6+
7+
PyDocSmith は、さまざまなスタイルの docstrings を解析、検出、作成するために設計された多用途の Python パッケージです。reStructuredText (reST)、Google、NumPydoc、Epydoc などの複数の docstring 規約をサポートし、Python 開発者向けのドキュメント実践に柔軟性を提供します。
8+
9+
## 機能
10+
11+
- **Docstring スタイル検出:** シンプルなヒューリスティックを使用して docstrings のスタイル(例: reST、Google、NumPydoc、Epydoc)を自動的に検出します。
12+
- **Docstring 解析:** docstrings を構造化表現に変換し、ドキュメントの分析と操作を容易にします。
13+
- **Docstring 作成:** 構造化された docstrings をテキストにレンダリングし、自動生成と変更を可能にします。
14+
- **属性 Docstrings:** クラスおよびモジュールレベルで定義された属性 docstrings を解析し、クラスプロパティとモジュールレベル変数のドキュメントを強化します。
15+
16+
## インストール
17+
18+
```bash
19+
pip install PyDocSmith
20+
```
21+
22+
## 使用方法
23+
24+
### Docstring スタイル検出
25+
26+
与えられたテキストの docstring スタイルを検出します:
27+
28+
```python
29+
from PyDocSmith import detect_docstring_style, DocstringStyle
30+
31+
docstring = """
32+
This is an example docstring.
33+
:param param1: Description of param1
34+
:return: Description of return value
35+
"""
36+
style = detect_docstring_style(docstring)
37+
print(style) # Outputs: DocstringStyle.EPYDOC
38+
```
39+
40+
### Docstrings 解析
41+
42+
docstring をそのコンポーネントに解析します:
43+
44+
```python
45+
from PyDocSmith import parse, DocstringStyle
46+
47+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
48+
print(parsed_docstring)
49+
```
50+
51+
### Docstrings 作成
52+
53+
解析された docstring をテキストにレンダリングします:
54+
55+
```python
56+
from PyDocSmith import compose
57+
58+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
59+
print(docstring_text)
60+
```
61+
62+
## 高度な機能
63+
64+
- **オブジェクトから解析:** PyDocSmith は、クラスやモジュールを含む Python オブジェクトから直接 docstrings を解析し、属性 docstrings を構造化表現に組み込むことができます。
65+
- **カスタムレンダリングスタイル:** コンパクトまたは詳細なスタイルで docstrings のレンダリングをカスタマイズし、生成された docstring テキストのカスタムインデントを指定します。
66+
67+
## docstring_parser に関して変更されたもの
68+
69+
1. Docstring スタイル検出のためのより良いヒューリスティック
70+
2. Google Docstring は Notes、Examples を収容するために変更されました
71+
3. 時々 GoogleDoc string は適切なインデントを持たず、特に GPT や Mistral などの LLMs から生成された場合。PyDocSmith はこれらの悪い docstrings を修正できます。
72+
4. さまざまなスタイルの GoogleDocstring を収容するために追加のテストケースが追加されました
73+
74+
私はこれを - https://www.penify.dev の使用ケースに基づいて更新しました
75+
76+
## 貢献
77+
78+
貢献を歓迎します!プロジェクトの GitHub ページでプルリクエストを送信するか、問題を報告してください。

README-ru.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Проект является форком оригинального проекта - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
# PyDocSmith
6+
7+
PyDocSmith - это универсальный пакет Python, предназначенный для анализа, обнаружения и составления docstrings в различных стилях. Он поддерживает несколько соглашений о docstrings, включая reStructuredText (reST), Google, NumPydoc и Epydoc, обеспечивая гибкость в практиках документирования для разработчиков Python.
8+
9+
## Особенности
10+
11+
- **Обнаружение стиля docstring:** Автоматически обнаруживать стиль docstrings (например, reST, Google, NumPydoc, Epydoc) с использованием простых эвристик.
12+
- **Анализ docstrings:** Преобразовывать docstrings в структурированные представления, облегчая анализ и манипуляцию документацией.
13+
- **Составление docstrings:** Рендерить структурированные docstrings обратно в текст, позволяя автоматизированное создание и модификацию docstrings.
14+
- **Docstrings атрибутов:** Анализировать docstrings атрибутов, определенные на уровне классов и модулей, улучшая документацию свойств классов и переменных уровня модуля.
15+
16+
## Установка
17+
18+
```bash
19+
pip install PyDocSmith
20+
```
21+
22+
## Использование
23+
24+
### Обнаружение стиля docstring
25+
26+
Обнаружить стиль docstring данного текста:
27+
28+
```python
29+
from PyDocSmith import detect_docstring_style, DocstringStyle
30+
31+
docstring = """
32+
This is an example docstring.
33+
:param param1: Description of param1
34+
:return: Description of return value
35+
"""
36+
style = detect_docstring_style(docstring)
37+
print(style) # Outputs: DocstringStyle.EPYDOC
38+
```
39+
40+
### Анализ docstrings
41+
42+
Анализировать docstring на его компоненты:
43+
44+
```python
45+
from PyDocSmith import parse, DocstringStyle
46+
47+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
48+
print(parsed_docstring)
49+
```
50+
51+
### Составление docstrings
52+
53+
Рендерить проанализированный docstring обратно в текст:
54+
55+
```python
56+
from PyDocSmith import compose
57+
58+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
59+
print(docstring_text)
60+
```
61+
62+
## Продвинутые особенности
63+
64+
- **Анализ из объекта:** PyDocSmith может анализировать docstrings непосредственно из объектов Python, включая классы и модули, включая docstrings атрибутов в структурированное представление.
65+
- **Пользовательские стили рендеринга:** Настраивать рендеринг docstrings с компактными или детализированными стилями и указывать пользовательский отступ для генерируемого текста docstring.
66+
67+
## Вещи, которые были изменены по сравнению с docstring_parser
68+
69+
1. Лучшие эвристики для обнаружения стиля docstring
70+
2. Google Docstring был изменен для размещения Notes, Examples
71+
3. Иногда GoogleDoc string не имеет правильного отступа, особенно когда генерируется из LLMs вроде GPT или Mistral. PyDocSmith может исправить эти плохие docstrings.
72+
4. Дополнительные тестовые случаи были добавлены для размещения различных стилей GoogleDocstring
73+
74+
Я обновил его на основе случая использования для - https://www.penify.dev
75+
76+
## Вклад
77+
78+
Вклады приветствуются! Пожалуйста, отправляйте pull requests или сообщайте о проблемах на странице проекта GitHub.

0 commit comments

Comments
 (0)