Skip to content

Commit d7244b0

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

6 files changed

Lines changed: 456 additions & 0 deletions

File tree

README.es.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
El proyecto es un fork del proyecto original - https://github.com/rr-/docstring_parser/
2+
3+
# PyDocSmith
4+
5+
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.
6+
7+
## Features
8+
9+
- **Docstring Style Detection:** Detectar automáticamente el estilo de los docstrings (por ejemplo, reST, Google, NumPydoc, Epydoc) usando heurísticas simples.
10+
- **Docstring Parsing:** Convertir docstrings en representaciones estructuradas, facilitando el análisis y manipulación de la documentación.
11+
- **Docstring Composition:** Renderizar docstrings estructuradas de vuelta a texto, permitiendo la generación y modificación automatizada de docstrings.
12+
- **Attribute Docstrings:** 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.
13+
14+
## Installation
15+
16+
```bash
17+
pip install PyDocSmith
18+
```
19+
20+
## Usage
21+
22+
### Detecting Docstring Style
23+
24+
Detectar el estilo de docstring de un texto dado:
25+
26+
```python
27+
from PyDocSmith import detect_docstring_style, DocstringStyle
28+
29+
docstring = """
30+
This is an example docstring.
31+
:param param1: Description of param1
32+
:return: Description of return value
33+
"""
34+
style = detect_docstring_style(docstring)
35+
print(style) # Outputs: DocstringStyle.EPYDOC
36+
```
37+
38+
### Parsing Docstrings
39+
40+
Analizar un docstring en sus componentes:
41+
42+
```python
43+
from PyDocSmith import parse, DocstringStyle
44+
45+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
46+
print(parsed_docstring)
47+
```
48+
49+
### Composing Docstrings
50+
51+
Renderizar un docstring analizado de vuelta a texto:
52+
53+
```python
54+
from PyDocSmith import compose
55+
56+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
57+
print(docstring_text)
58+
```
59+
60+
## Advanced Features
61+
62+
- **Parse From Object:** PyDocSmith puede analizar docstrings directamente desde objetos Python, incluyendo clases y módulos, incorporando docstrings de atributos en la representación estructurada.
63+
- **Custom Rendering Styles:** Personalizar el renderizado de docstrings con estilos compactos o detallados, y especificar indentación personalizada para el texto de docstring generado.
64+
65+
## Things that have been modified wrt to docstring_parser
66+
67+
1. Mejores heurísticas para detectar el estilo de docstring
68+
2. Google Docstring ha sido modificado para acomodar Notes, Examples
69+
3. A veces la cadena GoogleDoc no tiene indentación apropiada, especialmente cuando se genera desde LLMs como GPT o Mistral. PyDocSmith puede corregir esas malas docstrings.
70+
4. Casos de prueba adicionales fueron añadidos para acomodar un estilo diferente de GoogleDocstring
71+
72+
He actualizado esto basado en el caso de uso para - https://www.penify.dev
73+
74+
## Contributing
75+
76+
¡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: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Ce projet est un fork du projet original - https://github.com/rr-/docstring_parser/
2+
3+
# PyDocSmith
4+
5+
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.
6+
7+
## Features
8+
9+
- **Docstring Style Detection:** Détecter automatiquement le style des docstrings (par exemple, reST, Google, NumPydoc, Epydoc) en utilisant des heuristiques simples.
10+
- **Docstring Parsing:** Convertir les docstrings en représentations structurées, facilitant l'analyse et la manipulation de la documentation.
11+
- **Docstring Composition:** Rendre les docstrings structurées en texte, permettant la génération et la modification automatisées des docstrings.
12+
- **Attribute Docstrings:** 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.
13+
14+
## Installation
15+
16+
```bash
17+
pip install PyDocSmith
18+
```
19+
20+
## Usage
21+
22+
### Detecting Docstring Style
23+
24+
Détecter le style de docstring d'un texte donné:
25+
26+
```python
27+
from PyDocSmith import detect_docstring_style, DocstringStyle
28+
29+
docstring = """
30+
This is an example docstring.
31+
:param param1: Description of param1
32+
:return: Description of return value
33+
"""
34+
style = detect_docstring_style(docstring)
35+
print(style) # Outputs: DocstringStyle.EPYDOC
36+
```
37+
38+
### Parsing Docstrings
39+
40+
Analyser une docstring en ses composants:
41+
42+
```python
43+
from PyDocSmith import parse, DocstringStyle
44+
45+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
46+
print(parsed_docstring)
47+
```
48+
49+
### Composing Docstrings
50+
51+
Rendre une docstring analysée en texte:
52+
53+
```python
54+
from PyDocSmith import compose
55+
56+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
57+
print(docstring_text)
58+
```
59+
60+
## Advanced Features
61+
62+
- **Parse From Object:** PyDocSmith peut analyser les docstrings directement à partir d'objets Python, y compris les classes et les modules, incorporant les docstrings d'attributs dans la représentation structurée.
63+
- **Custom Rendering Styles:** 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é.
64+
65+
## Things that have been modified wrt to docstring_parser
66+
67+
1. Meilleures heuristiques pour détecter le style de docstring
68+
2. Google Docstring a été modifié pour accueillir Notes, Examples
69+
3. Parfois, la chaîne GoogleDoc n'a pas une indentation appropriée, surtout lorsqu'elle est générée à partir de LLMs comme GPT ou Mistral. PyDocSmith peut corriger ces mauvaises docstrings.
70+
4. Des cas de test supplémentaires ont été ajoutés pour accueillir un style différent de GoogleDocstring
71+
72+
J'ai mis à jour cela basé sur le cas d'utilisation pour - https://www.penify.dev
73+
74+
## Contributing
75+
76+
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: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
यह परियोजना मूल परियोजना से एक फोर्क है - https://github.com/rr-/docstring_parser/
2+
3+
# PyDocSmith
4+
5+
PyDocSmith एक बहुमुखी Python पैकेज है जिसे विभिन्न शैलियों में डॉकस्ट्रिंग को पार्स करने, पता लगाने और रचना करने के लिए डिज़ाइन किया गया है। यह reStructuredText (reST), Google, NumPydoc, और Epydoc सहित कई डॉकस्ट्रिंग सम्मेलनों का समर्थन करता है, जो Python डेवलपर्स के लिए दस्तावेज़ीकरण प्रथाओं में लचीलापन प्रदान करता है।
6+
7+
## Features
8+
9+
- **Docstring Style Detection:** सरल ह्यूरिस्टिक्स का उपयोग करके डॉकस्ट्रिंग की शैली (जैसे, reST, Google, NumPydoc, Epydoc) को स्वचालित रूप से पता लगाएं।
10+
- **Docstring Parsing:** डॉकस्ट्रिंग को संरचित प्रतिनिधित्व में परिवर्तित करें, जिससे दस्तावेज़ीकरण का विश्लेषण और हेरफेर करना आसान हो जाता है।
11+
- **Docstring Composition:** संरचित डॉकस्ट्रिंग को वापस टेक्स्ट में रेंडर करें, जिससे स्वचालित डॉकस्ट्रिंग पीढ़ी और संशोधन की अनुमति मिलती है।
12+
- **Attribute Docstrings:** क्लास और मॉड्यूल स्तर पर परिभाषित विशेषता डॉकस्ट्रिंग को पार्स करें, क्लास गुणों और मॉड्यूल-स्तरीय चर के दस्तावेज़ीकरण को बढ़ाते हुए।
13+
14+
## Installation
15+
16+
```bash
17+
pip install PyDocSmith
18+
```
19+
20+
## Usage
21+
22+
### Detecting Docstring Style
23+
24+
किसी दिए गए टेक्स्ट की डॉकस्ट्रिंग शैली का पता लगाएं:
25+
26+
```python
27+
from PyDocSmith import detect_docstring_style, DocstringStyle
28+
29+
docstring = """
30+
This is an example docstring.
31+
:param param1: Description of param1
32+
:return: Description of return value
33+
"""
34+
style = detect_docstring_style(docstring)
35+
print(style) # Outputs: DocstringStyle.EPYDOC
36+
```
37+
38+
### Parsing Docstrings
39+
40+
एक डॉकस्ट्रिंग को उसके घटकों में पार्स करें:
41+
42+
```python
43+
from PyDocSmith import parse, DocstringStyle
44+
45+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
46+
print(parsed_docstring)
47+
```
48+
49+
### Composing Docstrings
50+
51+
एक पार्स की गई डॉकस्ट्रिंग को वापस टेक्स्ट में रेंडर करें:
52+
53+
```python
54+
from PyDocSmith import compose
55+
56+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
57+
print(docstring_text)
58+
```
59+
60+
## Advanced Features
61+
62+
- **Parse From Object:** PyDocSmith Python ऑब्जेक्ट्स से सीधे डॉकस्ट्रिंग पार्स कर सकता है, जिसमें क्लासेस और मॉड्यूल्स शामिल हैं, विशेषता डॉकस्ट्रिंग को संरचित प्रतिनिधित्व में शामिल करते हुए।
63+
- **Custom Rendering Styles:** कॉम्पैक्ट या विस्तृत शैलियों के साथ डॉकस्ट्रिंग के रेंडरिंग को अनुकूलित करें, और उत्पन्न डॉकस्ट्रिंग टेक्स्ट के लिए कस्टम इंडेंटेशन निर्दिष्ट करें।
64+
65+
## Things that have been modified wrt to docstring_parser
66+
67+
1. डॉकस्ट्रिंग शैली का पता लगाने के लिए बेहतर ह्यूरिस्टिक्स
68+
2. Google Docstring को Notes, Examples को समायोजित करने के लिए संशोधित किया गया है
69+
3. कभी-कभी GoogleDoc स्ट्रिंग में उचित इंडेंटेशन नहीं होता है, विशेष रूप से जब इसे LLMs जैसे GPT या Mistral से उत्पन्न किया जाता है। PyDocSmith उन खराब डॉकस्ट्रिंग को ठीक कर सकता है।
70+
4. GoogleDocstring की एक अलग शैली को समायोजित करने के लिए अतिरिक्त टेस्ट-केस जोड़े गए
71+
72+
मैंने इसे उपयोग के मामले के आधार पर अपडेट किया है - https://www.penify.dev
73+
74+
## Contributing
75+
76+
योगदान स्वागत योग्य हैं! कृपया परियोजना के GitHub पेज पर पुल रिक्वेस्ट सबमिट करें या मुद्दे रिपोर्ट करें।

README.ja.md

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

0 commit comments

Comments
 (0)