stouputils 1.0.19__tar.gz → 1.0.20__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.
Files changed (166) hide show
  1. stouputils-1.0.20/.github/workflows/documentation.yml +29 -0
  2. stouputils-1.0.20/.python-version +1 -0
  3. {stouputils-1.0.19 → stouputils-1.0.20}/1_upgrades.py +4 -4
  4. {stouputils-1.0.19 → stouputils-1.0.20}/2_build.py +4 -4
  5. {stouputils-1.0.19 → stouputils-1.0.20}/3_upload.py +10 -10
  6. {stouputils-1.0.19 → stouputils-1.0.20}/PKG-INFO +1 -1
  7. {stouputils-1.0.19 → stouputils-1.0.20}/all_in_one.py +13 -13
  8. {stouputils-1.0.19 → stouputils-1.0.20}/build_all_in_one.py +14 -14
  9. {stouputils-1.0.19 → stouputils-1.0.20}/examples/delta_backup.py +7 -7
  10. {stouputils-1.0.19 → stouputils-1.0.20}/pyproject.toml +1 -1
  11. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/__init__.py +15 -15
  12. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/continuous_delivery/__init__.py +5 -5
  13. stouputils-1.0.19/docs/Makefile +0 -14
  14. stouputils-1.0.19/docs/build/html/.buildinfo +0 -4
  15. stouputils-1.0.19/docs/build/html/.doctrees/environment.pickle +0 -0
  16. stouputils-1.0.19/docs/build/html/.doctrees/index.doctree +0 -0
  17. stouputils-1.0.19/docs/build/html/.doctrees/modules/modules.doctree +0 -0
  18. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.all_doctests.doctree +0 -0
  19. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.archive.doctree +0 -0
  20. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.backup.doctree +0 -0
  21. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.collections.doctree +0 -0
  22. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.continuous_delivery.cd_utils.doctree +0 -0
  23. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.continuous_delivery.doctree +0 -0
  24. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.continuous_delivery.github.doctree +0 -0
  25. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.ctx.doctree +0 -0
  26. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.decorators.doctree +0 -0
  27. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.doctree +0 -0
  28. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.dont_look.doctree +0 -0
  29. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.dont_look.zip_file_override.doctree +0 -0
  30. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.io.doctree +0 -0
  31. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.parallel.doctree +0 -0
  32. stouputils-1.0.19/docs/build/html/.doctrees/modules/stouputils.print.doctree +0 -0
  33. stouputils-1.0.19/docs/build/html/.nojekyll +0 -0
  34. stouputils-1.0.19/docs/build/html/_modules/index.html +0 -111
  35. stouputils-1.0.19/docs/build/html/_modules/stouputils/all_doctests.html +0 -199
  36. stouputils-1.0.19/docs/build/html/_modules/stouputils/archive.html +0 -216
  37. stouputils-1.0.19/docs/build/html/_modules/stouputils/backup.html +0 -433
  38. stouputils-1.0.19/docs/build/html/_modules/stouputils/collections.html +0 -162
  39. stouputils-1.0.19/docs/build/html/_modules/stouputils/continuous_delivery/cd_utils.html +0 -187
  40. stouputils-1.0.19/docs/build/html/_modules/stouputils/continuous_delivery/github.html +0 -605
  41. stouputils-1.0.19/docs/build/html/_modules/stouputils/ctx.html +0 -211
  42. stouputils-1.0.19/docs/build/html/_modules/stouputils/decorators.html +0 -459
  43. stouputils-1.0.19/docs/build/html/_modules/stouputils/dont_look/zip_file_override.html +0 -225
  44. stouputils-1.0.19/docs/build/html/_modules/stouputils/io.html +0 -312
  45. stouputils-1.0.19/docs/build/html/_modules/stouputils/parallel.html +0 -294
  46. stouputils-1.0.19/docs/build/html/_modules/stouputils/print.html +0 -363
  47. stouputils-1.0.19/docs/build/html/_sources/index.rst.txt +0 -53
  48. stouputils-1.0.19/docs/build/html/_sources/modules/modules.rst.txt +0 -7
  49. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.all_doctests.rst.txt +0 -8
  50. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.archive.rst.txt +0 -8
  51. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.backup.rst.txt +0 -8
  52. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.collections.rst.txt +0 -8
  53. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.continuous_delivery.cd_utils.rst.txt +0 -8
  54. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.continuous_delivery.github.rst.txt +0 -8
  55. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.continuous_delivery.rst.txt +0 -17
  56. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.ctx.rst.txt +0 -8
  57. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.decorators.rst.txt +0 -8
  58. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.dont_look.rst.txt +0 -12
  59. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.dont_look.zip_file_override.rst.txt +0 -8
  60. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.io.rst.txt +0 -8
  61. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.parallel.rst.txt +0 -8
  62. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.print.rst.txt +0 -8
  63. stouputils-1.0.19/docs/build/html/_sources/modules/stouputils.rst.txt +0 -33
  64. stouputils-1.0.19/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -123
  65. stouputils-1.0.19/docs/build/html/_static/basic.css +0 -914
  66. stouputils-1.0.19/docs/build/html/_static/css/badge_only.css +0 -1
  67. stouputils-1.0.19/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  68. stouputils-1.0.19/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  69. stouputils-1.0.19/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  70. stouputils-1.0.19/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  71. stouputils-1.0.19/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  72. stouputils-1.0.19/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -2671
  73. stouputils-1.0.19/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  74. stouputils-1.0.19/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  75. stouputils-1.0.19/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  76. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  77. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  78. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
  79. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  80. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  81. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  82. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
  83. stouputils-1.0.19/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  84. stouputils-1.0.19/docs/build/html/_static/css/theme.css +0 -4
  85. stouputils-1.0.19/docs/build/html/_static/doctools.js +0 -149
  86. stouputils-1.0.19/docs/build/html/_static/documentation_options.js +0 -13
  87. stouputils-1.0.19/docs/build/html/_static/file.png +0 -0
  88. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bold.eot +0 -0
  89. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bold.ttf +0 -0
  90. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bold.woff +0 -0
  91. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bold.woff2 +0 -0
  92. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  93. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  94. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  95. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  96. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-italic.eot +0 -0
  97. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-italic.ttf +0 -0
  98. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-italic.woff +0 -0
  99. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-italic.woff2 +0 -0
  100. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-regular.eot +0 -0
  101. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-regular.ttf +0 -0
  102. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-regular.woff +0 -0
  103. stouputils-1.0.19/docs/build/html/_static/fonts/Lato/lato-regular.woff2 +0 -0
  104. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  105. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  106. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  107. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  108. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  109. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  110. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  111. stouputils-1.0.19/docs/build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  112. stouputils-1.0.19/docs/build/html/_static/jquery.js +0 -2
  113. stouputils-1.0.19/docs/build/html/_static/js/badge_only.js +0 -1
  114. stouputils-1.0.19/docs/build/html/_static/js/theme.js +0 -1
  115. stouputils-1.0.19/docs/build/html/_static/js/versions.js +0 -228
  116. stouputils-1.0.19/docs/build/html/_static/language_data.js +0 -192
  117. stouputils-1.0.19/docs/build/html/_static/minus.png +0 -0
  118. stouputils-1.0.19/docs/build/html/_static/plus.png +0 -0
  119. stouputils-1.0.19/docs/build/html/_static/pygments.css +0 -75
  120. stouputils-1.0.19/docs/build/html/_static/searchtools.js +0 -632
  121. stouputils-1.0.19/docs/build/html/_static/sphinx_highlight.js +0 -154
  122. stouputils-1.0.19/docs/build/html/genindex.html +0 -513
  123. stouputils-1.0.19/docs/build/html/index.html +0 -271
  124. stouputils-1.0.19/docs/build/html/modules/modules.html +0 -192
  125. stouputils-1.0.19/docs/build/html/modules/stouputils.all_doctests.html +0 -163
  126. stouputils-1.0.19/docs/build/html/modules/stouputils.archive.html +0 -185
  127. stouputils-1.0.19/docs/build/html/modules/stouputils.backup.html +0 -272
  128. stouputils-1.0.19/docs/build/html/modules/stouputils.collections.html +0 -171
  129. stouputils-1.0.19/docs/build/html/modules/stouputils.continuous_delivery.cd_utils.html +0 -172
  130. stouputils-1.0.19/docs/build/html/modules/stouputils.continuous_delivery.github.html +0 -444
  131. stouputils-1.0.19/docs/build/html/modules/stouputils.continuous_delivery.html +0 -150
  132. stouputils-1.0.19/docs/build/html/modules/stouputils.ctx.html +0 -199
  133. stouputils-1.0.19/docs/build/html/modules/stouputils.decorators.html +0 -327
  134. stouputils-1.0.19/docs/build/html/modules/stouputils.dont_look.html +0 -129
  135. stouputils-1.0.19/docs/build/html/modules/stouputils.dont_look.zip_file_override.html +0 -125
  136. stouputils-1.0.19/docs/build/html/modules/stouputils.html +0 -252
  137. stouputils-1.0.19/docs/build/html/modules/stouputils.io.html +0 -296
  138. stouputils-1.0.19/docs/build/html/modules/stouputils.parallel.html +0 -234
  139. stouputils-1.0.19/docs/build/html/modules/stouputils.print.html +0 -251
  140. stouputils-1.0.19/docs/build/html/objects.inv +0 -0
  141. stouputils-1.0.19/docs/build/html/py-modindex.html +0 -190
  142. stouputils-1.0.19/docs/build/html/search.html +0 -120
  143. stouputils-1.0.19/docs/build/html/searchindex.js +0 -1
  144. stouputils-1.0.19/docs/requirements.txt +0 -3
  145. stouputils-1.0.19/docs/source/conf.py +0 -93
  146. {stouputils-1.0.19 → stouputils-1.0.20}/.gitignore +0 -0
  147. {stouputils-1.0.19 → stouputils-1.0.20}/LICENSE +0 -0
  148. {stouputils-1.0.19 → stouputils-1.0.20}/README.md +0 -0
  149. {stouputils-1.0.19 → stouputils-1.0.20}/copy_in_local.py +0 -0
  150. {stouputils-1.0.19 → stouputils-1.0.20}/doctests.py +0 -0
  151. {stouputils-1.0.19 → stouputils-1.0.20}/github_release.py +0 -0
  152. /stouputils-1.0.19/scripts/update_docs.py → /stouputils-1.0.20/scripts/create_docs.py +0 -0
  153. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/all_doctests.py +0 -0
  154. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/archive.py +0 -0
  155. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/backup.py +0 -0
  156. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/collections.py +0 -0
  157. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/continuous_delivery/cd_utils.py +0 -0
  158. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/continuous_delivery/github.py +0 -0
  159. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/ctx.py +0 -0
  160. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/decorators.py +0 -0
  161. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/dont_look/zip_file_override.py +0 -0
  162. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/io.py +0 -0
  163. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/parallel.py +0 -0
  164. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/print.py +0 -0
  165. {stouputils-1.0.19 → stouputils-1.0.20}/src/stouputils/py.typed +0 -0
  166. {stouputils-1.0.19 → stouputils-1.0.20}/upgrade.py +0 -0
