Skip to content

Commit c9bdb1e

Browse files
author
Coding Agent
committed
Can you add readme in hindi, russion, french, span...
1 parent 3303ef5 commit c9bdb1e

File tree

6 files changed

+468
-0
lines changed

6 files changed

+468
-0
lines changed

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:** Detecta automáticamente el estilo de los docstrings (por ejemplo, reST, Google, NumPydoc, Epydoc) utilizando heurísticas simples.
12+
- **Análisis de Docstrings:** Convierte docstrings en representaciones estructuradas, facilitando el análisis y manipulación de la documentación.
13+
- **Composición de Docstrings:** Renderiza docstrings estructurados de vuelta a texto, permitiendo la generación y modificación automatizada de docstrings.
14+
- **Docstrings de Atributos:** Analiza 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+
Detecta el estilo de docstring de un texto dado:
27+
28+
```python
29+
from PyDocSmith import detect_docstring_style, DocstringStyle
30+
31+
docstring = """
32+
Este es un ejemplo de docstring.
33+
:param param1: Descripción de param1
34+
:return: Descripción del valor de retorno
35+
"""
36+
style = detect_docstring_style(docstring)
37+
print(style) # Salidas: DocstringStyle.EPYDOC
38+
```
39+
40+
### Análisis de Docstrings
41+
42+
Analiza un 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+
Renderiza un docstring analizado 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:** Personaliza el renderizado de docstrings con estilos compactos o detallados, y especifica 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. El Docstring de Google ha sido modificado para acomodar Notas, Ejemplos
71+
3. A veces el string de GoogleDoc no tiene una indentación adecuada especialmente cuando se genera desde LLMs como GPT o Mistral. PyDocSmith puede arreglar esos docstrings malos.
72+
4. Se agregaron casos de prueba adicionales para acomodar un estilo diferente de GoogleDocstring
73+
74+
He actualizado basado en el caso de uso para - https://www.penify.dev
75+
76+
## Contribuyendo
77+
78+
¡Las contribuciones son bienvenidas! Por favor envía pull requests o reporta 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étecte automatiquement le style des docstrings (par exemple, reST, Google, NumPydoc, Epydoc) en utilisant des heuristiques simples.
12+
- **Analyse des docstrings :** Convertit les docstrings en représentations structurées, facilitant l'analyse et la manipulation de la documentation.
13+
- **Composition des docstrings :** Rend les docstrings structurées sous forme de texte, permettant la génération et la modification automatisées des docstrings.
14+
- **Docstrings d'attributs :** Analyse 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 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étecte 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+
Analyse 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+
Rend une docstring analysée sous forme de 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 à partir d'un objet :** PyDocSmith peut analyser les docstrings directement à partir d'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 :** Personnalise le rendu des docstrings avec des styles compacts ou détaillés, et spécifie 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. Le docstring Google a été modifié pour accueillir les Notes, les Exemples
71+
3. Parfois, le docstring Google n'a pas une indentation correcte, 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 un style différent de GoogleDocstring
73+
74+
Je l'ai mis à jour en fonction du cas d'usage 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 एक बहुमुखी Python पैकेज है जो विभिन्न शैलियों में डॉकस्ट्रिंग्स को पार्स करने, पता लगाने और रचना करने के लिए डिज़ाइन किया गया है। यह reStructuredText (reST), Google, NumPydoc, और Epydoc सहित कई डॉकस्ट्रिंग सम्मेलनों का समर्थन करता है, जो Python डेवलपर्स के लिए दस्तावेजीकरण प्रथाओं में लचीलापन प्रदान करता है।
8+
9+
## विशेषताएँ
10+
11+
- **Docstring Style Detection:** सरल ह्यूरिस्टिक्स का उपयोग करके डॉकस्ट्रिंग्स की शैली (जैसे, reST, Google, NumPydoc, Epydoc) को स्वचालित रूप से पता लगाएं।
12+
- **Docstring Parsing:** डॉकस्ट्रिंग्स को संरचित प्रतिनिधित्व में परिवर्तित करें, जिससे दस्तावेजीकरण का विश्लेषण और हेरफेर करना आसान हो जाता है।
13+
- **Docstring Composition:** संरचित डॉकस्ट्रिंग्स को वापस टेक्स्ट में रेंडर करें, जिससे स्वचालित डॉकस्ट्रिंग जनरेशन और संशोधन की अनुमति मिलती है।
14+
- **Attribute Docstrings:** क्लास और मॉड्यूल स्तर पर परिभाषित एट्रिब्यूट डॉकस्ट्रिंग्स को पार्स करें, क्लास प्रॉपर्टीज और मॉड्यूल-स्तरीय वेरिएबल्स के दस्तावेजीकरण को बढ़ाते हुए।
15+
16+
## इंस्टॉलेशन
17+
18+
```bash
19+
pip install PyDocSmith
20+
```
21+
22+
## उपयोग
23+
24+
### Detecting Docstring Style
25+
26+
दिए गए टेक्स्ट की डॉकस्ट्रिंग शैली का पता लगाएं:
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) # आउटपुट: DocstringStyle.EPYDOC
38+
```
39+
40+
### Parsing Docstrings
41+
42+
एक डॉकस्ट्रिंग को उसके घटकों में पार्स करें:
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+
### Composing Docstrings
52+
53+
एक पार्स की गई डॉकस्ट्रिंग को वापस टेक्स्ट में रेंडर करें:
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+
- **Parse From Object:** PyDocSmith Python ऑब्जेक्ट्स से सीधे डॉकस्ट्रिंग्स को पार्स कर सकता है, जिसमें क्लासेस और मॉड्यूल्स शामिल हैं, संरचित प्रतिनिधित्व में एट्रिब्यूट डॉकस्ट्रिंग्स को शामिल करते हुए।
65+
- **Custom Rendering Styles:** कॉम्पैक्ट या डिटेल्ड शैलियों के साथ डॉकस्ट्रिंग्स के रेंडरिंग को कस्टमाइज़ करें, और जनरेटेड डॉकस्ट्रिंग टेक्स्ट के लिए कस्टम इंडेंटेशन निर्दिष्ट करें।
66+
67+
## docstring_parser के संबंध में जो चीजें संशोधित की गई हैं
68+
69+
1. डॉकस्ट्रिंग शैली का पता लगाने के लिए बेहतर ह्यूरिस्टिक्स
70+
2. Google Docstring को Notes, Examples को समायोजित करने के लिए संशोधित किया गया है
71+
3. कभी-कभी GoogleDoc स्ट्रिंग में विशेष रूप से जब LLMs जैसे GPT या Mistral से जनरेट किया जाता है तो उचित इंडेंटेशन नहीं होता। PyDocSmith उन खराब डॉकस्ट्रिंग्स को ठीक कर सकता है।
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 は、さまざまなスタイルの docstring を解析、検出、作成するための多用途の Python パッケージです。reStructuredText (reST)、Google、NumPydoc、Epydoc などの複数の docstring 規約をサポートし、Python 開発者のドキュメント作成に柔軟性を提供します。
8+
9+
## 機能
10+
11+
- **Docstring スタイル検出:** シンプルなヒューリスティックを使用して、docstring のスタイル(例: reST、Google、NumPydoc、Epydoc)を自動的に検出します。
12+
- **Docstring 解析:** docstring を構造化された表現に変換し、ドキュメントの分析と操作を容易にします。
13+
- **Docstring 作成:** 構造化された docstring をテキストに戻してレンダリングし、自動化された docstring の生成と修正を可能にします。
14+
- **属性 Docstring:** クラスおよびモジュールレベルで定義された属性 docstring を解析し、クラスプロパティとモジュールレベル変数のドキュメントを強化します。
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) # 出力: DocstringStyle.EPYDOC
38+
```
39+
40+
### Docstring の解析
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+
### Docstring の作成
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 オブジェクトから直接 docstring を解析し、属性 docstring を構造化された表現に組み込むことができます。
65+
- **カスタムレンダリングスタイル:** コンパクトまたは詳細なスタイルで docstring のレンダリングをカスタマイズし、生成された docstring テキストのカスタムインデントを指定できます。
66+
67+
## docstring_parser に対して変更された点
68+
69+
1. docstring スタイルを検出するためのより良いヒューリスティック
70+
2. Google Docstring が Notes、Examples を収容するように変更されました
71+
3. GoogleDoc string は、特に GPT や Mistral のような LLM から生成された場合、適切なインデントを持たないことがあります。PyDocSmith はそれらの不良 docstring を修正できます。
72+
4. GoogleDocstring の異なるスタイルに対応するために追加のテストケースが追加されました
73+
74+
私は https://www.penify.dev のユースケースに基づいて更新しました
75+
76+
## 貢献
77+
78+
貢献は歓迎します!プロジェクトの GitHub ページでプルリクエストを送信するか、問題を報告してください。

0 commit comments

Comments
 (0)