Skip to content

Commit f2d1c1a

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

6 files changed

Lines changed: 474 additions & 0 deletions

File tree

README-es.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
El proyecto es un fork del proyecto original - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
6+
# PyDocSmith
7+
8+
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 Python.
9+
10+
## Características
11+
12+
- **Detección de estilo de docstring:** Detectar automáticamente el estilo de los docstrings (por ejemplo, reST, Google, NumPydoc, Epydoc) utilizando heurísticas simples.
13+
- **Análisis de docstrings:** Convertir docstrings en representaciones estructuradas, facilitando el análisis y manipulación de la documentación.
14+
- **Composición de docstrings:** Renderizar docstrings estructuradas de vuelta a texto, permitiendo la generación y modificación automatizada de docstrings.
15+
- **Docstrings de atributos:** Analizar docstrings de atributos definidos en niveles de clase y módulo, mejorando la documentación de propiedades de clase y variables de nivel módulo.
16+
17+
## Instalación
18+
19+
```bash
20+
pip install PyDocSmith
21+
```
22+
23+
## Uso
24+
25+
### Detección de estilo de docstring
26+
27+
Detectar el estilo de docstring de un texto dado:
28+
29+
```python
30+
from PyDocSmith import detect_docstring_style, DocstringStyle
31+
32+
docstring = """
33+
This is an example docstring.
34+
:param param1: Description of param1
35+
:return: Description of return value
36+
"""
37+
style = detect_docstring_style(docstring)
38+
print(style) # Outputs: DocstringStyle.EPYDOC
39+
```
40+
41+
### Análisis de docstrings
42+
43+
Analizar un docstring en sus componentes:
44+
45+
```python
46+
from PyDocSmith import parse, DocstringStyle
47+
48+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
49+
print(parsed_docstring)
50+
```
51+
52+
### Composición de docstrings
53+
54+
Renderizar un docstring analizado de vuelta a texto:
55+
56+
```python
57+
from PyDocSmith import compose
58+
59+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
60+
print(docstring_text)
61+
```
62+
63+
## Características avanzadas
64+
65+
- **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.
66+
- **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.
67+
68+
## Cosas que han sido modificadas con respecto a docstring_parser
69+
70+
1. Mejores heurísticas para detectar el estilo de docstring
71+
2. Google Docstring ha sido modificado para acomodar Notes, Examples
72+
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.
73+
4. Se agregaron casos de prueba adicionales para acomodar un estilo diferente de GoogleDocstring
74+
75+
He actualizado esto basado en el caso de uso para - https://www.penify.dev
76+
77+
## Contribución
78+
79+
¡Las contribuciones son bienvenidas! Por favor, envíe pull requests o reporte problemas en la página GitHub del proyecto.

