docstring-generator-ext 1.0.1.post2__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: docstring_generator_ext
3
+ Version: 1.0.2
4
+ Summary: Generate Docstrings with type-hint information.
5
+ Author-email: FelixTheC <fberndt87@gmail.com>
6
+ Classifier: Environment :: Console
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Topic :: Utilities
9
+ Classifier: Topic :: Software Development :: Documentation
10
+ Classifier: Typing :: Typed
11
+ Requires-Python: >=3.13
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pybind11>=3.0.4
14
+
15
+ # Docstring Generator Extension
16
+
17
+ [![C++ Tests](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/cpp-tests.yml/badge.svg)](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/cpp-tests.yml)
18
+ [![Build Extension](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/check-build-ext.yml/badge.svg)](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/check-build-ext.yml)
19
+ [![PyPI version](https://img.shields.io/pypi/v/docstring_generator_ext.svg)](https://pypi.org/project/docstring_generator_ext/)
20
+ [![Python versions](https://img.shields.io/pypi/pyversions/docstring_generator_ext.svg)](https://pypi.org/project/docstring_generator_ext/)
21
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
22
+
23
+ `docstring_generator_ext` is a high-performance Python extension written in C++ (using pybind11) designed to automatically generate and inject docstrings into Python source files. It leverages Python's `ast` module to extract type-hint information and function signatures to create well-formatted docstrings in various styles.
24
+
25
+ ## Features
26
+
27
+ - **Automatic Docstring Injection**: Parses Python files and inserts docstrings for functions and methods.
28
+ - **Type-Hint Awareness**: Extracts type information from annotations and default values.
29
+ - **Multiple Styles**: Supports popular docstring formats:
30
+ - **reST** (reStructuredText)
31
+ - **Google** style
32
+ - **NumPy** style
33
+ - **High Performance**: Core logic implemented in C++ for fast processing.
34
+ - **Preserves Existing Content**: Can update existing docstrings while trying to preserve manually added descriptions (using a special `$` marker convention).
35
+
36
+ ## Installation
37
+
38
+ ### Prerequisites
39
+
40
+ - Python 3.13 or higher
41
+ - A C++ compiler with C++20 support (e.g., GCC, Clang, or MSVC)
42
+ - `pybind11`
43
+
44
+ ### Building from Source
45
+
46
+ 1. Clone the repository:
47
+ ```bash
48
+ git clone https://github.com/FelixTheC/docstring_generator_ext.git
49
+ cd docstring_generator_ext
50
+ ```
51
+
52
+ 2. Install the `build` package:
53
+ ```bash
54
+ pip install build
55
+ ```
56
+
57
+ 3. Build the package:
58
+ ```bash
59
+ python -m build
60
+ ```
61
+
62
+ 4. Install the built wheel:
63
+ ```bash
64
+ pip install dist/docstring_generator_ext-*.whl
65
+ ```
66
+
67
+ ## Usage
68
+
69
+ After installation, you can use the extension in your Python scripts:
70
+
71
+ ```python
72
+ import docstring_generator_ext
73
+
74
+ # Path to the Python file you want to process
75
+ file_path = "path/to/your_script.py"
76
+
77
+ # Choose a style: GOOGLE, NUMPY, or reST
78
+ style = docstring_generator_ext.DocstringFormatStyle.GOOGLE
79
+
80
+ # Generate and inject docstrings
81
+ docstring_generator_ext.parse_file(file_path, style)
82
+ ```
83
+
84
+ ### Docstring Styles
85
+
86
+ The extension provides an enum `DocstringFormatStyle` to choose the desired output:
87
+
88
+ - `docstring_generator_ext.DocstringFormatStyle.reST`
89
+ - `docstring_generator_ext.DocstringFormatStyle.GOOGLE`
90
+ - `docstring_generator_ext.DocstringFormatStyle.NUMPY`
91
+
92
+ ## Authors
93
+
94
+ - **FelixTheC**
95
+
96
+ ## License
97
+
98
+ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
99
+
@@ -0,0 +1,85 @@
1
+ # Docstring Generator Extension
2
+
3
+ [![C++ Tests](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/cpp-tests.yml/badge.svg)](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/cpp-tests.yml)
4
+ [![Build Extension](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/check-build-ext.yml/badge.svg)](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/check-build-ext.yml)
5
+ [![PyPI version](https://img.shields.io/pypi/v/docstring_generator_ext.svg)](https://pypi.org/project/docstring_generator_ext/)
6
+ [![Python versions](https://img.shields.io/pypi/pyversions/docstring_generator_ext.svg)](https://pypi.org/project/docstring_generator_ext/)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ `docstring_generator_ext` is a high-performance Python extension written in C++ (using pybind11) designed to automatically generate and inject docstrings into Python source files. It leverages Python's `ast` module to extract type-hint information and function signatures to create well-formatted docstrings in various styles.
10
+
11
+ ## Features
12
+
13
+ - **Automatic Docstring Injection**: Parses Python files and inserts docstrings for functions and methods.
14
+ - **Type-Hint Awareness**: Extracts type information from annotations and default values.
15
+ - **Multiple Styles**: Supports popular docstring formats:
16
+ - **reST** (reStructuredText)
17
+ - **Google** style
18
+ - **NumPy** style
19
+ - **High Performance**: Core logic implemented in C++ for fast processing.
20
+ - **Preserves Existing Content**: Can update existing docstrings while trying to preserve manually added descriptions (using a special `$` marker convention).
21
+
22
+ ## Installation
23
+
24
+ ### Prerequisites
25
+
26
+ - Python 3.13 or higher
27
+ - A C++ compiler with C++20 support (e.g., GCC, Clang, or MSVC)
28
+ - `pybind11`
29
+
30
+ ### Building from Source
31
+
32
+ 1. Clone the repository:
33
+ ```bash
34
+ git clone https://github.com/FelixTheC/docstring_generator_ext.git
35
+ cd docstring_generator_ext
36
+ ```
37
+
38
+ 2. Install the `build` package:
39
+ ```bash
40
+ pip install build
41
+ ```
42
+
43
+ 3. Build the package:
44
+ ```bash
45
+ python -m build
46
+ ```
47
+
48
+ 4. Install the built wheel:
49
+ ```bash
50
+ pip install dist/docstring_generator_ext-*.whl
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ After installation, you can use the extension in your Python scripts:
56
+
57
+ ```python
58
+ import docstring_generator_ext
59
+
60
+ # Path to the Python file you want to process
61
+ file_path = "path/to/your_script.py"
62
+
63
+ # Choose a style: GOOGLE, NUMPY, or reST
64
+ style = docstring_generator_ext.DocstringFormatStyle.GOOGLE
65
+
66
+ # Generate and inject docstrings
67
+ docstring_generator_ext.parse_file(file_path, style)
68
+ ```
69
+
70
+ ### Docstring Styles
71
+
72
+ The extension provides an enum `DocstringFormatStyle` to choose the desired output:
73
+
74
+ - `docstring_generator_ext.DocstringFormatStyle.reST`
75
+ - `docstring_generator_ext.DocstringFormatStyle.GOOGLE`
76
+ - `docstring_generator_ext.DocstringFormatStyle.NUMPY`
77
+
78
+ ## Authors
79
+
80
+ - **FelixTheC**
81
+
82
+ ## License
83
+
84
+ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
85
+
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: docstring_generator_ext
3
+ Version: 1.0.2
4
+ Summary: Generate Docstrings with type-hint information.
5
+ Author-email: FelixTheC <fberndt87@gmail.com>
6
+ Classifier: Environment :: Console
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Topic :: Utilities
9
+ Classifier: Topic :: Software Development :: Documentation
10
+ Classifier: Typing :: Typed
11
+ Requires-Python: >=3.13
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: pybind11>=3.0.4
14
+
15
+ # Docstring Generator Extension
16
+
17
+ [![C++ Tests](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/cpp-tests.yml/badge.svg)](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/cpp-tests.yml)
18
+ [![Build Extension](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/check-build-ext.yml/badge.svg)](https://github.com/FelixTheC/docstring_generator_ext/actions/workflows/check-build-ext.yml)
19
+ [![PyPI version](https://img.shields.io/pypi/v/docstring_generator_ext.svg)](https://pypi.org/project/docstring_generator_ext/)
20
+ [![Python versions](https://img.shields.io/pypi/pyversions/docstring_generator_ext.svg)](https://pypi.org/project/docstring_generator_ext/)
21
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
22
+
23
+ `docstring_generator_ext` is a high-performance Python extension written in C++ (using pybind11) designed to automatically generate and inject docstrings into Python source files. It leverages Python's `ast` module to extract type-hint information and function signatures to create well-formatted docstrings in various styles.
24
+
25
+ ## Features
26
+
27
+ - **Automatic Docstring Injection**: Parses Python files and inserts docstrings for functions and methods.
28
+ - **Type-Hint Awareness**: Extracts type information from annotations and default values.
29
+ - **Multiple Styles**: Supports popular docstring formats:
30
+ - **reST** (reStructuredText)
31
+ - **Google** style
32
+ - **NumPy** style
33
+ - **High Performance**: Core logic implemented in C++ for fast processing.
34
+ - **Preserves Existing Content**: Can update existing docstrings while trying to preserve manually added descriptions (using a special `$` marker convention).
35
+
36
+ ## Installation
37
+
38
+ ### Prerequisites
39
+
40
+ - Python 3.13 or higher
41
+ - A C++ compiler with C++20 support (e.g., GCC, Clang, or MSVC)
42
+ - `pybind11`
43
+
44
+ ### Building from Source
45
+
46
+ 1. Clone the repository:
47
+ ```bash
48
+ git clone https://github.com/FelixTheC/docstring_generator_ext.git
49
+ cd docstring_generator_ext
50
+ ```
51
+
52
+ 2. Install the `build` package:
53
+ ```bash
54
+ pip install build
55
+ ```
56
+
57
+ 3. Build the package:
58
+ ```bash
59
+ python -m build
60
+ ```
61
+
62
+ 4. Install the built wheel:
63
+ ```bash
64
+ pip install dist/docstring_generator_ext-*.whl
65
+ ```
66
+
67
+ ## Usage
68
+
69
+ After installation, you can use the extension in your Python scripts:
70
+
71
+ ```python
72
+ import docstring_generator_ext
73
+
74
+ # Path to the Python file you want to process
75
+ file_path = "path/to/your_script.py"
76
+
77
+ # Choose a style: GOOGLE, NUMPY, or reST
78
+ style = docstring_generator_ext.DocstringFormatStyle.GOOGLE
79
+
80
+ # Generate and inject docstrings
81
+ docstring_generator_ext.parse_file(file_path, style)
82
+ ```
83
+
84
+ ### Docstring Styles
85
+
86
+ The extension provides an enum `DocstringFormatStyle` to choose the desired output:
87
+
88
+ - `docstring_generator_ext.DocstringFormatStyle.reST`
89
+ - `docstring_generator_ext.DocstringFormatStyle.GOOGLE`
90
+ - `docstring_generator_ext.DocstringFormatStyle.NUMPY`
91
+
92
+ ## Authors
93
+
94
+ - **FelixTheC**
95
+
96
+ ## License
97
+
98
+ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
99
+
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "docstring_generator_ext"
3
- version = "1.0.1.post2"
3
+ version = "1.0.2"
4
4
  description = "Generate Docstrings with type-hint information."
5
5
  authors = [
6
6
  { name = "FelixTheC", email = "fberndt87@gmail.com" },
@@ -1,31 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: docstring_generator_ext
3
- Version: 1.0.1.post2
4
- Summary: Generate Docstrings with type-hint information.
5
- Author-email: FelixTheC <fberndt87@gmail.com>
6
- Classifier: Environment :: Console
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Topic :: Utilities
9
- Classifier: Topic :: Software Development :: Documentation
10
- Classifier: Typing :: Typed
11
- Requires-Python: >=3.13
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: pybind11>=3.0.4
14
-
15
- ## How to build
16
-
17
- - install python build via `pip install build`
18
- - build the package via `python -m build --sdist`
19
-
20
- ### Versioning
21
-
22
- - For the versions available, see the tags on this repository.
23
-
24
- ### Authors
25
-
26
- - Felix Eisenmenger
27
-
28
- ### License
29
-
30
- - This project is licensed under the MIT License - see the LICENSE.md file for details
31
-
@@ -1,17 +0,0 @@
1
- ## How to build
2
-
3
- - install python build via `pip install build`
4
- - build the package via `python -m build --sdist`
5
-
6
- ### Versioning
7
-
8
- - For the versions available, see the tags on this repository.
9
-
10
- ### Authors
11
-
12
- - Felix Eisenmenger
13
-
14
- ### License
15
-
16
- - This project is licensed under the MIT License - see the LICENSE.md file for details
17
-
@@ -1,31 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: docstring_generator_ext
3
- Version: 1.0.1.post2
4
- Summary: Generate Docstrings with type-hint information.
5
- Author-email: FelixTheC <fberndt87@gmail.com>
6
- Classifier: Environment :: Console
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Topic :: Utilities
9
- Classifier: Topic :: Software Development :: Documentation
10
- Classifier: Typing :: Typed
11
- Requires-Python: >=3.13
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: pybind11>=3.0.4
14
-
15
- ## How to build
16
-
17
- - install python build via `pip install build`
18
- - build the package via `python -m build --sdist`
19
-
20
- ### Versioning
21
-
22
- - For the versions available, see the tags on this repository.
23
-
24
- ### Authors
25
-
26
- - Felix Eisenmenger
27
-
28
- ### License
29
-
30
- - This project is licensed under the MIT License - see the LICENSE.md file for details
31
-