PyReprism 0.0.3__tar.gz → 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 (335) hide show
  1. pyreprism-0.1.0/.flake8 +11 -0
  2. pyreprism-0.1.0/.github/scripts/changelog_notes.py +40 -0
  3. pyreprism-0.1.0/.github/scripts/package_version.py +21 -0
  4. pyreprism-0.1.0/.github/workflows/ci.yml +71 -0
  5. pyreprism-0.1.0/.github/workflows/publish.yml +91 -0
  6. {pyreprism-0.0.3 → pyreprism-0.1.0}/.gitignore +6 -1
  7. pyreprism-0.1.0/.pre-commit-hooks.yaml +27 -0
  8. {pyreprism-0.0.3 → pyreprism-0.1.0}/.readthedocs.yaml +4 -3
  9. pyreprism-0.1.0/CHANGELOG.md +78 -0
  10. {pyreprism-0.0.3 → pyreprism-0.1.0}/CONTRIBUTING.md +7 -2
  11. pyreprism-0.1.0/PKG-INFO +111 -0
  12. pyreprism-0.1.0/README.md +246 -0
  13. pyreprism-0.1.0/RELEASING.md +61 -0
  14. pyreprism-0.1.0/docs/intro.rst +53 -0
  15. pyreprism-0.1.0/pyproject.toml +78 -0
  16. pyreprism-0.1.0/src/PyReprism/__init__.py +342 -0
  17. pyreprism-0.1.0/src/PyReprism/__main__.py +7 -0
  18. pyreprism-0.1.0/src/PyReprism/_tokenops.py +78 -0
  19. pyreprism-0.1.0/src/PyReprism/batch.py +208 -0
  20. pyreprism-0.1.0/src/PyReprism/cli.py +429 -0
  21. pyreprism-0.1.0/src/PyReprism/diffs.py +391 -0
  22. pyreprism-0.1.0/src/PyReprism/engines/__init__.py +34 -0
  23. pyreprism-0.1.0/src/PyReprism/engines/base.py +18 -0
  24. pyreprism-0.1.0/src/PyReprism/engines/pygments_engine.py +108 -0
  25. pyreprism-0.1.0/src/PyReprism/engines/regex_engine.py +14 -0
  26. pyreprism-0.1.0/src/PyReprism/languages/__init__.py +101 -0
  27. pyreprism-0.1.0/src/PyReprism/languages/abap.py +99 -0
  28. pyreprism-0.1.0/src/PyReprism/languages/actionscript.py +82 -0
  29. pyreprism-0.1.0/src/PyReprism/languages/ada.py +80 -0
  30. pyreprism-0.1.0/src/PyReprism/languages/apacheconf.py +102 -0
  31. pyreprism-0.1.0/src/PyReprism/languages/apl.py +67 -0
  32. pyreprism-0.1.0/src/PyReprism/languages/applescript.py +57 -0
  33. pyreprism-0.1.0/src/PyReprism/languages/arduino.py +97 -0
  34. pyreprism-0.1.0/src/PyReprism/languages/arff.py +84 -0
  35. pyreprism-0.1.0/src/PyReprism/languages/asciidoc.py +78 -0
  36. pyreprism-0.1.0/src/PyReprism/languages/asm6502.py +88 -0
  37. pyreprism-0.1.0/src/PyReprism/languages/aspnet.py +97 -0
  38. {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/languages/autohotkey.py +26 -29
  39. pyreprism-0.1.0/src/PyReprism/languages/autoit.py +46 -0
  40. pyreprism-0.1.0/src/PyReprism/languages/base.py +323 -0
  41. pyreprism-0.1.0/src/PyReprism/languages/bash.py +39 -0
  42. {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/languages/basic.py +31 -40
  43. pyreprism-0.1.0/src/PyReprism/languages/batch.py +40 -0
  44. pyreprism-0.1.0/src/PyReprism/languages/bison.py +43 -0
  45. pyreprism-0.1.0/src/PyReprism/languages/brainfuck.py +42 -0
  46. pyreprism-0.1.0/src/PyReprism/languages/bro.py +44 -0
  47. pyreprism-0.1.0/src/PyReprism/languages/c.py +64 -0
  48. pyreprism-0.1.0/src/PyReprism/languages/clike.py +39 -0
  49. pyreprism-0.1.0/src/PyReprism/languages/clojure.py +50 -0
  50. pyreprism-0.1.0/src/PyReprism/languages/coffeescript.py +40 -0
  51. {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/languages/cpp.py +30 -22
  52. pyreprism-0.1.0/src/PyReprism/languages/crystal.py +49 -0
  53. pyreprism-0.1.0/src/PyReprism/languages/csharp.py +53 -0
  54. pyreprism-0.1.0/src/PyReprism/languages/csp.py +45 -0
  55. pyreprism-0.1.0/src/PyReprism/languages/css.py +28 -0
  56. pyreprism-0.1.0/src/PyReprism/languages/css_extras.py +28 -0
  57. pyreprism-0.1.0/src/PyReprism/languages/d.py +54 -0
  58. pyreprism-0.1.0/src/PyReprism/languages/dart.py +55 -0
  59. pyreprism-0.1.0/src/PyReprism/languages/diff.py +42 -0
  60. pyreprism-0.1.0/src/PyReprism/languages/django.py +62 -0
  61. pyreprism-0.1.0/src/PyReprism/languages/docker.py +101 -0
  62. pyreprism-0.1.0/src/PyReprism/languages/eiffel.py +42 -0
  63. pyreprism-0.1.0/src/PyReprism/languages/elixir.py +54 -0
  64. pyreprism-0.1.0/src/PyReprism/languages/erb.py +46 -0
  65. pyreprism-0.1.0/src/PyReprism/languages/erlang.py +55 -0
  66. pyreprism-0.1.0/src/PyReprism/languages/flow.py +30 -0
  67. pyreprism-0.1.0/src/PyReprism/languages/fortran.py +51 -0
  68. pyreprism-0.1.0/src/PyReprism/languages/fsharp.py +52 -0
  69. pyreprism-0.1.0/src/PyReprism/languages/gedcom.py +33 -0
  70. pyreprism-0.1.0/src/PyReprism/languages/gherkin.py +31 -0
  71. pyreprism-0.1.0/src/PyReprism/languages/git.py +32 -0
  72. pyreprism-0.1.0/src/PyReprism/languages/glsl.py +36 -0
  73. pyreprism-0.1.0/src/PyReprism/languages/go.py +47 -0
  74. pyreprism-0.1.0/src/PyReprism/languages/graphql.py +51 -0
  75. pyreprism-0.1.0/src/PyReprism/languages/groovy.py +55 -0
  76. pyreprism-0.1.0/src/PyReprism/languages/haml.py +29 -0
  77. pyreprism-0.1.0/src/PyReprism/languages/handlebars.py +41 -0
  78. pyreprism-0.1.0/src/PyReprism/languages/haskell.py +37 -0
  79. pyreprism-0.1.0/src/PyReprism/languages/haxe.py +57 -0
  80. pyreprism-0.1.0/src/PyReprism/languages/hpkp.py +40 -0
  81. pyreprism-0.1.0/src/PyReprism/languages/hsts.py +40 -0
  82. pyreprism-0.1.0/src/PyReprism/languages/html.py +40 -0
  83. pyreprism-0.1.0/src/PyReprism/languages/ichigojam.py +55 -0
  84. pyreprism-0.1.0/src/PyReprism/languages/icon.py +59 -0
  85. pyreprism-0.1.0/src/PyReprism/languages/inform7.py +83 -0
  86. pyreprism-0.1.0/src/PyReprism/languages/ini.py +39 -0
  87. pyreprism-0.1.0/src/PyReprism/languages/io.py +43 -0
  88. pyreprism-0.1.0/src/PyReprism/languages/j.py +28 -0
  89. pyreprism-0.1.0/src/PyReprism/languages/java.py +101 -0
  90. pyreprism-0.1.0/src/PyReprism/languages/javascript.py +52 -0
  91. pyreprism-0.1.0/src/PyReprism/languages/jolie.py +29 -0
  92. pyreprism-0.1.0/src/PyReprism/languages/json.py +29 -0
  93. pyreprism-0.1.0/src/PyReprism/languages/jsx.py +118 -0
  94. pyreprism-0.1.0/src/PyReprism/languages/julia.py +79 -0
  95. pyreprism-0.1.0/src/PyReprism/languages/keyman.py +69 -0
  96. pyreprism-0.1.0/src/PyReprism/languages/kotlin.py +50 -0
  97. pyreprism-0.1.0/src/PyReprism/languages/latex.py +45 -0
  98. pyreprism-0.1.0/src/PyReprism/languages/less.py +45 -0
  99. pyreprism-0.1.0/src/PyReprism/languages/liquid.py +45 -0
  100. pyreprism-0.1.0/src/PyReprism/languages/livescript.py +45 -0
  101. pyreprism-0.1.0/src/PyReprism/languages/lolcode.py +73 -0
  102. pyreprism-0.1.0/src/PyReprism/languages/lua.py +42 -0
  103. pyreprism-0.1.0/src/PyReprism/languages/makefile.py +31 -0
  104. pyreprism-0.1.0/src/PyReprism/languages/markdown.py +28 -0
  105. pyreprism-0.1.0/src/PyReprism/languages/markup.py +29 -0
  106. pyreprism-0.1.0/src/PyReprism/languages/markup_templating.py +32 -0
  107. pyreprism-0.1.0/src/PyReprism/languages/matlab.py +40 -0
  108. pyreprism-0.1.0/src/PyReprism/languages/mel.py +40 -0
  109. pyreprism-0.1.0/src/PyReprism/languages/mizar.py +32 -0
  110. pyreprism-0.1.0/src/PyReprism/languages/monkey.py +35 -0
  111. pyreprism-0.1.0/src/PyReprism/languages/n4js.py +35 -0
  112. pyreprism-0.1.0/src/PyReprism/languages/nasm.py +44 -0
  113. pyreprism-0.1.0/src/PyReprism/languages/nginx.py +44 -0
  114. pyreprism-0.1.0/src/PyReprism/languages/nim.py +54 -0
  115. pyreprism-0.1.0/src/PyReprism/languages/nix.py +39 -0
  116. pyreprism-0.1.0/src/PyReprism/languages/nsis.py +34 -0
  117. pyreprism-0.1.0/src/PyReprism/languages/objectivec.py +58 -0
  118. pyreprism-0.1.0/src/PyReprism/languages/ocaml.py +34 -0
  119. pyreprism-0.1.0/src/PyReprism/languages/opencl.py +40 -0
  120. pyreprism-0.1.0/src/PyReprism/languages/oz.py +33 -0
  121. pyreprism-0.1.0/src/PyReprism/languages/parigp.py +32 -0
  122. pyreprism-0.1.0/src/PyReprism/languages/parser.py +32 -0
  123. pyreprism-0.1.0/src/PyReprism/languages/pascal.py +49 -0
  124. pyreprism-0.1.0/src/PyReprism/languages/perl.py +70 -0
  125. pyreprism-0.1.0/src/PyReprism/languages/php.py +56 -0
  126. pyreprism-0.1.0/src/PyReprism/languages/php_extras.py +16 -0
  127. pyreprism-0.1.0/src/PyReprism/languages/plsql.py +43 -0
  128. pyreprism-0.1.0/src/PyReprism/languages/powershell.py +33 -0
  129. pyreprism-0.1.0/src/PyReprism/languages/processing.py +40 -0
  130. pyreprism-0.1.0/src/PyReprism/languages/prolog.py +31 -0
  131. pyreprism-0.1.0/src/PyReprism/languages/properties.py +28 -0
  132. pyreprism-0.1.0/src/PyReprism/languages/protobuf.py +40 -0
  133. pyreprism-0.1.0/src/PyReprism/languages/pug.py +31 -0
  134. pyreprism-0.1.0/src/PyReprism/languages/puppet.py +33 -0
  135. pyreprism-0.1.0/src/PyReprism/languages/pure.py +33 -0
  136. pyreprism-0.1.0/src/PyReprism/languages/python.py +97 -0
  137. pyreprism-0.1.0/src/PyReprism/languages/q.py +27 -0
  138. pyreprism-0.1.0/src/PyReprism/languages/qore.py +23 -0
  139. pyreprism-0.1.0/src/PyReprism/languages/r.py +24 -0
  140. pyreprism-0.1.0/src/PyReprism/languages/reason.py +34 -0
  141. pyreprism-0.1.0/src/PyReprism/languages/registry.py +52 -0
  142. pyreprism-0.1.0/src/PyReprism/languages/renpy.py +33 -0
  143. pyreprism-0.1.0/src/PyReprism/languages/rest.py +32 -0
  144. pyreprism-0.1.0/src/PyReprism/languages/rip.py +32 -0
  145. pyreprism-0.1.0/src/PyReprism/languages/roboconf.py +31 -0
  146. pyreprism-0.1.0/src/PyReprism/languages/ruby.py +39 -0
  147. pyreprism-0.1.0/src/PyReprism/languages/rust.py +55 -0
  148. pyreprism-0.1.0/src/PyReprism/languages/sas.py +45 -0
  149. pyreprism-0.1.0/src/PyReprism/languages/sass.py +33 -0
  150. pyreprism-0.1.0/src/PyReprism/languages/scala.py +50 -0
  151. pyreprism-0.1.0/src/PyReprism/languages/scheme.py +52 -0
  152. pyreprism-0.1.0/src/PyReprism/languages/scss.py +31 -0
  153. pyreprism-0.1.0/src/PyReprism/languages/smalltalk.py +55 -0
  154. pyreprism-0.1.0/src/PyReprism/languages/smarty.py +32 -0
  155. pyreprism-0.1.0/src/PyReprism/languages/soy.py +33 -0
  156. pyreprism-0.1.0/src/PyReprism/languages/sql.py +144 -0
  157. pyreprism-0.1.0/src/PyReprism/languages/stylus.py +56 -0
  158. pyreprism-0.1.0/src/PyReprism/languages/swift.py +57 -0
  159. pyreprism-0.1.0/src/PyReprism/languages/tcl.py +40 -0
  160. pyreprism-0.1.0/src/PyReprism/languages/textile.py +42 -0
  161. pyreprism-0.1.0/src/PyReprism/languages/tsx.py +52 -0
  162. pyreprism-0.1.0/src/PyReprism/languages/twig.py +77 -0
  163. pyreprism-0.1.0/src/PyReprism/languages/typescript.py +58 -0
  164. pyreprism-0.1.0/src/PyReprism/languages/vbnet.py +69 -0
  165. pyreprism-0.1.0/src/PyReprism/languages/velocity.py +31 -0
  166. pyreprism-0.1.0/src/PyReprism/languages/verilog.py +94 -0
  167. pyreprism-0.1.0/src/PyReprism/languages/vhdl.py +83 -0
  168. pyreprism-0.1.0/src/PyReprism/languages/vim.py +32 -0
  169. pyreprism-0.1.0/src/PyReprism/languages/visual_basic.py +41 -0
  170. pyreprism-0.1.0/src/PyReprism/languages/wasam.py +96 -0
  171. pyreprism-0.1.0/src/PyReprism/languages/xeora.py +78 -0
  172. pyreprism-0.1.0/src/PyReprism/languages/xojo.py +95 -0
  173. pyreprism-0.1.0/src/PyReprism/languages/yaml.py +28 -0
  174. pyreprism-0.1.0/src/PyReprism/metrics.py +41 -0
  175. pyreprism-0.1.0/src/PyReprism/tokens.py +37 -0
  176. {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/utils/extension.py +1 -0
  177. {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/utils/normalizer.py +3 -4
  178. pyreprism-0.0.3/.flake8 +0 -7
  179. pyreprism-0.0.3/.github/workflows/ci.yml +0 -41
  180. pyreprism-0.0.3/.github/workflows/publish.yml +0 -38
  181. pyreprism-0.0.3/PKG-INFO +0 -135
  182. pyreprism-0.0.3/README.md +0 -91
  183. pyreprism-0.0.3/pyproject.toml +0 -46
  184. pyreprism-0.0.3/pytest.ini +0 -4
  185. pyreprism-0.0.3/requirements.txt +0 -7
  186. pyreprism-0.0.3/src/PyReprism/languages/__init__.py +0 -147
  187. pyreprism-0.0.3/src/PyReprism/languages/abap.py +0 -50
  188. pyreprism-0.0.3/src/PyReprism/languages/actionscript.py +0 -43
  189. pyreprism-0.0.3/src/PyReprism/languages/ada.py +0 -49
  190. pyreprism-0.0.3/src/PyReprism/languages/apacheconf.py +0 -49
  191. pyreprism-0.0.3/src/PyReprism/languages/apl.py +0 -49
  192. pyreprism-0.0.3/src/PyReprism/languages/applescript.py +0 -49
  193. pyreprism-0.0.3/src/PyReprism/languages/arduino.py +0 -49
  194. pyreprism-0.0.3/src/PyReprism/languages/arff.py +0 -49
  195. pyreprism-0.0.3/src/PyReprism/languages/asciidoc.py +0 -49
  196. pyreprism-0.0.3/src/PyReprism/languages/asm6502.py +0 -49
  197. pyreprism-0.0.3/src/PyReprism/languages/aspnet.py +0 -49
  198. pyreprism-0.0.3/src/PyReprism/languages/autoit.py +0 -49
  199. pyreprism-0.0.3/src/PyReprism/languages/bash.py +0 -49
  200. pyreprism-0.0.3/src/PyReprism/languages/batch.py +0 -49
  201. pyreprism-0.0.3/src/PyReprism/languages/bison.py +0 -50
  202. pyreprism-0.0.3/src/PyReprism/languages/brainfuck.py +0 -50
  203. pyreprism-0.0.3/src/PyReprism/languages/bro.py +0 -49
  204. pyreprism-0.0.3/src/PyReprism/languages/c.py +0 -43
  205. pyreprism-0.0.3/src/PyReprism/languages/clike.py +0 -49
  206. pyreprism-0.0.3/src/PyReprism/languages/clojure.py +0 -50
  207. pyreprism-0.0.3/src/PyReprism/languages/coffeescript.py +0 -49
  208. pyreprism-0.0.3/src/PyReprism/languages/crystal.py +0 -49
  209. pyreprism-0.0.3/src/PyReprism/languages/csharp.py +0 -49
  210. pyreprism-0.0.3/src/PyReprism/languages/csp.py +0 -49
  211. pyreprism-0.0.3/src/PyReprism/languages/css.py +0 -49
  212. pyreprism-0.0.3/src/PyReprism/languages/css_extras.py +0 -49
  213. pyreprism-0.0.3/src/PyReprism/languages/d.py +0 -49
  214. pyreprism-0.0.3/src/PyReprism/languages/dart.py +0 -49
  215. pyreprism-0.0.3/src/PyReprism/languages/diff.py +0 -49
  216. pyreprism-0.0.3/src/PyReprism/languages/django.py +0 -48
  217. pyreprism-0.0.3/src/PyReprism/languages/docker.py +0 -49
  218. pyreprism-0.0.3/src/PyReprism/languages/eiffel.py +0 -49
  219. pyreprism-0.0.3/src/PyReprism/languages/elixir.py +0 -49
  220. pyreprism-0.0.3/src/PyReprism/languages/erb.py +0 -0
  221. pyreprism-0.0.3/src/PyReprism/languages/erlang.py +0 -49
  222. pyreprism-0.0.3/src/PyReprism/languages/flow.py +0 -0
  223. pyreprism-0.0.3/src/PyReprism/languages/fortran.py +0 -49
  224. pyreprism-0.0.3/src/PyReprism/languages/fsharp.py +0 -49
  225. pyreprism-0.0.3/src/PyReprism/languages/gedcom.py +0 -0
  226. pyreprism-0.0.3/src/PyReprism/languages/gherkin.py +0 -0
  227. pyreprism-0.0.3/src/PyReprism/languages/git.py +0 -0
  228. pyreprism-0.0.3/src/PyReprism/languages/glsl.py +0 -0
  229. pyreprism-0.0.3/src/PyReprism/languages/go.py +0 -49
  230. pyreprism-0.0.3/src/PyReprism/languages/graphql.py +0 -49
  231. pyreprism-0.0.3/src/PyReprism/languages/groovy.py +0 -49
  232. pyreprism-0.0.3/src/PyReprism/languages/haml.py +0 -49
  233. pyreprism-0.0.3/src/PyReprism/languages/handlebars.py +0 -0
  234. pyreprism-0.0.3/src/PyReprism/languages/haskell.py +0 -49
  235. pyreprism-0.0.3/src/PyReprism/languages/haxe.py +0 -0
  236. pyreprism-0.0.3/src/PyReprism/languages/hpkp.py +0 -0
  237. pyreprism-0.0.3/src/PyReprism/languages/hsts.py +0 -0
  238. pyreprism-0.0.3/src/PyReprism/languages/html.py +0 -43
  239. pyreprism-0.0.3/src/PyReprism/languages/ichigojam.py +0 -0
  240. pyreprism-0.0.3/src/PyReprism/languages/icon.py +0 -0
  241. pyreprism-0.0.3/src/PyReprism/languages/inform7.py +0 -0
  242. pyreprism-0.0.3/src/PyReprism/languages/ini.py +0 -40
  243. pyreprism-0.0.3/src/PyReprism/languages/io.py +0 -0
  244. pyreprism-0.0.3/src/PyReprism/languages/j.py +0 -49
  245. pyreprism-0.0.3/src/PyReprism/languages/java.py +0 -43
  246. pyreprism-0.0.3/src/PyReprism/languages/javascript.py +0 -49
  247. pyreprism-0.0.3/src/PyReprism/languages/jolie.py +0 -49
  248. pyreprism-0.0.3/src/PyReprism/languages/json.py +0 -49
  249. pyreprism-0.0.3/src/PyReprism/languages/jsx.py +0 -49
  250. pyreprism-0.0.3/src/PyReprism/languages/julia.py +0 -49
  251. pyreprism-0.0.3/src/PyReprism/languages/keyman.py +0 -0
  252. pyreprism-0.0.3/src/PyReprism/languages/kotlin.py +0 -49
  253. pyreprism-0.0.3/src/PyReprism/languages/latex.py +0 -49
  254. pyreprism-0.0.3/src/PyReprism/languages/less.py +0 -49
  255. pyreprism-0.0.3/src/PyReprism/languages/liquid.py +0 -49
  256. pyreprism-0.0.3/src/PyReprism/languages/livescript.py +0 -49
  257. pyreprism-0.0.3/src/PyReprism/languages/lolcode.py +0 -0
  258. pyreprism-0.0.3/src/PyReprism/languages/lua.py +0 -0
  259. pyreprism-0.0.3/src/PyReprism/languages/makefile.py +0 -49
  260. pyreprism-0.0.3/src/PyReprism/languages/markdown.py +0 -30
  261. pyreprism-0.0.3/src/PyReprism/languages/markup.py +0 -49
  262. pyreprism-0.0.3/src/PyReprism/languages/markup_templating.py +0 -0
  263. pyreprism-0.0.3/src/PyReprism/languages/matlab.py +0 -49
  264. pyreprism-0.0.3/src/PyReprism/languages/mel.py +0 -0
  265. pyreprism-0.0.3/src/PyReprism/languages/mizar.py +0 -0
  266. pyreprism-0.0.3/src/PyReprism/languages/monkey.py +0 -0
  267. pyreprism-0.0.3/src/PyReprism/languages/n4js.py +0 -49
  268. pyreprism-0.0.3/src/PyReprism/languages/nasm.py +0 -0
  269. pyreprism-0.0.3/src/PyReprism/languages/nginx.py +0 -49
  270. pyreprism-0.0.3/src/PyReprism/languages/nim.py +0 -0
  271. pyreprism-0.0.3/src/PyReprism/languages/nix.py +0 -0
  272. pyreprism-0.0.3/src/PyReprism/languages/nsis.py +0 -0
  273. pyreprism-0.0.3/src/PyReprism/languages/objectivec.py +0 -49
  274. pyreprism-0.0.3/src/PyReprism/languages/ocaml.py +0 -49
  275. pyreprism-0.0.3/src/PyReprism/languages/opencl.py +0 -0
  276. pyreprism-0.0.3/src/PyReprism/languages/oz.py +0 -0
  277. pyreprism-0.0.3/src/PyReprism/languages/parigp.py +0 -0
  278. pyreprism-0.0.3/src/PyReprism/languages/parser.py +0 -0
  279. pyreprism-0.0.3/src/PyReprism/languages/pascal.py +0 -48
  280. pyreprism-0.0.3/src/PyReprism/languages/perl.py +0 -49
  281. pyreprism-0.0.3/src/PyReprism/languages/php.py +0 -49
  282. pyreprism-0.0.3/src/PyReprism/languages/php_extras.py +0 -0
  283. pyreprism-0.0.3/src/PyReprism/languages/plsql.py +0 -0
  284. pyreprism-0.0.3/src/PyReprism/languages/powershell.py +0 -0
  285. pyreprism-0.0.3/src/PyReprism/languages/processing.py +0 -0
  286. pyreprism-0.0.3/src/PyReprism/languages/prolog.py +0 -49
  287. pyreprism-0.0.3/src/PyReprism/languages/properties.py +0 -0
  288. pyreprism-0.0.3/src/PyReprism/languages/protobuf.py +0 -0
  289. pyreprism-0.0.3/src/PyReprism/languages/pug.py +0 -0
  290. pyreprism-0.0.3/src/PyReprism/languages/puppet.py +0 -0
  291. pyreprism-0.0.3/src/PyReprism/languages/pure.py +0 -0
  292. pyreprism-0.0.3/src/PyReprism/languages/python.py +0 -50
  293. pyreprism-0.0.3/src/PyReprism/languages/q.py +0 -0
  294. pyreprism-0.0.3/src/PyReprism/languages/qore.py +0 -0
  295. pyreprism-0.0.3/src/PyReprism/languages/r.py +0 -0
  296. pyreprism-0.0.3/src/PyReprism/languages/reason.py +0 -0
  297. pyreprism-0.0.3/src/PyReprism/languages/renpy.py +0 -0
  298. pyreprism-0.0.3/src/PyReprism/languages/rest.py +0 -0
  299. pyreprism-0.0.3/src/PyReprism/languages/rip.py +0 -0
  300. pyreprism-0.0.3/src/PyReprism/languages/roboconf.py +0 -0
  301. pyreprism-0.0.3/src/PyReprism/languages/ruby.py +0 -49
  302. pyreprism-0.0.3/src/PyReprism/languages/rust.py +0 -49
  303. pyreprism-0.0.3/src/PyReprism/languages/sas.py +0 -0
  304. pyreprism-0.0.3/src/PyReprism/languages/sass.py +0 -0
  305. pyreprism-0.0.3/src/PyReprism/languages/scala.py +0 -49
  306. pyreprism-0.0.3/src/PyReprism/languages/scheme.py +0 -49
  307. pyreprism-0.0.3/src/PyReprism/languages/scss.py +0 -50
  308. pyreprism-0.0.3/src/PyReprism/languages/smalltalk.py +0 -49
  309. pyreprism-0.0.3/src/PyReprism/languages/smarty.py +0 -0
  310. pyreprism-0.0.3/src/PyReprism/languages/soy.py +0 -0
  311. pyreprism-0.0.3/src/PyReprism/languages/stylus.py +0 -49
  312. pyreprism-0.0.3/src/PyReprism/languages/swift.py +0 -49
  313. pyreprism-0.0.3/src/PyReprism/languages/tcl.py +0 -0
  314. pyreprism-0.0.3/src/PyReprism/languages/textile.py +0 -0
  315. pyreprism-0.0.3/src/PyReprism/languages/tsx.py +0 -49
  316. pyreprism-0.0.3/src/PyReprism/languages/twig.py +0 -0
  317. pyreprism-0.0.3/src/PyReprism/languages/typescript.py +0 -49
  318. pyreprism-0.0.3/src/PyReprism/languages/vbnet.py +0 -49
  319. pyreprism-0.0.3/src/PyReprism/languages/velocity.py +0 -49
  320. pyreprism-0.0.3/src/PyReprism/languages/verilog.py +0 -0
  321. pyreprism-0.0.3/src/PyReprism/languages/vhdl.py +0 -0
  322. pyreprism-0.0.3/src/PyReprism/languages/vim.py +0 -50
  323. pyreprism-0.0.3/src/PyReprism/languages/visual_basic.py +0 -50
  324. pyreprism-0.0.3/src/PyReprism/languages/wasam.py +0 -0
  325. pyreprism-0.0.3/src/PyReprism/languages/xeora.py +0 -0
  326. pyreprism-0.0.3/src/PyReprism/languages/xojo.py +0 -0
  327. pyreprism-0.0.3/src/PyReprism/languages/yaml.py +0 -50
  328. {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/FUNDING.yaml +0 -0
  329. {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  330. {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  331. {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  332. {pyreprism-0.0.3 → pyreprism-0.1.0}/LICENSE +0 -0
  333. {pyreprism-0.0.3 → pyreprism-0.1.0}/codecov.yml +0 -0
  334. /pyreprism-0.0.3/src/PyReprism/__init__.py → /pyreprism-0.1.0/src/PyReprism/py.typed +0 -0
  335. {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/utils/__init__.py +0 -0
@@ -0,0 +1,11 @@
1
+ [flake8]
2
+ show-source = True
3
+ count = True
4
+ statistics = True
5
+ max-line-length = 120
6
+ # E501: long lines are common in this project's regex/keyword tables.
7
+ # The W1/W2/W3 and E1/E2/E3 codes below are pre-existing whitespace/indentation
8
+ # style debt across the legacy language modules; they are ignored so flake8 can
9
+ # focus on real correctness issues (pyflakes F-codes, undefined names, etc.).
10
+ extend-ignore = E501, W191, W291, W292, W293, W391, E101, E117, E128, E231, E302, E303, E265, E266
11
+ exclude = .git,.github,venv,.venv,build,dist,docs,htmlcov,tests,src/PyReprism/languages/__init__.py,__test__.py
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env python3
2
+ """Print the CHANGELOG.md section for a given version.
3
+
4
+ Usage: ``python .github/scripts/changelog_notes.py 0.2.0``
5
+
6
+ Extracts the body under ``## [0.2.0] ...`` up to the next ``## [`` heading.
7
+ Falls back to a generic line if the version has no changelog section.
8
+ """
9
+ import pathlib
10
+ import re
11
+ import sys
12
+
13
+ CHANGELOG = pathlib.Path("CHANGELOG.md")
14
+
15
+
16
+ def notes_for(version: str, text: str) -> str:
17
+ pattern = re.compile(
18
+ r"^##\s*\[" + re.escape(version) + r"\][^\n]*\n(.*?)(?=^##\s*\[|\Z)",
19
+ re.MULTILINE | re.DOTALL,
20
+ )
21
+ match = pattern.search(text)
22
+ if match:
23
+ body = match.group(1).strip()
24
+ if body:
25
+ return body
26
+ return f"Release {version}."
27
+
28
+
29
+ def main() -> int:
30
+ if len(sys.argv) != 2:
31
+ print("usage: changelog_notes.py <version>", file=sys.stderr)
32
+ return 2
33
+ version = sys.argv[1]
34
+ text = CHANGELOG.read_text(encoding="utf-8") if CHANGELOG.exists() else ""
35
+ print(notes_for(version, text))
36
+ return 0
37
+
38
+
39
+ if __name__ == "__main__":
40
+ raise SystemExit(main())
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env python3
2
+ """Print the package version (``__version__`` from the package __init__)."""
3
+ import pathlib
4
+ import re
5
+ import sys
6
+
7
+ INIT = pathlib.Path("src/PyReprism/__init__.py")
8
+
9
+
10
+ def main() -> int:
11
+ match = re.search(r'^__version__\s*=\s*["\']([^"\']+)["\']',
12
+ INIT.read_text(encoding="utf-8"), re.MULTILINE)
13
+ if not match:
14
+ print("could not find __version__ in", INIT, file=sys.stderr)
15
+ return 1
16
+ print(match.group(1))
17
+ return 0
18
+
19
+
20
+ if __name__ == "__main__":
21
+ raise SystemExit(main())
@@ -0,0 +1,71 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ # Least-privilege by default.
9
+ permissions:
10
+ contents: read
11
+
12
+ # Cancel superseded runs on the same ref.
13
+ concurrency:
14
+ group: ci-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ test:
19
+ name: "Lint & test (Python ${{ matrix.python-version }})"
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
25
+ steps:
26
+ - name: Check out the code
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Set up Python ${{ matrix.python-version }}
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+ cache: pip
34
+ cache-dependency-path: pyproject.toml
35
+
36
+ - name: Install dependencies
37
+ run: |
38
+ python -m pip install --upgrade pip
39
+ pip install -e ".[dev]"
40
+
41
+ - name: Lint with flake8
42
+ run: flake8 src/PyReprism
43
+
44
+ - name: Run tests with pytest
45
+ run: pytest --cov=src/PyReprism --cov-report=xml
46
+
47
+ - name: Upload coverage to Codecov
48
+ if: matrix.python-version == '3.12'
49
+ uses: codecov/codecov-action@v5
50
+ with:
51
+ token: ${{ secrets.CODECOV_TOKEN }}
52
+ files: coverage.xml
53
+ fail_ci_if_error: false
54
+
55
+ build:
56
+ name: "Build & check package"
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ - name: Check out the code
60
+ uses: actions/checkout@v4
61
+
62
+ - name: Set up Python
63
+ uses: actions/setup-python@v5
64
+ with:
65
+ python-version: '3.12'
66
+
67
+ - name: Build and validate the distribution
68
+ run: |
69
+ python -m pip install --upgrade pip build twine
70
+ python -m build
71
+ twine check dist/*
@@ -0,0 +1,91 @@
1
+ name: Publish 📦 to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ name: Build distribution
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Check out the code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.12'
23
+
24
+ - name: Verify the tag matches the package version
25
+ run: |
26
+ PKG_VERSION="$(python .github/scripts/package_version.py)"
27
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
28
+ echo "tag=$TAG_VERSION package=$PKG_VERSION"
29
+ if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
30
+ echo "::error::Tag ($TAG_VERSION) does not match package version ($PKG_VERSION). Bump __version__ in src/PyReprism/__init__.py."
31
+ exit 1
32
+ fi
33
+
34
+ - name: Build and validate the distribution
35
+ run: |
36
+ python -m pip install --upgrade pip build twine
37
+ python -m build
38
+ twine check dist/*
39
+
40
+ - name: Upload build artifacts
41
+ uses: actions/upload-artifact@v4
42
+ with:
43
+ name: dist
44
+ path: dist/
45
+
46
+ publish:
47
+ name: Publish to PyPI
48
+ needs: build
49
+ runs-on: ubuntu-latest
50
+ environment:
51
+ name: pypi
52
+ url: https://pypi.org/project/PyReprism/
53
+ permissions:
54
+ id-token: write # Trusted Publishing (OIDC) — no API token needed.
55
+ steps:
56
+ - name: Download build artifacts
57
+ uses: actions/download-artifact@v4
58
+ with:
59
+ name: dist
60
+ path: dist/
61
+
62
+ - name: Publish distribution to PyPI
63
+ uses: pypa/gh-action-pypi-publish@release/v1
64
+
65
+ github-release:
66
+ name: Create GitHub Release
67
+ needs: publish
68
+ runs-on: ubuntu-latest
69
+ permissions:
70
+ contents: write # required to create a release
71
+ steps:
72
+ - name: Check out the code
73
+ uses: actions/checkout@v4
74
+
75
+ - name: Download build artifacts
76
+ uses: actions/download-artifact@v4
77
+ with:
78
+ name: dist
79
+ path: dist/
80
+
81
+ - name: Extract release notes from CHANGELOG
82
+ run: python .github/scripts/changelog_notes.py "${GITHUB_REF_NAME#v}" > release-notes.md
83
+
84
+ - name: Create GitHub Release
85
+ env:
86
+ GH_TOKEN: ${{ github.token }}
87
+ run: |
88
+ gh release create "$GITHUB_REF_NAME" \
89
+ --title "$GITHUB_REF_NAME" \
90
+ --notes-file release-notes.md \
91
+ dist/*
@@ -163,4 +163,9 @@ cython_debug/
163
163
  #.idea/
164
164
 
165
165
  # others
166
- __test__.py
166
+ __test__.py
167
+
168
+ # macOS
169
+ .DS_Store
170
+ # Claude Code agent workspace
171
+ .claude/
@@ -0,0 +1,27 @@
1
+ # PyReprism pre-commit hooks.
2
+ #
3
+ # Add to your .pre-commit-config.yaml, e.g.:
4
+ #
5
+ # - repo: https://github.com/unlv-evol/PyReprism
6
+ # rev: v0.1.0
7
+ # hooks:
8
+ # - id: pyreprism-strip-comments
9
+ # files: ^generated/ # scope it! these hooks rewrite files
10
+ #
11
+ # NOTE: these hooks modify source in place. Scope them with `files:`/`exclude:`
12
+ # to directories where stripping comments/whitespace is intended (e.g. generated
13
+ # or vendored code), not your whole repository.
14
+
15
+ - id: pyreprism-strip-comments
16
+ name: PyReprism – strip comments
17
+ description: Remove comments in place (language auto-detected from file extension).
18
+ entry: pyreprism remove comments --in-place
19
+ language: python
20
+ types: [text]
21
+
22
+ - id: pyreprism-normalize-whitespace
23
+ name: PyReprism – normalize whitespace
24
+ description: Collapse insignificant whitespace in place.
25
+ entry: pyreprism preprocess --steps whitespace --in-place
26
+ language: python
27
+ types: [text]
@@ -23,9 +23,10 @@ sphinx:
23
23
  # formats:
24
24
  # - pdf
25
25
 
26
- # Optionally declare the Python requirements required to build your docs
26
+ # Install the package together with its documentation extra.
27
27
  python:
28
28
  install:
29
- - requirements: docs/requirements.txt
30
29
  - method: pip
31
- path: .
30
+ path: .
31
+ extra_requirements:
32
+ - docs
@@ -0,0 +1,78 @@
1
+ # Changelog
2
+
3
+ All notable changes to PyReprism are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - **Diff processing** (`PyReprism.diffs`): parse unified/`git` diffs and analyze
12
+ the changed code per file in its own language. Includes churn metrics
13
+ (`diff_stats`: added/removed split into code, comment and blank), cosmetic
14
+ (comment/whitespace-only) change detection, reconstruction of the added/removed
15
+ code, and ML-oriented `tokenize`/`normalize`/`extract_comments` on changes.
16
+ Fragment mode works from the diff alone; setting a file's `new_source` /
17
+ `old_source` enables accurate full-file classification. New CLI command
18
+ `pyreprism diff` (`--json` / `--csv` / `--per-file` / `--cosmetic`).
19
+
20
+ ## [0.1.0] - 2026-07-07
21
+
22
+ This release turns PyReprism from a comment-removal helper into a full
23
+ source-preprocessing toolkit with a high-level API, a CLI, code metrics,
24
+ ML-oriented normalization, an optional accurate backend, and batch processing.
25
+
26
+ ### Added
27
+ - **High-level API** (`import PyReprism as pr`): `remove_*`, `extract_*`,
28
+ `count_*`, `match_*` for comments, keywords, numbers, operators, strings and
29
+ identifiers; plus `preprocess`, `remove_whitespaces`, `get_language` and
30
+ `detect_language`. `lang=` accepts a language name, file extension, or class.
31
+ - **Tokenizer**: `tokenize()` on every language returns a lossless, typed
32
+ `Token` stream (`Token`/`TokenType` in `PyReprism.tokens`).
33
+ - **Code metrics**: `stats()` returns a `CodeStats` (line/token counts,
34
+ comment-to-code ratio, comment density; `as_dict()` for JSON/dataframes).
35
+ - **ML normalization**: `normalize()` canonicalizes code (rename identifiers to
36
+ `VAR1…`, mask string/number literals, drop comments) for clone/plagiarism
37
+ detection and code-embedding pipelines; `blank_comments()` strips comments
38
+ while preserving line numbers.
39
+ - **Pluggable backends**: `engine="regex"` (default, zero-dependency) or
40
+ `engine="pygments"` (`pip install pyreprism[accurate]`) for higher accuracy,
41
+ plus `"auto"`. Available on every operation.
42
+ - **Batch processing** (`PyReprism.batch`): `analyze()` walks a directory tree
43
+ and returns an aggregate report (`to_json`/`to_csv`, per-language breakdown);
44
+ `transform()` bulk-applies a transformation into a mirrored output directory.
45
+ - **Command-line interface** (`pyreprism`, also `python -m PyReprism`):
46
+ `remove`, `extract`, `count`, `preprocess`, `tokenize`, `stats`, `normalize`,
47
+ `scan`, and `languages`; reads stdin/files/globs/directories; supports
48
+ `--lang`, `--engine`, `--in-place`, `--output`, and `--json`/`--csv`.
49
+ - **Source-based language detection**: `detect_language(source=...)` recognizes
50
+ `#!` shebangs and (when Pygments is installed) makes a best-effort content
51
+ guess; the CLI uses this to auto-detect the language of piped input.
52
+ - Pre-commit hooks (`.pre-commit-hooks.yaml`), a `py.typed` marker (PEP 561),
53
+ and a registry-wide test suite covering all supported languages.
54
+
55
+ ### Changed
56
+ - Implemented real support for 25 previously-empty language stubs and migrated
57
+ 22 legacy languages (HTML, JSON, YAML, CSS, Markdown, …) to the
58
+ `BaseLanguage` + registry pattern, making them importable via the public API.
59
+ - Ambiguous file extensions now resolve to a canonical language
60
+ (`.py` → Python, `.js` → JavaScript, …).
61
+ - Consolidated packaging into `pyproject.toml` (single version source, pytest
62
+ and coverage config), updated CI to a Python 3.8–3.12 matrix, and refreshed
63
+ the README.
64
+
65
+ ### Fixed
66
+ - Corrected comment-stripping for ~30 languages whose regexes either failed to
67
+ remove line comments or consumed surrounding code, and fixed duplicate/broken
68
+ definitions (Perl, csp, glsl, django, apacheconf, php_extras, ruby, and the
69
+ Python triple-quoted-docstring bug).
70
+
71
+ ## [0.0.4] - 2024
72
+
73
+ - Early beta releases: comment removal for an initial set of languages and the
74
+ `Normalizer` whitespace helper.
75
+
76
+ [Unreleased]: https://github.com/unlv-evol/PyReprism/compare/v0.1.0...HEAD
77
+ [0.1.0]: https://github.com/unlv-evol/PyReprism/releases/tag/v0.1.0
78
+ [0.0.4]: https://github.com/unlv-evol/PyReprism/releases/tag/v0.0.4
@@ -61,5 +61,10 @@ When you're finished with the changes, create a pull request, also known as a PR
61
61
 
62
62
  ### Your PR is merged!
63
63
 
64
- Congratulations :tada::tada: <br />
65
- The PyReprism team thanks you :sparkles:.
64
+ Congratulations :tada: :tada: <br />
65
+ The PyReprism team thanks you :sparkles:.
66
+
67
+ ## Maintainers: cutting a release
68
+
69
+ Releases are automated by pushing a `vX.Y.Z` tag. See [RELEASING.md](RELEASING.md)
70
+ for the full process.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyReprism
3
+ Version: 0.1.0
4
+ Summary: Framework for Source Code Preprocessing
5
+ Project-URL: Homepage, https://github.com/unlv-evol/PyReprism
6
+ Project-URL: Documentation, https://pyreprism.readthedocs.io
7
+ Project-URL: Issues, https://github.com/unlv-evol/PyReprism/issues
8
+ Author-email: UNLV EVOL LAB <ogenrwot@unlv.nevada.edu>
9
+ License: MIT License
10
+
11
+ Copyright (c) 2024 UNLV EVOL
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Classifier: Development Status :: 4 - Beta
32
+ Classifier: Environment :: Console
33
+ Classifier: Intended Audience :: Developers
34
+ Classifier: Intended Audience :: Science/Research
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Operating System :: OS Independent
37
+ Classifier: Programming Language :: Python :: 3
38
+ Classifier: Programming Language :: Python :: 3.8
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Requires-Python: >=3.8
45
+ Provides-Extra: accurate
46
+ Requires-Dist: pygments; extra == 'accurate'
47
+ Provides-Extra: dev
48
+ Requires-Dist: build; extra == 'dev'
49
+ Requires-Dist: flake8; extra == 'dev'
50
+ Requires-Dist: pygments; extra == 'dev'
51
+ Requires-Dist: pytest; extra == 'dev'
52
+ Requires-Dist: pytest-cov; extra == 'dev'
53
+ Requires-Dist: twine; extra == 'dev'
54
+ Provides-Extra: docs
55
+ Requires-Dist: sphinx; extra == 'docs'
56
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
57
+ Description-Content-Type: text/x-rst
58
+
59
+ .. _intro_toplevel:
60
+
61
+ ==================
62
+ Overview / Install
63
+ ==================
64
+
65
+ PyReprism is a Python framework that helps researchers and developers the task of source code preprocessing. With PyReprism, you can easily match, extract, count, and remove comments, whitespaces, operators, numbers and other language specific constructs from over 150 programming languages and file extensions.
66
+
67
+
68
+ Requirements
69
+ ============
70
+
71
+ * `Python`_ 3.6 or newer
72
+ * `Git`_
73
+
74
+ .. _Python: https://www.python.org
75
+ .. _Git: https://git-scm.com/
76
+
77
+ Installing PyReprism
78
+ ====================
79
+
80
+ Installing PyReprism is easily done using `pip`_. Assuming it is installed, just run the following from the command-line:
81
+
82
+ .. _pip: https://pip.pypa.io/en/latest/installing.html
83
+
84
+ .. sourcecode:: none
85
+
86
+ $ pip install PyReprism
87
+
88
+ Source Code
89
+ ===========
90
+
91
+ PyReprism's git repo is available on GitHub, which can be browsed at:
92
+
93
+ * https://github.com/unlv-evol/PyReprism.git
94
+
95
+ and cloned using::
96
+
97
+ $ git clone https://github.com/unlv-evol/PyReprism.git
98
+ $ cd PyReprism
99
+
100
+ Optionally (but suggested), make use of virtual environment. Therefore, before installing the requirements run::
101
+
102
+ $ python3 -m venv venv
103
+ $ source venv/bin/activate
104
+
105
+ Install the requirements::
106
+
107
+ $ pip install -r requirements.txt
108
+
109
+ and run the tests using pytest::
110
+
111
+ $ pytest