docstring-to-text 1.0.1__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.
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/.github/workflows/publish-release-to-pypi.yml +5 -5
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/PKG-INFO +14 -3
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/README.md +13 -2
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/pyproject.toml +1 -1
- docstring_to_text-1.0.1/src/docstring_to_text/__package_meta.py → docstring_to_text-1.0.2/src/docstring_to_text/___package_meta.py +1 -1
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/src/docstring_to_text/__init__.py +6 -2
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/.gitattributes +0 -0
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/.gitignore +0 -0
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/LICENSE.md +0 -0
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/_build.bat +0 -0
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/_upload-release.bat +0 -0
- {docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/_upload-test.bat +0 -0
{docstring_to_text-1.0.1 → docstring_to_text-1.0.2}/.github/workflows/publish-release-to-pypi.yml
RENAMED
@@ -31,7 +31,7 @@ on:
|
|
31
31
|
branches:
|
32
32
|
- main
|
33
33
|
paths:
|
34
|
-
- "src/docstring_to_text/
|
34
|
+
- "src/docstring_to_text/___package_meta.py"
|
35
35
|
|
36
36
|
# ====== CONCURRENCY ======
|
37
37
|
|
@@ -39,7 +39,7 @@ on:
|
|
39
39
|
concurrency:
|
40
40
|
group: pypi-publish
|
41
41
|
# To group by version:
|
42
|
-
#group: pypi-publish-${{ github.ref }}-${{ hashFiles('src/docstring_to_text/
|
42
|
+
#group: pypi-publish-${{ github.ref }}-${{ hashFiles('src/docstring_to_text/___package_meta.py') }}
|
43
43
|
cancel-in-progress: false # the second pending run is put into a queue, the third one is cancelled (GitHub limitation)
|
44
44
|
|
45
45
|
# ======= ENV VARS =======
|
@@ -47,8 +47,8 @@ concurrency:
|
|
47
47
|
env:
|
48
48
|
# The name on PyPI:
|
49
49
|
PACKAGE_NAME: 'docstring-to-text'
|
50
|
-
VERSION_FILE: 'src/docstring_to_text/
|
51
|
-
VERSION_MODULE: 'src.docstring_to_text.
|
50
|
+
VERSION_FILE: 'src/docstring_to_text/___package_meta.py'
|
51
|
+
VERSION_MODULE: 'src.docstring_to_text.___package_meta'
|
52
52
|
VERSION_VARIABLE: 'VERSION'
|
53
53
|
|
54
54
|
# ========= JOBS =========
|
@@ -270,7 +270,7 @@ jobs:
|
|
270
270
|
# --------------------------------------------------------
|
271
271
|
|
272
272
|
github_release:
|
273
|
-
name:
|
273
|
+
name: GitHub Tag 🏷️ + Release 🔄
|
274
274
|
needs: [build, detect-version]
|
275
275
|
runs-on: ubuntu-latest
|
276
276
|
permissions:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: docstring-to-text
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
4
4
|
Summary: A simple pip package converting docstrings into clean text (proper paragraphs and indents)
|
5
5
|
Project-URL: Source Code, https://github.com/Lex-DRL/Py-docstring-to-text
|
6
6
|
Project-URL: Issues, https://github.com/Lex-DRL/Py-docstring-to-text/issues
|
@@ -13,15 +13,26 @@ Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Requires-Python: >=3.7
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
|
16
|
+
<div align="center">
|
17
|
+
|
16
18
|
# docstring-to-text
|
17
19
|
|
20
|
+
[![PyPI][pypi-shield]][pypi-url]
|
21
|
+
[![][github-release-shield]][github-release-url]
|
22
|
+
|
23
|
+
[pypi-shield]: https://img.shields.io/pypi/v/docstring-to-text?logo=pypi
|
24
|
+
[pypi-url]: https://pypi.org/p/docstring-to-text
|
25
|
+
[github-release-shield]: https://img.shields.io/github/v/release/Lex-DRL/Py-docstring-to-text?logo=github
|
26
|
+
[github-release-url]: https://github.com/Lex-DRL/Py-docstring-to-text/releases/latest
|
27
|
+
</div>
|
28
|
+
|
18
29
|
A simple pip package converting docstrings into clean text (proper paragraphs and indents).
|
19
30
|
|
20
31
|
For example, here's a class docstring:
|
21
32
|
```python
|
22
33
|
class MyClass:
|
23
34
|
"""
|
24
|
-
|
35
|
+
This is a class docstring.
|
25
36
|
|
26
37
|
|
27
38
|
It has sphinx-like paragraphs, which can
|
@@ -60,7 +71,7 @@ clean_text = format_object_docstring(MyClass)
|
|
60
71
|
|
61
72
|
Then, the resulting string would be:
|
62
73
|
```text
|
63
|
-
|
74
|
+
This is a class docstring.
|
64
75
|
|
65
76
|
It has sphinx-like paragraphs, which can span multiple lines. Any modern IDE would display them as a single line, that wraps the given width.
|
66
77
|
You can't just remove all the new lines in the entire string, because you want to preserve paragraphs themselves.
|
@@ -1,12 +1,23 @@
|
|
1
|
+
<div align="center">
|
2
|
+
|
1
3
|
# docstring-to-text
|
2
4
|
|
5
|
+
[![PyPI][pypi-shield]][pypi-url]
|
6
|
+
[![][github-release-shield]][github-release-url]
|
7
|
+
|
8
|
+
[pypi-shield]: https://img.shields.io/pypi/v/docstring-to-text?logo=pypi
|
9
|
+
[pypi-url]: https://pypi.org/p/docstring-to-text
|
10
|
+
[github-release-shield]: https://img.shields.io/github/v/release/Lex-DRL/Py-docstring-to-text?logo=github
|
11
|
+
[github-release-url]: https://github.com/Lex-DRL/Py-docstring-to-text/releases/latest
|
12
|
+
</div>
|
13
|
+
|
3
14
|
A simple pip package converting docstrings into clean text (proper paragraphs and indents).
|
4
15
|
|
5
16
|
For example, here's a class docstring:
|
6
17
|
```python
|
7
18
|
class MyClass:
|
8
19
|
"""
|
9
|
-
|
20
|
+
This is a class docstring.
|
10
21
|
|
11
22
|
|
12
23
|
It has sphinx-like paragraphs, which can
|
@@ -45,7 +56,7 @@ clean_text = format_object_docstring(MyClass)
|
|
45
56
|
|
46
57
|
Then, the resulting string would be:
|
47
58
|
```text
|
48
|
-
|
59
|
+
This is a class docstring.
|
49
60
|
|
50
61
|
It has sphinx-like paragraphs, which can span multiple lines. Any modern IDE would display them as a single line, that wraps the given width.
|
51
62
|
You can't just remove all the new lines in the entire string, because you want to preserve paragraphs themselves.
|
@@ -3,13 +3,17 @@
|
|
3
3
|
A simple pip package converting docstrings into clean text (proper paragraphs and indents).
|
4
4
|
"""
|
5
5
|
|
6
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
7
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
8
|
+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
9
|
+
|
6
10
|
import typing as _t
|
7
11
|
|
8
12
|
from inspect import cleandoc, getdoc
|
9
13
|
import re as _re
|
10
14
|
|
11
|
-
from .
|
12
|
-
from .
|
15
|
+
from .___package_meta import VERSION
|
16
|
+
from .___package_meta import VERSION as __version__
|
13
17
|
|
14
18
|
# TODO:
|
15
19
|
# - lists
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|