@@ -0,0 +1,29 @@
1
+ name: documentation
2
+
3
+ on: [push, pull_request, workflow_dispatch]
4
+
5
+ permissions:
6
+ contents: write
7
+
8
+ jobs:
9
+ docs:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ - name: Install dependencies
15
+ run: |
16
+ pip install hatch stouputils sphinx sphinx_rtd_theme myst_parser
17
+ hatch build
18
+ - name: Sphinx build
19
+ run: |
20
+ python scripts/create_docs.py
21
+ - name: Deploy to GitHub Pages
22
+ uses: peaceiris/actions-gh-pages@v3
23
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
24
+ with:
25
+ publish_branch: gh-pages
26
+ github_token: ${{ secrets.GITHUB_TOKEN }}
27
+ publish_dir: docs/build/html
28
+ force_orphan: true
29
+
@@ -0,0 +1 @@
1
+ 3.10
@@ -1,4 +1,4 @@
1
-
2
- import os
3
- os.system("py -m pip install --upgrade pip setuptools build twine pkginfo")
4
-
1
+
2
+ import os
3
+ os.system("py -m pip install --upgrade pip setuptools build twine pkginfo")
4
+
@@ -1,4 +1,4 @@
1
-
2
- import os
3
- os.system("py -m build")
4
-
1
+
2
+ import os
3
+ os.system("py -m build")
4
+
@@ -1,10 +1,10 @@
1
-
2
- import os
3
- LAST_FILES: int = 1
4
- for root, _, files in os.walk("dist"):
5
- files = sorted(files, key=lambda x: os.path.getmtime(f"dist/{x}"), reverse=True)
6
- lasts = files[:LAST_FILES * 2] # x2 because we have the .tar.gz and the .whl
7
- for file in lasts:
8
- if file.endswith(".tar.gz"):
9
- os.system(f"py -m twine upload --verbose -r stouputils dist/{file}")
10
-
1
+
2
+ import os
3
+ LAST_FILES: int = 1
4
+ for root, _, files in os.walk("dist"):
5
+ files = sorted(files, key=lambda x: os.path.getmtime(f"dist/{x}"), reverse=True)
6
+ lasts = files[:LAST_FILES * 2] # x2 because we have the .tar.gz and the .whl
7
+ for file in lasts:
8
+ if file.endswith(".tar.gz"):
9
+ os.system(f"py -m twine upload --verbose -r stouputils dist/{file}")
10
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stouputils
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.
5
5
  Project-URL: Homepage, https://github.com/Stoupy51/stouputils
