docalign 0.1.0__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 (230) hide show
  1. docalign-0.1.0/.bumpversion.cfg +8 -0
  2. docalign-0.1.0/.changelog/.gitkeep +0 -0
  3. docalign-0.1.0/.github/workflows/callable-ci.yml +39 -0
  4. docalign-0.1.0/.github/workflows/prs.yml +8 -0
  5. docalign-0.1.0/.github/workflows/push-to-main.yml +9 -0
  6. docalign-0.1.0/.github/workflows/release.yml +62 -0
  7. docalign-0.1.0/.gitignore +7 -0
  8. docalign-0.1.0/CHANGELOG.md +62 -0
  9. docalign-0.1.0/LICENSE +21 -0
  10. docalign-0.1.0/Makefile +22 -0
  11. docalign-0.1.0/PKG-INFO +188 -0
  12. docalign-0.1.0/README.md +175 -0
  13. docalign-0.1.0/docs/architecture.md +188 -0
  14. docalign-0.1.0/docs/cicd.md +79 -0
  15. docalign-0.1.0/docs/concepts.md +147 -0
  16. docalign-0.1.0/docs/features/arrow-alignment.md +71 -0
  17. docalign-0.1.0/docs/features/box-wall-checking.md +96 -0
  18. docalign-0.1.0/docs/features/box-width-normalization.md +74 -0
  19. docalign-0.1.0/docs/features/pipe-continuity.md +69 -0
  20. docalign-0.1.0/docs/features/rail-alignment.md +88 -0
  21. docalign-0.1.0/docs/features/table-alignment.md +63 -0
  22. docalign-0.1.0/docs/guides/cli-usage.md +130 -0
  23. docalign-0.1.0/docs/guides/releasing.md +53 -0
  24. docalign-0.1.0/docs/guides/testing-strategy.md +97 -0
  25. docalign-0.1.0/docs/overview.md +57 -0
  26. docalign-0.1.0/docs/repo.md +91 -0
  27. docalign-0.1.0/docs/rules.md +93 -0
  28. docalign-0.1.0/pyproject.toml +48 -0
  29. docalign-0.1.0/src/docalign/__init__.py +2 -0
  30. docalign-0.1.0/src/docalign/checks/__init__.py +0 -0
  31. docalign-0.1.0/src/docalign/checks/arrows.py +100 -0
  32. docalign-0.1.0/src/docalign/checks/box_padding.py +117 -0
  33. docalign-0.1.0/src/docalign/checks/box_spacing.py +213 -0
  34. docalign-0.1.0/src/docalign/checks/box_walls.py +249 -0
  35. docalign-0.1.0/src/docalign/checks/box_widths.py +140 -0
  36. docalign-0.1.0/src/docalign/checks/def_lists.py +99 -0
  37. docalign-0.1.0/src/docalign/checks/horiz_arrows.py +122 -0
  38. docalign-0.1.0/src/docalign/checks/list_descs.py +60 -0
  39. docalign-0.1.0/src/docalign/checks/pipes.py +90 -0
  40. docalign-0.1.0/src/docalign/checks/rails.py +459 -0
  41. docalign-0.1.0/src/docalign/checks/tables.py +91 -0
  42. docalign-0.1.0/src/docalign/checks/wide_chars.py +31 -0
  43. docalign-0.1.0/src/docalign/cli.py +273 -0
  44. docalign-0.1.0/src/docalign/constants.py +37 -0
  45. docalign-0.1.0/src/docalign/hints.py +82 -0
  46. docalign-0.1.0/src/docalign/parser.py +46 -0
  47. docalign-0.1.0/src/docalign/py.typed +0 -0
  48. docalign-0.1.0/src/docalign/utils.py +200 -0
  49. docalign-0.1.0/tests/fixtures/all-checks/expected.md +292 -0
  50. docalign-0.1.0/tests/fixtures/all-checks/input.md +292 -0
  51. docalign-0.1.0/tests/fixtures/checks/arrows/01-v-arrow-shift/expected.md +6 -0
  52. docalign-0.1.0/tests/fixtures/checks/arrows/01-v-arrow-shift/input.md +6 -0
  53. docalign-0.1.0/tests/fixtures/checks/arrows/02-fp-arrow-in-text/expected.md +8 -0
  54. docalign-0.1.0/tests/fixtures/checks/arrows/02-fp-arrow-in-text/input.md +8 -0
  55. docalign-0.1.0/tests/fixtures/checks/arrows/03-fp-already-aligned/expected.md +9 -0
  56. docalign-0.1.0/tests/fixtures/checks/arrows/03-fp-already-aligned/input.md +9 -0
  57. docalign-0.1.0/tests/fixtures/checks/arrows/04-embedded-arrow-in-border/check_only +0 -0
  58. docalign-0.1.0/tests/fixtures/checks/arrows/04-embedded-arrow-in-border/expected.md +9 -0
  59. docalign-0.1.0/tests/fixtures/checks/arrows/04-embedded-arrow-in-border/input.md +9 -0
  60. docalign-0.1.0/tests/fixtures/checks/arrows/05-fp-no-embedded-arrow/expected.md +10 -0
  61. docalign-0.1.0/tests/fixtures/checks/arrows/05-fp-no-embedded-arrow/input.md +10 -0
  62. docalign-0.1.0/tests/fixtures/checks/arrows/06-embedded-horiz-arrow-in-border/check_only +0 -0
  63. docalign-0.1.0/tests/fixtures/checks/arrows/06-embedded-horiz-arrow-in-border/expected.md +8 -0
  64. docalign-0.1.0/tests/fixtures/checks/arrows/06-embedded-horiz-arrow-in-border/input.md +8 -0
  65. docalign-0.1.0/tests/fixtures/checks/arrows/07-fp-no-embedded-horiz-arrow/expected.md +10 -0
  66. docalign-0.1.0/tests/fixtures/checks/arrows/07-fp-no-embedded-horiz-arrow/input.md +10 -0
  67. docalign-0.1.0/tests/fixtures/checks/box-padding/01-inconsistent-pad/expected.md +6 -0
  68. docalign-0.1.0/tests/fixtures/checks/box-padding/01-inconsistent-pad/input.md +6 -0
  69. docalign-0.1.0/tests/fixtures/checks/box-padding/02-fp-consistent/expected.md +6 -0
  70. docalign-0.1.0/tests/fixtures/checks/box-padding/02-fp-consistent/input.md +6 -0
  71. docalign-0.1.0/tests/fixtures/checks/box-padding/03-nested-boxes/expected.md +9 -0
  72. docalign-0.1.0/tests/fixtures/checks/box-padding/03-nested-boxes/input.md +9 -0
  73. docalign-0.1.0/tests/fixtures/checks/box-padding/04-fp-layout-intent/expected.md +7 -0
  74. docalign-0.1.0/tests/fixtures/checks/box-padding/04-fp-layout-intent/input.md +7 -0
  75. docalign-0.1.0/tests/fixtures/checks/box-padding/05-fp-single-content-line/expected.md +5 -0
  76. docalign-0.1.0/tests/fixtures/checks/box-padding/05-fp-single-content-line/input.md +5 -0
  77. docalign-0.1.0/tests/fixtures/checks/box-padding/06-fp-tight-box/expected.md +6 -0
  78. docalign-0.1.0/tests/fixtures/checks/box-padding/06-fp-tight-box/input.md +6 -0
  79. docalign-0.1.0/tests/fixtures/checks/box-spacing/01-content-touching-wall/expected.md +6 -0
  80. docalign-0.1.0/tests/fixtures/checks/box-spacing/01-content-touching-wall/input.md +6 -0
  81. docalign-0.1.0/tests/fixtures/checks/box-spacing/01-fp-side-by-side-nested/check_only +0 -0
  82. docalign-0.1.0/tests/fixtures/checks/box-spacing/01-fp-side-by-side-nested/expected.md +16 -0
  83. docalign-0.1.0/tests/fixtures/checks/box-spacing/01-fp-side-by-side-nested/input.md +16 -0
  84. docalign-0.1.0/tests/fixtures/checks/box-spacing/02-fp-padded/expected.md +6 -0
  85. docalign-0.1.0/tests/fixtures/checks/box-spacing/02-fp-padded/input.md +6 -0
  86. docalign-0.1.0/tests/fixtures/checks/box-walls/01-short-wall/expected.md +6 -0
  87. docalign-0.1.0/tests/fixtures/checks/box-walls/01-short-wall/input.md +6 -0
  88. docalign-0.1.0/tests/fixtures/checks/box-walls/02-inner-displaced/expected.md +11 -0
  89. docalign-0.1.0/tests/fixtures/checks/box-walls/02-inner-displaced/input.md +11 -0
  90. docalign-0.1.0/tests/fixtures/checks/box-walls/03-nested-cascade/expected.md +11 -0
  91. docalign-0.1.0/tests/fixtures/checks/box-walls/03-nested-cascade/input.md +11 -0
  92. docalign-0.1.0/tests/fixtures/checks/box-walls/04-fp-aligned-walls/expected.md +8 -0
  93. docalign-0.1.0/tests/fixtures/checks/box-walls/04-fp-aligned-walls/input.md +8 -0
  94. docalign-0.1.0/tests/fixtures/checks/box-walls/05-displaced-closing-row/expected.md +10 -0
  95. docalign-0.1.0/tests/fixtures/checks/box-walls/05-displaced-closing-row/input.md +10 -0
  96. docalign-0.1.0/tests/fixtures/checks/box-walls/06-fp-adjacent-boxes-aligned/expected.md +6 -0
  97. docalign-0.1.0/tests/fixtures/checks/box-walls/06-fp-adjacent-boxes-aligned/input.md +6 -0
  98. docalign-0.1.0/tests/fixtures/checks/box-walls/07-displaced-closing-row-right/expected.md +6 -0
  99. docalign-0.1.0/tests/fixtures/checks/box-walls/07-displaced-closing-row-right/input.md +6 -0
  100. docalign-0.1.0/tests/fixtures/checks/box-widths/01-trailing-space/expected.md +6 -0
  101. docalign-0.1.0/tests/fixtures/checks/box-widths/01-trailing-space/input.md +6 -0
  102. docalign-0.1.0/tests/fixtures/checks/box-widths/02-border-vs-content/expected.md +6 -0
  103. docalign-0.1.0/tests/fixtures/checks/box-widths/02-border-vs-content/input.md +6 -0
  104. docalign-0.1.0/tests/fixtures/checks/box-widths/03-fp-consistent-width/expected.md +6 -0
  105. docalign-0.1.0/tests/fixtures/checks/box-widths/03-fp-consistent-width/input.md +6 -0
  106. docalign-0.1.0/tests/fixtures/checks/box-widths/04-fp-annotation-after-box/expected.md +5 -0
  107. docalign-0.1.0/tests/fixtures/checks/box-widths/04-fp-annotation-after-box/input.md +5 -0
  108. docalign-0.1.0/tests/fixtures/checks/box-widths/05-trailing-spaces-after-box/expected.md +6 -0
  109. docalign-0.1.0/tests/fixtures/checks/box-widths/05-trailing-spaces-after-box/input.md +6 -0
  110. docalign-0.1.0/tests/fixtures/checks/box-widths/06-fp-consistent-trailing-spaces/expected.md +6 -0
  111. docalign-0.1.0/tests/fixtures/checks/box-widths/06-fp-consistent-trailing-spaces/input.md +6 -0
  112. docalign-0.1.0/tests/fixtures/checks/box-widths/07-trailing-whitespace-after-fix/expected.md +15 -0
  113. docalign-0.1.0/tests/fixtures/checks/box-widths/07-trailing-whitespace-after-fix/input.md +15 -0
  114. docalign-0.1.0/tests/fixtures/checks/def-lists/01-basic/expected.md +4 -0
  115. docalign-0.1.0/tests/fixtures/checks/def-lists/01-basic/input.md +4 -0
  116. docalign-0.1.0/tests/fixtures/checks/def-lists/02-fp-single-item/expected.md +2 -0
  117. docalign-0.1.0/tests/fixtures/checks/def-lists/02-fp-single-item/input.md +2 -0
  118. docalign-0.1.0/tests/fixtures/checks/def-lists/03-fp-url-in-value/expected.md +3 -0
  119. docalign-0.1.0/tests/fixtures/checks/def-lists/03-fp-url-in-value/input.md +3 -0
  120. docalign-0.1.0/tests/fixtures/checks/def-lists/04-multiple-groups/expected.md +8 -0
  121. docalign-0.1.0/tests/fixtures/checks/def-lists/04-multiple-groups/input.md +8 -0
  122. docalign-0.1.0/tests/fixtures/checks/def-lists/05-indented-keys/expected.md +4 -0
  123. docalign-0.1.0/tests/fixtures/checks/def-lists/05-indented-keys/input.md +4 -0
  124. docalign-0.1.0/tests/fixtures/checks/def-lists/06-fp-inside-code-block/expected.md +5 -0
  125. docalign-0.1.0/tests/fixtures/checks/def-lists/06-fp-inside-code-block/input.md +5 -0
  126. docalign-0.1.0/tests/fixtures/checks/def-lists/07-multi-word-keys/expected.md +4 -0
  127. docalign-0.1.0/tests/fixtures/checks/def-lists/07-multi-word-keys/input.md +4 -0
  128. docalign-0.1.0/tests/fixtures/checks/def-lists/08-fp-embedded-in-list/expected.md +5 -0
  129. docalign-0.1.0/tests/fixtures/checks/def-lists/08-fp-embedded-in-list/input.md +5 -0
  130. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/01-right-gap/expected.md +5 -0
  131. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/01-right-gap/input.md +5 -0
  132. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/02-left-gap/expected.md +5 -0
  133. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/02-left-gap/input.md +5 -0
  134. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/03-fp-touching/expected.md +5 -0
  135. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/03-fp-touching/input.md +5 -0
  136. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/04-both-directions/expected.md +5 -0
  137. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/04-both-directions/input.md +5 -0
  138. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/05-multiple-arrows/expected.md +9 -0
  139. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/05-multiple-arrows/input.md +9 -0
  140. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/06-fp-no-box-wall/expected.md +5 -0
  141. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/06-fp-no-box-wall/input.md +5 -0
  142. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/07-fp-floating-arrow/expected.md +6 -0
  143. docalign-0.1.0/tests/fixtures/checks/horiz-arrows/07-fp-floating-arrow/input.md +6 -0
  144. docalign-0.1.0/tests/fixtures/checks/list-descs/01-basic/expected.md +8 -0
  145. docalign-0.1.0/tests/fixtures/checks/list-descs/01-basic/input.md +8 -0
  146. docalign-0.1.0/tests/fixtures/checks/list-descs/02-fp-single-item/expected.md +5 -0
  147. docalign-0.1.0/tests/fixtures/checks/list-descs/02-fp-single-item/input.md +5 -0
  148. docalign-0.1.0/tests/fixtures/checks/list-descs/03-fp-hyphenated-words/expected.md +5 -0
  149. docalign-0.1.0/tests/fixtures/checks/list-descs/03-fp-hyphenated-words/input.md +5 -0
  150. docalign-0.1.0/tests/fixtures/checks/list-descs/04-fp-non-consecutive/expected.md +6 -0
  151. docalign-0.1.0/tests/fixtures/checks/list-descs/04-fp-non-consecutive/input.md +6 -0
  152. docalign-0.1.0/tests/fixtures/checks/list-descs/05-fp-inside-code-block/expected.md +6 -0
  153. docalign-0.1.0/tests/fixtures/checks/list-descs/05-fp-inside-code-block/input.md +6 -0
  154. docalign-0.1.0/tests/fixtures/checks/pipes/01-pipe-drift/expected.md +6 -0
  155. docalign-0.1.0/tests/fixtures/checks/pipes/01-pipe-drift/input.md +6 -0
  156. docalign-0.1.0/tests/fixtures/checks/pipes/02-fp-aligned-pipes/expected.md +10 -0
  157. docalign-0.1.0/tests/fixtures/checks/pipes/02-fp-aligned-pipes/input.md +10 -0
  158. docalign-0.1.0/tests/fixtures/checks/rails/01-column-drift/expected.md +7 -0
  159. docalign-0.1.0/tests/fixtures/checks/rails/01-column-drift/input.md +7 -0
  160. docalign-0.1.0/tests/fixtures/checks/rails/02-fp-aligned-rails/expected.md +5 -0
  161. docalign-0.1.0/tests/fixtures/checks/rails/02-fp-aligned-rails/input.md +5 -0
  162. docalign-0.1.0/tests/fixtures/checks/rails/03-multi-box-arrows/expected.md +6 -0
  163. docalign-0.1.0/tests/fixtures/checks/rails/03-multi-box-arrows/input.md +6 -0
  164. docalign-0.1.0/tests/fixtures/checks/rails/04-connector-rail-drift/expected.md +13 -0
  165. docalign-0.1.0/tests/fixtures/checks/rails/04-connector-rail-drift/input.md +13 -0
  166. docalign-0.1.0/tests/fixtures/checks/rails/05-inner-box-passthrough-drift/expected.md +15 -0
  167. docalign-0.1.0/tests/fixtures/checks/rails/05-inner-box-passthrough-drift/input.md +15 -0
  168. docalign-0.1.0/tests/fixtures/checks/tables/01-col-mismatch/expected.md +4 -0
  169. docalign-0.1.0/tests/fixtures/checks/tables/01-col-mismatch/input.md +4 -0
  170. docalign-0.1.0/tests/fixtures/checks/tables/02-fp-aligned-table/expected.md +4 -0
  171. docalign-0.1.0/tests/fixtures/checks/tables/02-fp-aligned-table/input.md +4 -0
  172. docalign-0.1.0/tests/fixtures/checks/tables/03-fp-pipe-in-text/expected.md +3 -0
  173. docalign-0.1.0/tests/fixtures/checks/tables/03-fp-pipe-in-text/input.md +3 -0
  174. docalign-0.1.0/tests/fixtures/checks/tables/04-pipe-in-backticks/expected.md +7 -0
  175. docalign-0.1.0/tests/fixtures/checks/tables/04-pipe-in-backticks/input.md +7 -0
  176. docalign-0.1.0/tests/fixtures/checks/tables/05-multiple-pipes-in-backticks/expected.md +7 -0
  177. docalign-0.1.0/tests/fixtures/checks/tables/05-multiple-pipes-in-backticks/input.md +7 -0
  178. docalign-0.1.0/tests/fixtures/checks/tables/06-pipes-in-multiple-columns/expected.md +6 -0
  179. docalign-0.1.0/tests/fixtures/checks/tables/06-pipes-in-multiple-columns/input.md +6 -0
  180. docalign-0.1.0/tests/fixtures/checks/tables/07-fp-aligned-pipes-in-backticks/expected.md +7 -0
  181. docalign-0.1.0/tests/fixtures/checks/tables/07-fp-aligned-pipes-in-backticks/input.md +7 -0
  182. docalign-0.1.0/tests/fixtures/checks/wide-chars/01-wide-chars-in-diagram/check_only +0 -0
  183. docalign-0.1.0/tests/fixtures/checks/wide-chars/01-wide-chars-in-diagram/expected.md +6 -0
  184. docalign-0.1.0/tests/fixtures/checks/wide-chars/01-wide-chars-in-diagram/input.md +6 -0
  185. docalign-0.1.0/tests/fixtures/checks/wide-chars/02-fp-no-wide-chars/expected.md +6 -0
  186. docalign-0.1.0/tests/fixtures/checks/wide-chars/02-fp-no-wide-chars/input.md +6 -0
  187. docalign-0.1.0/tests/fixtures/checks/wide-chars/03-fp-safe-box-chars/expected.md +6 -0
  188. docalign-0.1.0/tests/fixtures/checks/wide-chars/03-fp-safe-box-chars/input.md +6 -0
  189. docalign-0.1.0/tests/fixtures/general/deploy/01-pipeline-with-merge/expected.md +15 -0
  190. docalign-0.1.0/tests/fixtures/general/deploy/01-pipeline-with-merge/input.md +15 -0
  191. docalign-0.1.0/tests/fixtures/general/edge-cases/01-empty-file/expected.md +0 -0
  192. docalign-0.1.0/tests/fixtures/general/edge-cases/01-empty-file/input.md +0 -0
  193. docalign-0.1.0/tests/fixtures/general/edge-cases/02-no-code-blocks/expected.md +8 -0
  194. docalign-0.1.0/tests/fixtures/general/edge-cases/02-no-code-blocks/input.md +8 -0
  195. docalign-0.1.0/tests/fixtures/general/edge-cases/03-unclosed-code-block/expected.md +8 -0
  196. docalign-0.1.0/tests/fixtures/general/edge-cases/03-unclosed-code-block/input.md +8 -0
  197. docalign-0.1.0/tests/fixtures/general/edge-cases/04-unicode-in-box/expected.md +5 -0
  198. docalign-0.1.0/tests/fixtures/general/edge-cases/04-unicode-in-box/input.md +5 -0
  199. docalign-0.1.0/tests/fixtures/general/edge-cases/05-empty-code-block/expected.md +2 -0
  200. docalign-0.1.0/tests/fixtures/general/edge-cases/05-empty-code-block/input.md +2 -0
  201. docalign-0.1.0/tests/fixtures/general/mixed/01-multi-issue/expected.md +10 -0
  202. docalign-0.1.0/tests/fixtures/general/mixed/01-multi-issue/input.md +10 -0
  203. docalign-0.1.0/tests/fixtures/general/multi-column/01-sequence-diagram/expected.md +13 -0
  204. docalign-0.1.0/tests/fixtures/general/multi-column/01-sequence-diagram/input.md +13 -0
  205. docalign-0.1.0/tests/fixtures/general/multi-column/02-branching-flow/expected.md +12 -0
  206. docalign-0.1.0/tests/fixtures/general/multi-column/02-branching-flow/input.md +12 -0
  207. docalign-0.1.0/tests/fixtures/general/nested/01-deep-nested/expected.md +20 -0
  208. docalign-0.1.0/tests/fixtures/general/nested/01-deep-nested/input.md +20 -0
  209. docalign-0.1.0/tests/fixtures/general/nested/02-tree-inside-box/expected.md +16 -0
  210. docalign-0.1.0/tests/fixtures/general/nested/02-tree-inside-box/input.md +16 -0
  211. docalign-0.1.0/tests/fixtures/general/nested/03-inner-box-left-padding/expected.md +6 -0
  212. docalign-0.1.0/tests/fixtures/general/nested/03-inner-box-left-padding/input.md +6 -0
  213. docalign-0.1.0/tests/fixtures/general/nested/04-left-padding-with-connectors/expected.md +6 -0
  214. docalign-0.1.0/tests/fixtures/general/nested/04-left-padding-with-connectors/input.md +6 -0
  215. docalign-0.1.0/tests/fixtures/general/nested/05-nested-box-expansion/expected.md +7 -0
  216. docalign-0.1.0/tests/fixtures/general/nested/05-nested-box-expansion/input.md +7 -0
  217. docalign-0.1.0/tests/fixtures/general/nested/06-multi-box-same-line/expected.md +5 -0
  218. docalign-0.1.0/tests/fixtures/general/nested/06-multi-box-same-line/input.md +5 -0
  219. docalign-0.1.0/tests/fixtures/general/nested/07-complex-nested/expected.md +7 -0
  220. docalign-0.1.0/tests/fixtures/general/nested/07-complex-nested/input.md +7 -0
  221. docalign-0.1.0/tests/fixtures/general/nested/09-multi-box-with-connectors/expected.md +7 -0
  222. docalign-0.1.0/tests/fixtures/general/nested/09-multi-box-with-connectors/input.md +7 -0
  223. docalign-0.1.0/tests/fixtures/general/nested/11-parent-child-connector-alignment/expected.md +11 -0
  224. docalign-0.1.0/tests/fixtures/general/nested/11-parent-child-connector-alignment/input.md +11 -0
  225. docalign-0.1.0/tests/fixtures/general/trees/01-schema-tree/expected.md +6 -0
  226. docalign-0.1.0/tests/fixtures/general/trees/01-schema-tree/input.md +6 -0
  227. docalign-0.1.0/tests/fixtures/general/trees/02-flow-tree/expected.md +10 -0
  228. docalign-0.1.0/tests/fixtures/general/trees/02-flow-tree/input.md +10 -0
  229. docalign-0.1.0/tests/test_align.py +44 -0
  230. docalign-0.1.0/tests/test_hints.py +84 -0
