Skip to content

Commit 63179a7

Browse files
author
Coding Agent
committed
Can you add readme in hindi, russion, french, span...
1 parent b37710d commit 63179a7

6 files changed

Lines changed: 510 additions & 0 deletions

File tree

README.es.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
13+
- **Análisis de docstrings:** Convertir docstrings en representaciones estructuradas, facilitando el análisis y manipulación de la documentación.
14+
15+
- **Composición de docstrings:** Renderizar docstrings estructuradas de vuelta a texto, permitiendo la generación y modificación automatizada de docstrings.
16+
17+
- **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.
18+
19+
## Instalación
20+
21+
```bash
22+
pip install PyDocSmith
23+
```
24+
25+
## Uso
26+
27+
### Detección de estilo de docstring
28+
29+
Detectar el estilo de docstring de un texto dado:
30+
31+
```python
32+
from PyDocSmith import detect_docstring_style, DocstringStyle
33+
34+
docstring = """
35+
This is an example docstring.
36+
:param param1: Description of param1
37+
:return: Description of return value
38+
"""
39+
style = detect_docstring_style(docstring)
40+
print(style) # Outputs: DocstringStyle.EPYDOC
41+
```
42+
43+
### Análisis de docstrings
44+
45+
Analizar una docstring en sus componentes:
46+
47+
```python
48+
from PyDocSmith import parse, DocstringStyle
49+
50+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
51+
print(parsed_docstring)
52+
```
53+
54+
### Composición de docstrings
55+
56+
Renderizar una docstring analizada de vuelta a texto:
57+
58+
```python
59+
from PyDocSmith import compose
60+
61+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
62+
print(docstring_text)
63+
```
64+
65+
## Características avanzadas
66+
67+
- **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.
68+
69+
- **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.
70+
71+
## Cosas que han sido modificadas con respecto a docstring_parser
72+
73+
1. Mejores heurísticas para detectar el estilo de docstring
74+
75+
2. Google Docstring ha sido modificado para acomodar Notas, Ejemplos
76+
77+
3. A veces GoogleDoc string no tiene la indentación adecuada, especialmente cuando se genera desde LLMs como GPT o Mistral. PyDocSmith puede corregir esas malas docstrings.
78+
79+
4. Casos de prueba adicionales fueron añadidos para acomodar un estilo diferente de GoogleDocstring
80+
81+
He actualizado esto basado en el caso de uso para - https://www.penify.dev
82+
83+
## Contribución
84+
85+
¡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: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
13+
- **Analyse des docstrings :** Convertir les docstrings en représentations structurées, facilitant l'analyse et la manipulation de la documentation.
14+
15+
- **Composition des docstrings :** Rendre les docstrings structurées en texte, permettant la génération et la modification automatisées des docstrings.
16+
17+
- **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.
18+
19+
## Installation
20+
21+
```bash
22+
pip install PyDocSmith
23+
```
24+
25+
## Utilisation
26+
27+
### Détection du style de docstring
28+
29+
Détecter le style de docstring d'un texte donné :
30+
31+
```python
32+
from PyDocSmith import detect_docstring_style, DocstringStyle
33+
34+
docstring = """
35+
This is an example docstring.
36+
:param param1: Description of param1
37+
:return: Description of return value
38+
"""
39+
style = detect_docstring_style(docstring)
40+
print(style) # Outputs: DocstringStyle.EPYDOC
41+
```
42+
43+
### Analyse des docstrings
44+
45+
Analyser une docstring en ses composants :
46+
47+
```python
48+
from PyDocSmith import parse, DocstringStyle
49+
50+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
51+
print(parsed_docstring)
52+
```
53+
54+
### Composition des docstrings
55+
56+
Rendre une docstring analysée en texte :
57+
58+
```python
59+
from PyDocSmith import compose
60+
61+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
62+
print(docstring_text)
63+
```
64+
65+
## Fonctionnalités avancées
66+
67+
- **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.
68+
69+
- **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é.
70+
71+
## Choses qui ont été modifiées par rapport à docstring_parser
72+
73+
1. Meilleures heuristiques pour détecter le style de docstring
74+
75+
2. Google Docstring a été modifié pour accueillir Notes, Examples
76+
77+
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.
78+
79+
4. Des cas de test supplémentaires ont été ajoutés pour accueillir un style différent de GoogleDocstring
80+
81+
J'ai mis à jour cela basé sur le cas d'utilisation pour - https://www.penify.dev
82+
83+
## Contribution
84+
85+
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: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
यह परियोजना मूल परियोजना से एक फोर्क है - https://github.com/rr-/docstring_parser/
2+
3+
4+
5+
# PyDocSmith
6+
7+
PyDocSmith एक बहुमुखी Python पैकेज है जो विभिन्न शैलियों में डॉकस्ट्रिंग्स को पार्स करने, पता लगाने और रचना करने के लिए डिज़ाइन किया गया है। यह reStructuredText (reST), Google, NumPydoc, और Epydoc सहित कई डॉकस्ट्रिंग सम्मेलनों का समर्थन करता है, जो Python डेवलपर्स के लिए दस्तावेजीकरण प्रथाओं में लचीलापन प्रदान करता है।
8+
9+
## विशेषताएँ
10+
11+
- **डॉकस्ट्रिंग शैली का पता लगाना:** सरल ह्यूरिस्टिक्स का उपयोग करके डॉकस्ट्रिंग्स की शैली (जैसे, reST, Google, NumPydoc, Epydoc) को स्वचालित रूप से पता लगाएं।
12+
13+
- **डॉकस्ट्रिंग पार्सिंग:** डॉकस्ट्रिंग्स को संरचित प्रतिनिधित्व में परिवर्तित करें, जिससे दस्तावेजीकरण का विश्लेषण और हेरफेर करना आसान हो जाए।
14+
15+
- **डॉकस्ट्रिंग रचना:** संरचित डॉकस्ट्रिंग्स को वापस टेक्स्ट में रेंडर करें, जिससे स्वचालित डॉकस्ट्रिंग पीढ़ी और संशोधन की अनुमति मिले।
16+
17+
- **विशेषता डॉकस्ट्रिंग्स:** कक्षा और मॉड्यूल स्तर पर परिभाषित विशेषता डॉकस्ट्रिंग्स को पार्स करें, कक्षा गुणों और मॉड्यूल-स्तरीय चरों के दस्तावेजीकरण को बढ़ाएं।
18+
19+
## स्थापना
20+
21+
```bash
22+
pip install PyDocSmith
23+
```
24+
25+
## उपयोग
26+
27+
### डॉकस्ट्रिंग शैली का पता लगाना
28+
29+
किसी दिए गए टेक्स्ट की डॉकस्ट्रिंग शैली का पता लगाएं:
30+
31+
```python
32+
from PyDocSmith import detect_docstring_style, DocstringStyle
33+
34+
docstring = """
35+
This is an example docstring.
36+
:param param1: Description of param1
37+
:return: Description of return value
38+
"""
39+
style = detect_docstring_style(docstring)
40+
print(style) # Outputs: DocstringStyle.EPYDOC
41+
```
42+
43+
### डॉकस्ट्रिंग पार्स करना
44+
45+
एक डॉकस्ट्रिंग को उसके घटकों में पार्स करें:
46+
47+
```python
48+
from PyDocSmith import parse, DocstringStyle
49+
50+
parsed_docstring = parse(docstring, style=DocstringStyle.AUTO)
51+
print(parsed_docstring)
52+
```
53+
54+
### डॉकस्ट्रिंग रचना करना
55+
56+
एक पार्स किए गए डॉकस्ट्रिंग को वापस टेक्स्ट में रेंडर करें:
57+
58+
```python
59+
from PyDocSmith import compose
60+
61+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
62+
print(docstring_text)
63+
```
64+
65+
## उन्नत विशेषताएँ
66+
67+
- **ऑब्जेक्ट से पार्स करें:** PyDocSmith कक्षाओं और मॉड्यूलों सहित Python ऑब्जेक्ट्स से सीधे डॉकस्ट्रिंग्स पार्स कर सकता है, विशेषता डॉकस्ट्रिंग्स को संरचित प्रतिनिधित्व में शामिल करता है।
68+
69+
- **कस्टम रेंडरिंग शैलियाँ:** कॉम्पैक्ट या विस्तृत शैलियों के साथ डॉकस्ट्रिंग्स के रेंडरिंग को कस्टमाइज़ करें, और उत्पन्न डॉकस्ट्रिंग टेक्स्ट के लिए कस्टम इंडेंटेशन निर्दिष्ट करें।
70+
71+
## docstring_parser के संबंध में जो चीजें संशोधित की गई हैं
72+
73+
1. डॉकस्ट्रिंग शैली का पता लगाने के लिए बेहतर ह्यूरिस्टिक्स
74+
75+
2. Google डॉकस्ट्रिंग को नोट्स, उदाहरणों को समायोजित करने के लिए संशोधित किया गया है
76+
77+
3. कभी-कभी GoogleDoc स्ट्रिंग में विशेष रूप से जब LLMs जैसे GPT या Mistral से उत्पन्न होती है तो उचित इंडेंटेशन नहीं होती। PyDocSmith उन खराब डॉकस्ट्रिंग्स को ठीक कर सकता है।
78+
79+
4. GoogleDocstring की एक अलग शैली को समायोजित करने के लिए अतिरिक्त टेस्ट-केस जोड़े गए
80+
81+
मैंने इसे उपयोग के मामले के आधार पर अपडेट किया है - https://www.penify.dev
82+
83+
## योगदान
84+
85+
योगदान स्वागत योग्य हैं! कृपया परियोजना के GitHub पेज पर पुल अनुरोध सबमिट करें या मुद्दे रिपोर्ट करें।

README.ja.md

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

0 commit comments

Comments
 (0)