6
6
  Project-URL: Issues, https://github.com/Stoupy51/stouputils/issues
@@ -1,13 +1,13 @@
1
-
2
- import os
3
- import sys
4
- commands = [
5
- f"{sys.executable} upgrade.py", # Upgrade the version in pyproject.toml
6
- f"{sys.executable} build_all_in_one.py", # Build the package and upload it
7
- ]
8
-
9
- for command in commands:
10
- if os.system(command) != 0:
11
- print(f"Error while executing '{command}'")
12
- exit(1)
13
-
1
+
2
+ import os
3
+ import sys
4
+ commands = [
5
+ f"{sys.executable} upgrade.py", # Upgrade the version in pyproject.toml
6
+ f"{sys.executable} build_all_in_one.py", # Build the package and upload it
7
+ ]
8
+
9
+ for command in commands:
10
+ if os.system(command) != 0:
11
+ print(f"Error while executing '{command}'")
12
+ exit(1)
13
+
@@ -1,14 +1,14 @@
1
-
2
- import os
3
- import sys
4
- commands = [
5
- f"{sys.executable} 1_upgrades.py",
6
- f"{sys.executable} 2_build.py",
7
- f"{sys.executable} 3_upload.py",
8
- ]
9
-
10
- for command in commands:
11
- if os.system(command) != 0:
12
- print(f"Error while executing '{command}'")
13
- exit(1)
14
-
1
+
2
+ import os
3
+ import sys
4
+ commands = [
5
+ f"{sys.executable} 1_upgrades.py",
6
+ f"{sys.executable} 2_build.py",
7
+ f"{sys.executable} 3_upload.py",
8
+ ]
9
+
10
+ for command in commands:
11
+ if os.system(command) != 0:
12
+ print(f"Error while executing '{command}'")
13
+ exit(1)
14
+
@@ -1,7 +1,7 @@
1
-
2
- # Example of use:
3
- # py .\delta_backup.py delta "src" "backup" -x "*pycache*"
4
-
5
- import stouputils as stp
6
- stp.backup_cli()
7
-
1
+
2
+ # Example of use:
3
+ # py .\delta_backup.py delta "src" "backup" -x "*pycache*"
4
+
5
+ import stouputils as stp
6
+ stp.backup_cli()
7
+
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
 