@@ -0,0 +1,8 @@
1
+ [bumpversion]
2
+ current_version = 0.1.0
3
+ commit = False
4
+ tag = False
5
+
6
+ [bumpversion:file:pyproject.toml]
7
+ search = version = "{current_version}"
8
+ replace = version = "{new_version}"
File without changes
@@ -0,0 +1,39 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ jobs:
7
+ check:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - uses: actions/setup-python@v5
12
+ with:
13
+ python-version: "3.12"
14
+ - run: pip install -e ".[dev]"
15
+ - run: ruff check .
16
+ - run: ruff format --check .
17
+
18
+ practical-test:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+ - run: pip install -e ".[dev]"
26
+ - run: docalign --check docs/
27
+
28
+ test:
29
+ runs-on: ubuntu-latest
30
+ strategy:
31
+ matrix:
32
+ python-version: ["3.9", "3.12"]
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ - uses: actions/setup-python@v5
36
+ with:
37
+ python-version: ${{ matrix.python-version }}
38
+ - run: pip install -e ".[dev]"
39
+ - run: pytest -v
@@ -0,0 +1,8 @@
1
+ name: PRs
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ ci:
8
+ uses: ./.github/workflows/callable-ci.yml
@@ -0,0 +1,9 @@
1
+ name: Push to main
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ ci:
9
+ uses: ./.github/workflows/callable-ci.yml
@@ -0,0 +1,62 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ bump:
7
+ description: "Version bump type"
8
+ required: true
9
+ type: choice
10
+ options:
11
+ - patch
12
+ - minor
13
+ - major
14
+ - initial
15
+
16
+ permissions:
17
+ contents: write
18
+ id-token: write
19
+
20
+ jobs:
21
+ release:
22
+ runs-on: ubuntu-latest
23
+ environment: pypi
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - uses: actions/setup-python@v5
30
+ with:
31
+ python-version: "3.12"
32
+
33
+ - run: pip install bump2version towncrier hatch
34
+
35
+ - name: Configure git
36
+ run: |
37
+ git config user.name "github-actions[bot]"
38
+ git config user.email "github-actions[bot]@users.noreply.github.com"
39
+
40
+ - name: Bump version
41
+ if: inputs.bump != 'initial'
42
+ run: bump2version ${{ inputs.bump }}
43
+
44
+ - name: Read new version
45
+ id: version
46
+ run: echo "version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")" >> "$GITHUB_OUTPUT"
47
+
48
+ - name: Build changelog
49
+ run: towncrier build --yes --version ${{ steps.version.outputs.version }}
50
+
51
+ - name: Commit and tag
52
+ run: |
53
+ git add -A
54
+ git commit -m "chore: release v${{ steps.version.outputs.version }}"
55
+ git tag "v${{ steps.version.outputs.version }}"
56
+ git push origin main --tags
57
+
58
+ - name: Build
59
+ run: hatch build
60
+
61
+ - name: Publish to PyPI
62
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,7 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .ignore
@@ -0,0 +1,62 @@
1
+ ## 0.1.0 (2026-02-18)
2
+
3
+ No significant changes.
4
+
5
+
6
+ ## 0.3.3 (2026-02-17)
7
+
8
+ No significant changes.
9
+
10
+
11
+ ## 0.3.2 (2026-02-16)
12
+
13
+ No significant changes.
14
+
15
+
16
+ ## 0.3.1 (2026-02-16)
17
+
18
+ No significant changes.
19
+
20
+
21
+ ## 0.3.0 (2026-02-16)
22
+
23
+ No significant changes.
24
+
25
+
26
+ ## 0.2.4 (2026-02-15)
27
+
28
+ No significant changes.
29
+
30
+
31
+ ## 0.2.3 (2026-02-15)
32
+
33
+ No significant changes.
34
+
35
+
36
+ ## 0.2.2 (2026-02-15)
37
+
38
+ No significant changes.
39
+
40
+
41
+ ## 0.2.1 (2026-02-15)
42
+
43
+ No significant changes.
44
+
45
+
46
+ ## 0.2.0 (2026-02-15)
47
+
48
+ No significant changes.
49
+
50
+
51
+ ## 0.1.1 (2026-02-12)
52
+
53
+ ### Misc
54
+
55
+ - Add README as PyPI project description (add-readme-to-pypi)
56
+
57
+
58
+ ## 0.1.0 (2026-02-12)
59
+
60
+ ### Features
61
+
62
+ - Initial release with CLI support for auto-fixing markdown table alignment (initial-release)
docalign-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lucas Vieira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ install:
2
+ python3 -m venv .venv
3
+ .venv/bin/pip install -e ".[dev]"
4
+
5
+ check:
6
+ .venv/bin/ruff check .
7
+ .venv/bin/ruff format --check .
8
+
9
+ test:
10
+ .venv/bin/pytest -v
11
+
12
+ test-all-checks:
13
+ .venv/bin/pytest -v -k "all-checks"
14
+
15
+ practical-test:
16
+ .venv/bin/docalign docs/ --fix
17
+
18
+ changelog:
19
+ .venv/bin/towncrier build --yes --version $(shell python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
20
+
21
+ changelog-draft:
22
+ .venv/bin/towncrier build --draft --version $(shell python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
@@ -0,0 +1,188 @@
1
+ Metadata-Version: 2.4
2
+ Name: docalign
3
+ Version: 0.1.0
4
+ Summary: Auto-fix alignment in markdown docs
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.9
7
+ Provides-Extra: dev
8
+ Requires-Dist: bump2version>=1; extra == 'dev'
9
+ Requires-Dist: pytest>=7; extra == 'dev'
10
+ Requires-Dist: ruff>=0.9; extra == 'dev'
11
+ Requires-Dist: towncrier>=23; extra == 'dev'
12
+ Description-Content-Type: text/markdown
13
+
14
+ # Overview
15
+
16
+ CLI utility that auto-fixes alignment issues in markdown documentation files - tables, box-drawing diagrams, list descriptions, and more.
17
+
18
+ ```
19
+ ┌────────────────────────┐ ┌────────────────────────┐
20
+ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │
21
+ │ │ A │ │ B │ │ │ │ A │ │ B │ │
22
+ │ └──┬─┘ └──┬─┘ │ │ └──┬─┘ └──┬─┘ │
23
+ │ │ │ │ │ │ │ │
24
+ │ └────┬───┘ │ --> │ └────┬───┘ │
25
+ │ v │ │ v │
26
+ │ ┌──────┐ │ │ ┌──────┐ │
27
+ │ │ C │ │ │ │ C │ │
28
+ │ └──────┘ │ │ └──────┘ │
29
+ └────────────────────────┘ └────────────────────────┘
30
+ ```
31
+
32
+ <details>
33
+ <summary>More examples</summary>
34
+
35
+ ### [Tables](tests/fixtures/checks/tables)
36
+
37
+ ```
38
+ | Service | Usage | | Service | Usage |
39
+ |----------------|-------------------------------| |----------------|-------------------------------|
40
+ | Linear API | Status transitions, comments| --> | Linear API | Status transitions, comments |
41
+ | GitHub API| Repo clone, PR creation | | GitHub API | Repo clone, PR creation |
42
+ ```
43
+
44
+ ### [List descriptions](tests/fixtures/checks/list-descs)
45
+
46
+ ```
47
+ - docs/repo.md - mirrors CI steps - docs/repo.md - mirrors CI steps
48
+ - docs/guides/testing-strategy.md - test suite --> - docs/guides/testing-strategy.md - test suite
49
+ ```
50
+
51
+ ### [Box widths](tests/fixtures/checks/box-widths)
52
+
53
+ ```
54
+ ┌──────────────┐ ┌──────────────┐
55
+ │ Linear UI │ --> │ Linear UI │
56
+ │ (userscript)│ │ (userscript)│
57
+ └──────────────┘ └──────────────┘
58
+ ```
59
+
60
+ ### [Rail alignment](tests/fixtures/checks/rails)
61
+
62
+ ```
63
+ ┌──────┬──────┐ ┌──────┬──────┐
64
+ │ │ │ │ │ │
65
+ │ │ │ --> │ │ │
66
+ │ │ │ │ │ │
67
+ └──────┴──────┘ └──────┴──────┘
68
+ ```
69
+
70
+ ### [Arrow alignment](tests/fixtures/checks/arrows)
71
+
72
+ ```
73
+ ┌──────┐ ┌──────┐
74
+ │ step │ │ step │
75
+ └──┬───┘ └──┬───┘
76
+ │ --> │
77
+ v v
78
+ ┌──────┐ ┌──────┐
79
+ │ next │ │ next │
80
+ └──────┘ └──────┘
81
+ ```
82
+
83
+ ### [Pipe continuity](tests/fixtures/checks/pipes)
84
+
85
+ ```
86
+ ┌──────┬──────┐ ┌──────┬──────┐
87
+ │ src │ dest │ │ src │ dest │
88
+ └──────┴──┬───┘ └──────┴──┬───┘
89
+ │ --> │
90
+ │ │
91
+ │ │
92
+ ┌─────────┴───┐ ┌─────────┴───┐
93
+ │ output │ │ output │
94
+ └─────────────┘ └─────────────┘
95
+ ```
96
+
97
+ ### [Box spacing](tests/fixtures/checks/box-spacing)
98
+
99
+ ```
100
+ ┌───────────┐ ┌────────────┐
101
+ │ errors[] │ │ errors[] │
102
+ │ (strings)│ --> │ (strings) │
103
+ └───────────┘ └────────────┘
104
+ ```
105
+
106
+ ### [Box walls](tests/fixtures/checks/box-walls)
107
+
108
+ ```
109
+ ┌──────────────────┐ ┌──────────────────┐
110
+ │ content here │ │ content here │
111
+ │ more text │ --> │ more text │
112
+ └────────────────┘ └──────────────────┘
113
+ ```
114
+
115
+ </details>
116
+
117
+ ## Motivation
118
+
119
+ In the era of agentic engineering, documentation is the most critical artifact in any codebase. It guides both humans and AI agents.
120
+ When docs are visually harmonious - with aligned columns, consistent box widths, and straight connector lines - they become easier to read, parse, and maintain by everyone.
121
+
122
+ ## Features
123
+
124
+ - 3 modes - check (default), auto-fix in place, or unified diff
125
+ - flexible paths - files, directories, or glob patterns (e.g. `"docs/**/*.md"`)
126
+ - CI-friendly - exit code 0 when aligned, 1 when issues found
127
+ - 12 alignment checks:
128
+ - [Table columns](tests/fixtures/checks/tables) - pads cells so every column matches the separator row width
129
+ - [Box widths](tests/fixtures/checks/box-widths) - ensures all lines in a box group have the same total length
130
+ - [Box padding](tests/fixtures/checks/box-padding) - normalizes left-padding of content lines inside boxes
131
+ - [Horizontal arrows](tests/fixtures/checks/horiz-arrows) - closes gaps between `─>` / `<─` arrow tips and box walls
132
+ - [Rail alignment](tests/fixtures/checks/rails) - aligns vertically adjacent box chars to the same column
133
+ - [Arrow alignment](tests/fixtures/checks/arrows) - aligns standalone `v`/`^` arrows; detects `v`/`^` embedded in borders
134
+ - [Pipe continuity](tests/fixtures/checks/pipes) - traces from T-junctions to detect drifted connector pipes
135
+ - [Box spacing](tests/fixtures/checks/box-spacing) - ensures minimum right-side spacing between content and box wall
136
+ - [Box walls](tests/fixtures/checks/box-walls) - verifies nested box right walls match their opening/closing borders
137
+ - [List descriptions](tests/fixtures/checks/list-descs) - aligns the separator dash in list item descriptions
138
+ - [Definition lists](tests/fixtures/checks/def-lists) - aligns the `:` separator in `key: value` list items
139
+ - [Wide chars](tests/fixtures/checks/wide-chars) - detects ambiguous/double-width Unicode chars in code blocks
140
+
141
+ ## Commands
142
+
143
+ ```bash
144
+ docalign <path> # check-only (default) - detect issues, no writes
145
+ docalign --check <path> # explicit check-only (same as default)
146
+ docalign --fix <path> # auto-fix files in place
147
+ docalign --diff <path> # show unified diff of what would change
148
+ docalign --verbose <path> # show actionable hints with each error
149
+ docalign --ignore tables,pipes <path> # skip specific checks
150
+ docalign --help # show help
151
+ docalign --version # show version
152
+ ```
153
+
154
+ Paths can be files, directories, or glob patterns (e.g. `"docs/**/*.md"`).
155
+
156
+ Check names for `--ignore`: tables, box-widths, box-padding, box-spacing, horiz-arrows, box-walls, rails, arrows, pipes, list-descs, def-lists, wide-chars.
157
+
158
+ Exit codes: 0 = all aligned, 1 = issues found.
159
+
160
+ ### Install
161
+
162
+ ```bash
163
+ pipx install docalign
164
+ # pip install docalign
165
+ ```
166
+
167
+ ### Update
168
+
169
+ ```bash
170
+ pipx upgrade docalign
171
+ # pip install --upgrade docalign
172
+ ```
173
+
174
+ ### Uninstall
175
+
176
+ ```bash
177
+ pipx uninstall docalign
178
+ # pip uninstall docalign
179
+ ```
180
+
181
+ ## Development
182
+
183
+ ```bash
184
+ python3 -m venv .venv
185
+ source .venv/bin/activate
186
+ pip install -e ".[dev]"
187
+ pytest -v
188
+ ```
@@ -0,0 +1,175 @@
1
+ # Overview
2
+
3
+ CLI utility that auto-fixes alignment issues in markdown documentation files - tables, box-drawing diagrams, list descriptions, and more.
4
+
5
+ ```
6
+ ┌────────────────────────┐ ┌────────────────────────┐
7
+ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │
8
+ │ │ A │ │ B │ │ │ │ A │ │ B │ │
9
+ │ └──┬─┘ └──┬─┘ │ │ └──┬─┘ └──┬─┘ │
10
+ │ │ │ │ │ │ │ │
11
+ │ └────┬───┘ │ --> │ └────┬───┘ │
12
+ │ v │ │ v │
13
+ │ ┌──────┐ │ │ ┌──────┐ │
14
+ │ │ C │ │ │ │ C │ │
15
+ │ └──────┘ │ │ └──────┘ │
16
+ └────────────────────────┘ └────────────────────────┘
17
+ ```
18
+
19
+ <details>
20
+ <summary>More examples</summary>
21
+
22
+ ### [Tables](tests/fixtures/checks/tables)
23
+
24
+ ```
25
+ | Service | Usage | | Service | Usage |
26
+ |----------------|-------------------------------| |----------------|-------------------------------|
27
+ | Linear API | Status transitions, comments| --> | Linear API | Status transitions, comments |
28
+ | GitHub API| Repo clone, PR creation | | GitHub API | Repo clone, PR creation |
29
+ ```
30
+
31
+ ### [List descriptions](tests/fixtures/checks/list-descs)
32
+
33
+ ```
34
+ - docs/repo.md - mirrors CI steps - docs/repo.md - mirrors CI steps
35
+ - docs/guides/testing-strategy.md - test suite --> - docs/guides/testing-strategy.md - test suite
36
+ ```
37
+
38
+ ### [Box widths](tests/fixtures/checks/box-widths)
39
+
40
+ ```
41
+ ┌──────────────┐ ┌──────────────┐
42
+ │ Linear UI │ --> │ Linear UI │
43
+ │ (userscript)│ │ (userscript)│
44
+ └──────────────┘ └──────────────┘
45
+ ```
46
+
47
+ ### [Rail alignment](tests/fixtures/checks/rails)
48
+
49
+ ```
50
+ ┌──────┬──────┐ ┌──────┬──────┐
51
+ │ │ │ │ │ │
52
+ │ │ │ --> │ │ │
53
+ │ │ │ │ │ │
54
+ └──────┴──────┘ └──────┴──────┘
55
+ ```
56
+
57
+ ### [Arrow alignment](tests/fixtures/checks/arrows)
58
+
59
+ ```
60
+ ┌──────┐ ┌──────┐
61
+ │ step │ │ step │
62
+ └──┬───┘ └──┬───┘
63
+ │ --> │
64
+ v v
65
+ ┌──────┐ ┌──────┐
66
+ │ next │ │ next │
67
+ └──────┘ └──────┘
68
+ ```
69
+
70
+ ### [Pipe continuity](tests/fixtures/checks/pipes)
71
+
72
+ ```
73
+ ┌──────┬──────┐ ┌──────┬──────┐
74
+ │ src │ dest │ │ src │ dest │
75
+ └──────┴──┬───┘ └──────┴──┬───┘
76
+ │ --> │
77
+ │ │
78
+ │ │
79
+ ┌─────────┴───┐ ┌─────────┴───┐
80
+ │ output │ │ output │
81
+ └─────────────┘ └─────────────┘
82
+ ```
83
+
84
+ ### [Box spacing](tests/fixtures/checks/box-spacing)
85
+
86
+ ```
87
+ ┌───────────┐ ┌────────────┐
88
+ │ errors[] │ │ errors[] │
89
+ │ (strings)│ --> │ (strings) │
90
+ └───────────┘ └────────────┘
91
+ ```
92
+
93
+ ### [Box walls](tests/fixtures/checks/box-walls)
94
+
95
+ ```
96
+ ┌──────────────────┐ ┌──────────────────┐
97
+ │ content here │ │ content here │
98
+ │ more text │ --> │ more text │
99
+ └────────────────┘ └──────────────────┘
100
+ ```
101
+
102
+ </details>
103
+
104
+ ## Motivation
105
+
106
+ In the era of agentic engineering, documentation is the most critical artifact in any codebase. It guides both humans and AI agents.
107
+ When docs are visually harmonious - with aligned columns, consistent box widths, and straight connector lines - they become easier to read, parse, and maintain by everyone.
108
+
109
+ ## Features
110
+
111
+ - 3 modes - check (default), auto-fix in place, or unified diff
112
+ - flexible paths - files, directories, or glob patterns (e.g. `"docs/**/*.md"`)
113
+ - CI-friendly - exit code 0 when aligned, 1 when issues found
114
+ - 12 alignment checks:
115
+ - [Table columns](tests/fixtures/checks/tables) - pads cells so every column matches the separator row width
116
+ - [Box widths](tests/fixtures/checks/box-widths) - ensures all lines in a box group have the same total length
117
+ - [Box padding](tests/fixtures/checks/box-padding) - normalizes left-padding of content lines inside boxes
118
+ - [Horizontal arrows](tests/fixtures/checks/horiz-arrows) - closes gaps between `─>` / `<─` arrow tips and box walls
119
+ - [Rail alignment](tests/fixtures/checks/rails) - aligns vertically adjacent box chars to the same column
120
+ - [Arrow alignment](tests/fixtures/checks/arrows) - aligns standalone `v`/`^` arrows; detects `v`/`^` embedded in borders
121
+ - [Pipe continuity](tests/fixtures/checks/pipes) - traces from T-junctions to detect drifted connector pipes
122
+ - [Box spacing](tests/fixtures/checks/box-spacing) - ensures minimum right-side spacing between content and box wall
123
+ - [Box walls](tests/fixtures/checks/box-walls) - verifies nested box right walls match their opening/closing borders
124
+ - [List descriptions](tests/fixtures/checks/list-descs) - aligns the separator dash in list item descriptions
125
+ - [Definition lists](tests/fixtures/checks/def-lists) - aligns the `:` separator in `key: value` list items
126
+ - [Wide chars](tests/fixtures/checks/wide-chars) - detects ambiguous/double-width Unicode chars in code blocks
127
+
128
+ ## Commands
129
+
130
+ ```bash
131
+ docalign <path> # check-only (default) - detect issues, no writes
132
+ docalign --check <path> # explicit check-only (same as default)
133
+ docalign --fix <path> # auto-fix files in place
134
+ docalign --diff <path> # show unified diff of what would change
135
+ docalign --verbose <path> # show actionable hints with each error
136
+ docalign --ignore tables,pipes <path> # skip specific checks
137
+ docalign --help # show help
138
+ docalign --version # show version
139
+ ```
140
+
141
+ Paths can be files, directories, or glob patterns (e.g. `"docs/**/*.md"`).
142
+
143
+ Check names for `--ignore`: tables, box-widths, box-padding, box-spacing, horiz-arrows, box-walls, rails, arrows, pipes, list-descs, def-lists, wide-chars.
144
+
145
+ Exit codes: 0 = all aligned, 1 = issues found.
146
+
147
+ ### Install
148
+
149
+ ```bash
150
+ pipx install docalign
151
+ # pip install docalign
152
+ ```
153
+
154
+ ### Update
155
+
156
+ ```bash
157
+ pipx upgrade docalign
158
+ # pip install --upgrade docalign
159
+ ```
160
+
161
+ ### Uninstall
162
+
163
+ ```bash
164
+ pipx uninstall docalign
165
+ # pip uninstall docalign
166
+ ```
167
+
168
+ ## Development
169
+
170
+ ```bash
171
+ python3 -m venv .venv
172
+ source .venv/bin/activate
173
+ pip install -e ".[dev]"
174
+ pytest -v
175
+ ```