README-fr.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Le projet est un fork du projet original - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
6+
# PyDocSmith
7+
8+
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.
9+
10+
## Fonctionnalités
11+
12+
- **Détection du style de docstring :** Détecter automatiquement le style des docstrings (par exemple, reST, Google, NumPydoc, Epydoc) en utilisant des heuristiques simples.
13+
- **Analyse des docstrings :** Convertir les docstrings en représentations structurées, facilitant l'analyse et la manipulation de la documentation.
14+
- **Composition des docstrings :** Rendre les docstrings structurées en texte, permettant la génération et la modification automatisées des docstrings.
15+
- **Docstrings d'attributs :** Analyser les docstrings d'attributs définis aux niveaux de classe et de module, améliorant la documentation des propriétés de classe et des variables de niveau module.
16+
17+
## Installation
18+
19+
```bash
20+
pip install PyDocSmith
21+
```
22+
23+
## Utilisation
24+
25+
### Détection du style de docstring
26+
27+
Détecter le style de docstring d'un texte donné :
28+
29+
```python
30+
from PyDocSmith import detect_docstring_style, DocstringStyle
31+
32+
docstring = """
33+
This is an example docstring.
34+
:param param1: Description of param1
35+
:return: Description of return value
36+
"""
37+
style = detect_docstring_style(docstring)
38+
print(style) # Outputs: DocstringStyle.EPYDOC
39+
```
40+
41+
### Analyse des docstrings
42+
43+
Analyser une docstring en ses composants :
44+
45+
```python
46+
from PyDocSmith import parse, DocstringStyle
47+
48+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
49+
print(parsed_docstring)
50+
```
51+
52+
### Composition des docstrings
53+
54+
Rendre une docstring analysée en texte :
55+
56+
```python
57+
from PyDocSmith import compose
58+
59+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
60+
print(docstring_text)
61+
```
62+
63+
## Fonctionnalités avancées
64+
65+
- **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.
66+
- **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é.
67+
68+
## Choses qui ont été modifiées par rapport à docstring_parser
69+
70+
1. Meilleures heuristiques pour détecter le style de docstring
71+
2. Google Docstring a été modifié pour accueillir Notes, Examples
72+
3. Parfois, GoogleDoc string n'a pas la bonne indentation, surtout lorsqu'elle est générée à partir de LLMs comme GPT ou Mistral. PyDocSmith peut corriger ces mauvaises docstrings.
73+
4. Des cas de test supplémentaires ont été ajoutés pour accueillir un style différent de GoogleDocstring
74+
75+
J'ai mis à jour cela basé sur le cas d'utilisation pour - https://www.penify.dev
76+
77+
## Contribution
78+
79+
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: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
यह परियोजना मूल परियोजना से एक फोर्क है - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
6+
# PyDocSmith
7+
8+
PyDocSmith एक बहुमुखी Python पैकेज है जो विभिन्न शैलियों में डॉकस्ट्रिंग्स को पार्स करने, पता लगाने और रचने के लिए डिज़ाइन किया गया है। यह reStructuredText (reST), Google, NumPydoc, और Epydoc सहित कई डॉकस्ट्रिंग सम्मेलनों का समर्थन करता है, जो Python डेवलपर्स के लिए दस्तावेजीकरण प्रथाओं में लचीलापन प्रदान करता है।
9+
10+
## विशेषताएँ
11+
12+
- **डॉकस्ट्रिंग शैली का पता लगाना:** सरल अनुमानों का उपयोग करके डॉकस्ट्रिंग्स की शैली (जैसे, reST, Google, NumPydoc, Epydoc) को स्वचालित रूप से पता लगाएं।
13+
- **डॉकस्ट्रिंग पार्सिंग:** डॉकस्ट्रिंग्स को संरचित प्रतिनिधित्वों में परिवर्तित करें, जिससे दस्तावेजीकरण का विश्लेषण और हेरफेर करना आसान हो जाता है।
14+
- **डॉकस्ट्रिंग रचना:** संरचित डॉकस्ट्रिंग्स को वापस टेक्स्ट में रेंडर करें, जिससे स्वचालित डॉकस्ट्रिंग पीढ़ी और संशोधन की अनुमति मिलती है।
15+
- **विशेषता डॉकस्ट्रिंग्स:** कक्षा और मॉड्यूल स्तरों पर परिभाषित विशेषता डॉकस्ट्रिंग्स को पार्स करें, कक्षा गुणों और मॉड्यूल-स्तरीय चरों के दस्तावेजीकरण को बढ़ाएं।
16+
17+
## स्थापना
18+
19+
```bash
20+
pip install PyDocSmith
21+
```
22+
23+
## उपयोग
24+
25+
### डॉकस्ट्रिंग शैली का पता लगाना
26+
27+
किसी दिए गए टेक्स्ट की डॉकस्ट्रिंग शैली का पता लगाएं:
28+
29+
```python
30+
from PyDocSmith import detect_docstring_style, DocstringStyle
31+
32+
docstring = """
33+
This is an example docstring.
34+
:param param1: Description of param1
35+
:return: Description of return value
36+
"""
37+
style = detect_docstring_style(docstring)
38+
print(style) # Outputs: DocstringStyle.EPYDOC
39+
```
40+
41+
### डॉकस्ट्रिंग्स पार्स करना
42+
43+
एक डॉकस्ट्रिंग को उसके घटकों में पार्स करें:
44+
45+
```python
46+
from PyDocSmith import parse, DocstringStyle
47+
48+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
49+
print(parsed_docstring)
50+
```
51+
52+
### डॉकस्ट्रिंग्स रचना
53+
54+
एक पार्स की गई डॉकस्ट्रिंग को वापस टेक्स्ट में रेंडर करें:
55+
56+
```python
57+
from PyDocSmith import compose
58+
59+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
60+
print(docstring_text)
61+
```
62+
63+
## उन्नत विशेषताएँ
64+
65+
- **ऑब्जेक्ट से पार्स करें:** PyDocSmith Python ऑब्जेक्ट्स से सीधे डॉकस्ट्रिंग्स पार्स कर सकता है, जिसमें कक्षाएं और मॉड्यूल शामिल हैं, विशेषता डॉकस्ट्रिंग्स को संरचित प्रतिनिधित्व में शामिल करते हुए।
66+
- **कस्टम रेंडरिंग शैलियाँ:** कॉम्पैक्ट या विस्तृत शैलियों के साथ डॉकस्ट्रिंग्स के रेंडरिंग को कस्टमाइज़ करें, और उत्पन्न डॉकस्ट्रिंग टेक्स्ट के लिए कस्टम इंडेंटेशन निर्दिष्ट करें।
67+
68+
## docstring_parser के संबंध में संशोधित चीजें
69+
70+
1. डॉकस्ट्रिंग शैली का पता लगाने के लिए बेहतर अनुमान
71+
2. Google डॉकस्ट्रिंग को नोट्स, उदाहरणों को समायोजित करने के लिए संशोधित किया गया है
72+
3. कभी-कभी GoogleDoc स्ट्रिंग में विशेष रूप से जब LLMs जैसे GPT या Mistral से उत्पन्न होती है तो उचित इंडेंटेशन नहीं होती। PyDocSmith उन खराब डॉकस्ट्रिंग्स को ठीक कर सकता है।
73+
4. GoogleDocstring की एक अलग शैली को समायोजित करने के लिए अतिरिक्त परीक्षण-मामले जोड़े गए
74+
75+
मैंने इसे उपयोग के मामले के आधार पर अपडेट किया है - https://www.penify.dev
76+
77+
## योगदान
78+
79+
योगदान स्वागत योग्य हैं! कृपया परियोजना के GitHub पृष्ठ पर पुल अनुरोध सबमिट करें या मुद्दों की रिपोर्ट करें।

README-ja.md

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

0 commit comments

Comments
 (0)