6
6
  [project]
7
7
  name = "stouputils"
8
- version = "1.0.19"
8
+ version = "1.0.20"
9
9
  authors = [
10
10
  { name="Stoupy51", email="stoupy51@gmail.com" },
11
11
  ]
@@ -1,15 +1,15 @@
1
-
2
- # Imports
3
- from .print import *
4
- from .archive import *
5
- from .io import *
6
- from .decorators import *
7
- from .ctx import *
8
- from .parallel import *
9
- from .all_doctests import *
10
- from .collections import *
11
- from .backup import *
12
-
13
- # Folders
14
- from .continuous_delivery import *
15
-
1
+
2
+ # Imports
3
+ from .print import *
4
+ from .archive import *
5
+ from .io import *
6
+ from .decorators import *
7
+ from .ctx import *
8
+ from .parallel import *
9
+ from .all_doctests import *
10
+ from .collections import *
11
+ from .backup import *
12
+
13
+ # Folders
14
+ from .continuous_delivery import *
15
+
@@ -1,5 +1,5 @@
1
-
2
- # Imports
3
- from .cd_utils import *
4
- from .github import *
5
-
1
+
2
+ # Imports
3
+ from .cd_utils import *
4
+ from .github import *
5
+
@@ -1,14 +0,0 @@
1
- # Minimal makefile for Sphinx documentation
2
-
3
- SPHINXOPTS ?=
4
- SPHINXBUILD ?= sphinx-build
5
- SOURCEDIR = source
6
- BUILDDIR = build
7
-
8
- help:
9
- @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
10
-
11
- .PHONY: help Makefile
12
-
13
- %: Makefile
14
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -1,4 +0,0 @@
1
- # Sphinx build info version 1
2
- # This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: 29722b6025e183e7782a77037da0a5c9
4
- tags: 645f666f9bcd5a90fca523b33c5a78b7
File without changes
@@ -1,111 +0,0 @@
1
-
2
-
3
- <!DOCTYPE html>
4
- <html class="writer-html5" lang="en" data-content_root="../">
5
- <head>
6
- <meta charset="utf-8" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
- <title>Overview: module code &mdash; stouputils 1.0.18 documentation</title>
9
- <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
10
- <link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=e59714d7" />
11
-
12
-
13
- <script src="../_static/jquery.js?v=5d32c60e"></script>
14
- <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
15
- <script src="../_static/documentation_options.js?v=14ed45bf"></script>
16
- <script src="../_static/doctools.js?v=9bcbadda"></script>
17
- <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
18
- <script src="../_static/js/theme.js"></script>
19
- <link rel="index" title="Index" href="../genindex.html" />
20
- <link rel="search" title="Search" href="../search.html" />
21
- </head>
22
-
23
- <body class="wy-body-for-nav">
24
- <div class="wy-grid-for-nav">
25
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
26
- <div class="wy-side-scroll">
27
- <div class="wy-side-nav-search" >
28
-
29
-
30
-
31
- <a href="../index.html" class="icon icon-home">
32
- stouputils
33
- </a>
34
- <div role="search">
35
- <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
36
- <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
37
- <input type="hidden" name="check_keywords" value="yes" />
38
- <input type="hidden" name="area" value="default" />
39
- </form>
40
- </div>
41
- </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
42
- <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
43
- <ul>
44
- <li class="toctree-l1"><a class="reference internal" href="../modules/stouputils.html">stouputils package</a></li>
45
- </ul>
46
-
47
- </div>
48
- </div>
49
- </nav>
50
-
51
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
52
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
53
- <a href="../index.html">stouputils</a>
54
- </nav>
55
-
56
- <div class="wy-nav-content">
57
- <div class="rst-content style-external-links">
58
- <div role="navigation" aria-label="Page navigation">
59
- <ul class="wy-breadcrumbs">
60
- <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
61
- <li class="breadcrumb-item active">Overview: module code</li>
62
- <li class="wy-breadcrumbs-aside">
63
- </li>
64
- </ul>
65
- <hr/>
66
- </div>
67
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
68
- <div itemprop="articleBody">
69
-
70
- <h1>All modules for which code is available</h1>
71
- <ul><li><a href="stouputils/all_doctests.html">stouputils.all_doctests</a></li>
72
- <li><a href="stouputils/archive.html">stouputils.archive</a></li>
73
- <li><a href="stouputils/backup.html">stouputils.backup</a></li>
74
- <li><a href="stouputils/collections.html">stouputils.collections</a></li>
75
- <li><a href="stouputils/continuous_delivery/cd_utils.html">stouputils.continuous_delivery.cd_utils</a></li>
76
- <li><a href="stouputils/continuous_delivery/github.html">stouputils.continuous_delivery.github</a></li>
77
- <li><a href="stouputils/ctx.html">stouputils.ctx</a></li>
78
- <li><a href="stouputils/decorators.html">stouputils.decorators</a></li>
79
- <li><a href="stouputils/io.html">stouputils.io</a></li>
80
- <li><a href="stouputils/parallel.html">stouputils.parallel</a></li>
81
- <li><a href="stouputils/print.html">stouputils.print</a></li>
82
- </ul>
83
-
84
- </div>
85
- </div>
86
- <footer>
87
-
88
- <hr/>
89
-
90
- <div role="contentinfo">
91
- <p>&#169; Copyright 2024, Stoupy.</p>
92
- </div>
93
-
94
- Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
95
- <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
96
- provided by <a href="https://readthedocs.org">Read the Docs</a>.
97
-
98
-
99
- </footer>
100
- </div>
101
- </div>
102
- </section>
103
- </div>
104
- <script>
105
- jQuery(function () {
106
- SphinxRtdTheme.Navigation.enable(true);
107
- });
108
- </script>
109
-
110
- </body>
111
- </html>
@@ -1,199 +0,0 @@
1
-
2
-
3
- <!DOCTYPE html>
4
- <html class="writer-html5" lang="en" data-content_root="../../">
5
- <head>
6
- <meta charset="utf-8" />
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
- <title>stouputils.all_doctests &mdash; stouputils 1.0.0 documentation</title>
9
- <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=80d5e7a1" />
10
- <link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
11
-
12
-
13
- <script src="../../_static/jquery.js?v=5d32c60e"></script>
14
- <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
15
- <script src="../../_static/documentation_options.js?v=8d563738"></script>
16
- <script src="../../_static/doctools.js?v=9bcbadda"></script>
17
- <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
18
- <script src="../../_static/js/theme.js"></script>
19
- <link rel="index" title="Index" href="../../genindex.html" />
20
- <link rel="search" title="Search" href="../../search.html" />
21
- </head>
22
-
23
- <body class="wy-body-for-nav">
24
- <div class="wy-grid-for-nav">
25
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
26
- <div class="wy-side-scroll">
27
- <div class="wy-side-nav-search" >
28
-
29
-
30
-
31
- <a href="../../index.html" class="icon icon-home">
32
- stouputils
33
- </a>
34
- <div role="search">
35
- <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
36
- <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
37
- <input type="hidden" name="check_keywords" value="yes" />
38
- <input type="hidden" name="area" value="default" />
39
- </form>
40
- </div>
41
- </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
42
- <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
43
- <ul>
44
- <li class="toctree-l1"><a class="reference internal" href="../../modules/stouputils.html">stouputils package</a></li>
45
- </ul>
46
-
47
- </div>
48
- </div>
49
- </nav>
50
-
51
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
52
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
53
- <a href="../../index.html">stouputils</a>
54
- </nav>
55
-
56
- <div class="wy-nav-content">
57
- <div class="rst-content style-external-links">
58
- <div role="navigation" aria-label="Page navigation">
59
- <ul class="wy-breadcrumbs">
60
- <li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
61
- <li class="breadcrumb-item"><a href="../index.html">Module code</a></li>
62
- <li class="breadcrumb-item active">stouputils.all_doctests</li>
63
- <li class="wy-breadcrumbs-aside">
64
- </li>
65
- </ul>
66
- <hr/>
67
- </div>
68
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
69
- <div itemprop="articleBody">
70
-
71
- <h1>Source code for stouputils.all_doctests</h1><div class="highlight"><pre>
72
- <span></span><span class="sd">&quot;&quot;&quot;</span>
73
- <span class="sd">This module is used to run all the doctests for all the modules in a given directory.</span>
74
- <span class="sd">&quot;&quot;&quot;</span>
75
-
76
- <span class="c1"># Imports</span>
77
- <span class="kn">import</span> <span class="nn">os</span>
78
- <span class="kn">import</span> <span class="nn">sys</span>
79
- <span class="kn">from</span> <span class="nn">.print</span> <span class="kn">import</span> <span class="o">*</span>
80
- <span class="kn">from</span> <span class="nn">.decorators</span> <span class="kn">import</span> <span class="n">measure_time</span><span class="p">,</span> <span class="n">handle_error</span><span class="p">,</span> <span class="n">LogLevels</span><span class="p">,</span> <span class="n">force_raise_exception</span>
81
- <span class="kn">from</span> <span class="nn">doctest</span> <span class="kn">import</span> <span class="n">TestResults</span><span class="p">,</span> <span class="n">testmod</span>
82
- <span class="kn">from</span> <span class="nn">types</span> <span class="kn">import</span> <span class="n">ModuleType</span>
83
- <span class="kn">import</span> <span class="nn">importlib</span>
84
- <span class="kn">import</span> <span class="nn">pkgutil</span>
85
-
86
- <span class="k">def</span> <span class="nf">test_module_with_progress</span><span class="p">(</span><span class="n">module</span><span class="p">:</span> <span class="n">ModuleType</span><span class="p">,</span> <span class="n">separator</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">TestResults</span><span class="p">:</span>
87
- <span class="nd">@measure_time</span><span class="p">(</span><span class="n">progress</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;Testing module &#39;</span><span class="si">{</span><span class="n">module</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">&#39; </span><span class="si">{</span><span class="n">separator</span><span class="si">}</span><span class="s2">took&quot;</span><span class="p">)</span>
88
- <span class="k">def</span> <span class="nf">internal</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="n">TestResults</span><span class="p">:</span>
89
- <span class="k">return</span> <span class="n">testmod</span><span class="p">(</span><span class="n">m</span><span class="o">=</span><span class="n">module</span><span class="p">)</span>
90
- <span class="k">return</span> <span class="n">internal</span><span class="p">()</span>
91
-
92
- <span class="c1"># Main program</span>
93
- <div class="viewcode-block" id="launch_tests">
94
- <a class="viewcode-back" href="../../modules/stouputils.all_doctests.html#stouputils.all_doctests.launch_tests">[docs]</a>
95
- <span class="k">def</span> <span class="nf">launch_tests</span><span class="p">(</span><span class="n">root_dir</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">importing_errors</span><span class="p">:</span> <span class="n">LogLevels</span> <span class="o">=</span> <span class="n">LogLevels</span><span class="o">.</span><span class="n">WARNING_TRACEBACK</span><span class="p">,</span> <span class="n">strict</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
96
- <span class="w"> </span><span class="sd">&quot;&quot;&quot; Main function to launch tests for all modules in the given directory.</span>
97
-
98
- <span class="sd"> Args:</span>
99
- <span class="sd"> root_dir (str): Root directory to search for modules</span>
100
- <span class="sd"> importing_errors (LogLevels): Log level for the errors when importing modules</span>
101
- <span class="sd"> strict (bool): Modify the force_raise_exception variable to True in the decorators module</span>
102
- <span class="sd"> </span>
103
- <span class="sd"> Examples:</span>
104
- <span class="sd"> &gt;&gt;&gt; launch_tests(&quot;unknown_dir&quot;)</span>
105
- <span class="sd"> Traceback (most recent call last):</span>
106
- <span class="sd"> ...</span>
107
- <span class="sd"> ValueError: No modules found in &#39;unknown_dir&#39;</span>
108
-
109
- <span class="sd"> .. code-block:: python</span>
110
-
111
- <span class="sd"> &gt; launch_tests(&quot;/path/to/source&quot;)</span>
112
- <span class="sd"> [PROGRESS HH:MM:SS] Importing module &#39;module1&#39; took 0.001s</span>
113
- <span class="sd"> [PROGRESS HH:MM:SS] Importing module &#39;module2&#39; took 0.002s</span>
114
- <span class="sd"> [PROGRESS HH:MM:SS] Importing module &#39;module3&#39; took 0.003s</span>
115
- <span class="sd"> [PROGRESS HH:MM:SS] Importing module &#39;module4&#39; took 0.004s</span>
116
- <span class="sd"> [INFO HH:MM:SS] Testing 4 modules...</span>
117
- <span class="sd"> [PROGRESS HH:MM:SS] Testing module &#39;module1&#39; took 0.005s</span>
118
- <span class="sd"> [PROGRESS HH:MM:SS] Testing module &#39;module2&#39; took 0.006s</span>
119
- <span class="sd"> [PROGRESS HH:MM:SS] Testing module &#39;module3&#39; took 0.007s</span>
120
- <span class="sd"> [PROGRESS HH:MM:SS] Testing module &#39;module4&#39; took 0.008s</span>
121
- <span class="sd"> &quot;&quot;&quot;</span>
122
- <span class="k">global</span> <span class="n">force_raise_exception</span>
123
- <span class="k">if</span> <span class="n">strict</span><span class="p">:</span>
124
- <span class="n">old_value</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="n">strict</span>
125
- <span class="n">force_raise_exception</span> <span class="o">=</span> <span class="kc">True</span>
126
- <span class="n">strict</span> <span class="o">=</span> <span class="n">old_value</span>
127
-
128
-
129
- <span class="c1"># Get all modules from folder</span>
130
- <span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">root_dir</span><span class="p">)</span>
131
- <span class="n">modules_file_paths</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>
132
- <span class="k">for</span> <span class="n">directory_path</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">walk</span><span class="p">(</span><span class="n">root_dir</span><span class="p">):</span>
133
- <span class="k">for</span> <span class="n">module_info</span> <span class="ow">in</span> <span class="n">pkgutil</span><span class="o">.</span><span class="n">walk_packages</span><span class="p">([</span><span class="n">directory_path</span><span class="p">]):</span>
134
- <span class="n">absolute_module_path</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">directory_path</span><span class="p">,</span> <span class="n">module_info</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
135
- <span class="n">path</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="n">absolute_module_path</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="mi">1</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">sep</span><span class="p">,</span> <span class="s2">&quot;.&quot;</span><span class="p">)[</span><span class="mi">1</span><span class="p">:]</span>
136
- <span class="k">if</span> <span class="n">path</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">modules_file_paths</span><span class="p">:</span>
137
- <span class="n">modules_file_paths</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
138
- <span class="k">if</span> <span class="ow">not</span> <span class="n">modules_file_paths</span><span class="p">:</span>
139
- <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;No modules found in &#39;</span><span class="si">{</span><span class="n">root_dir</span><span class="si">}</span><span class="s2">&#39;&quot;</span><span class="p">)</span>
140
-
141
- <span class="c1"># Find longest module path for alignment</span>
142
- <span class="n">max_length</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">path</span><span class="p">)</span> <span class="k">for</span> <span class="n">path</span> <span class="ow">in</span> <span class="n">modules_file_paths</span><span class="p">)</span>
143
-
144
- <span class="c1"># Dynamically import all modules from iacob package recursively using pkgutil and importlib</span>
145
- <span class="n">modules</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="n">ModuleType</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>
146
- <span class="n">separators</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>
147
- <span class="k">for</span> <span class="n">module_path</span> <span class="ow">in</span> <span class="n">modules_file_paths</span><span class="p">:</span>
148
- <span class="n">separator</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot; &quot;</span> <span class="o">*</span> <span class="p">(</span><span class="n">max_length</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">module_path</span><span class="p">))</span>
149
- <span class="nd">@handle_error</span><span class="p">(</span><span class="n">error_log</span><span class="o">=</span><span class="n">importing_errors</span><span class="p">)</span>
150
- <span class="nd">@measure_time</span><span class="p">(</span><span class="n">progress</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;Importing module &#39;</span><span class="si">{</span><span class="n">module_path</span><span class="si">}</span><span class="s2">&#39; </span><span class="si">{</span><span class="n">separator</span><span class="si">}</span><span class="s2">took&quot;</span><span class="p">)</span>
151
- <span class="k">def</span> <span class="nf">internal</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
152
- <span class="n">modules</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">importlib</span><span class="o">.</span><span class="n">import_module</span><span class="p">(</span><span class="n">module_path</span><span class="p">))</span>
153
- <span class="n">separators</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">separator</span><span class="p">)</span>
154
- <span class="n">internal</span><span class="p">()</span>
155
-
156
- <span class="c1"># Run tests for each module</span>
157
- <span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Testing </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">modules</span><span class="p">)</span><span class="si">}</span><span class="s2"> modules...&quot;</span><span class="p">)</span>
158
- <span class="n">separators</span> <span class="o">=</span> <span class="p">[</span><span class="n">s</span> <span class="o">+</span> <span class="s2">&quot; &quot;</span><span class="o">*</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="s2">&quot;Importing&quot;</span><span class="p">)</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="s2">&quot;Testing&quot;</span><span class="p">))</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">separators</span><span class="p">]</span>
159
- <span class="n">results</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="n">TestResults</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="n">test_module_with_progress</span><span class="p">(</span><span class="n">module</span><span class="p">,</span> <span class="n">separator</span><span class="p">)</span> <span class="k">for</span> <span class="n">module</span><span class="p">,</span> <span class="n">separator</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">modules</span><span class="p">,</span> <span class="n">separators</span><span class="p">)]</span>
160
-
161
- <span class="c1"># Display any error lines for each module at the end of the script</span>
162
- <span class="k">for</span> <span class="n">module</span><span class="p">,</span> <span class="n">result</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">modules</span><span class="p">,</span> <span class="n">results</span><span class="p">):</span>
163
- <span class="k">if</span> <span class="n">result</span><span class="o">.</span><span class="n">failed</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
164
- <span class="n">error</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Errors in module </span><span class="si">{</span><span class="n">module</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">exit</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
165
-
166
- <span class="c1"># Reset force_raise_exception back</span>
167
- <span class="n">force_raise_exception</span> <span class="o">=</span> <span class="n">strict</span></div>
168
-
169
-
170
- </pre></div>
171
-
172
- </div>
173
- </div>
174
- <footer>
175
-
176
- <hr/>
177
-
178
- <div role="contentinfo">
179
- <p>&#169; Copyright 2024, Stoupy.</p>
180
- </div>
181
-
182
- Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
183
- <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
184
- provided by <a href="https://readthedocs.org">Read the Docs</a>.
185
-
186
-
187
- </footer>
188
- </div>
189
- </div>
190
- </section>
191
- </div>
192
- <script>
193
- jQuery(function () {
194
- SphinxRtdTheme.Navigation.enable(true);
195
- });
196
- </script>
197
-
198
- </body>
199
- </html>