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.
- pyreprism-0.1.0/.flake8 +11 -0
- pyreprism-0.1.0/.github/scripts/changelog_notes.py +40 -0
- pyreprism-0.1.0/.github/scripts/package_version.py +21 -0
- pyreprism-0.1.0/.github/workflows/ci.yml +71 -0
- pyreprism-0.1.0/.github/workflows/publish.yml +91 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/.gitignore +6 -1
- pyreprism-0.1.0/.pre-commit-hooks.yaml +27 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/.readthedocs.yaml +4 -3
- pyreprism-0.1.0/CHANGELOG.md +78 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/CONTRIBUTING.md +7 -2
- pyreprism-0.1.0/PKG-INFO +111 -0
- pyreprism-0.1.0/README.md +246 -0
- pyreprism-0.1.0/RELEASING.md +61 -0
- pyreprism-0.1.0/docs/intro.rst +53 -0
- pyreprism-0.1.0/pyproject.toml +78 -0
- pyreprism-0.1.0/src/PyReprism/__init__.py +342 -0
- pyreprism-0.1.0/src/PyReprism/__main__.py +7 -0
- pyreprism-0.1.0/src/PyReprism/_tokenops.py +78 -0
- pyreprism-0.1.0/src/PyReprism/batch.py +208 -0
- pyreprism-0.1.0/src/PyReprism/cli.py +429 -0
- pyreprism-0.1.0/src/PyReprism/diffs.py +391 -0
- pyreprism-0.1.0/src/PyReprism/engines/__init__.py +34 -0
- pyreprism-0.1.0/src/PyReprism/engines/base.py +18 -0
- pyreprism-0.1.0/src/PyReprism/engines/pygments_engine.py +108 -0
- pyreprism-0.1.0/src/PyReprism/engines/regex_engine.py +14 -0
- pyreprism-0.1.0/src/PyReprism/languages/__init__.py +101 -0
- pyreprism-0.1.0/src/PyReprism/languages/abap.py +99 -0
- pyreprism-0.1.0/src/PyReprism/languages/actionscript.py +82 -0
- pyreprism-0.1.0/src/PyReprism/languages/ada.py +80 -0
- pyreprism-0.1.0/src/PyReprism/languages/apacheconf.py +102 -0
- pyreprism-0.1.0/src/PyReprism/languages/apl.py +67 -0
- pyreprism-0.1.0/src/PyReprism/languages/applescript.py +57 -0
- pyreprism-0.1.0/src/PyReprism/languages/arduino.py +97 -0
- pyreprism-0.1.0/src/PyReprism/languages/arff.py +84 -0
- pyreprism-0.1.0/src/PyReprism/languages/asciidoc.py +78 -0
- pyreprism-0.1.0/src/PyReprism/languages/asm6502.py +88 -0
- pyreprism-0.1.0/src/PyReprism/languages/aspnet.py +97 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/languages/autohotkey.py +26 -29
- pyreprism-0.1.0/src/PyReprism/languages/autoit.py +46 -0
- pyreprism-0.1.0/src/PyReprism/languages/base.py +323 -0
- pyreprism-0.1.0/src/PyReprism/languages/bash.py +39 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/languages/basic.py +31 -40
- pyreprism-0.1.0/src/PyReprism/languages/batch.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/bison.py +43 -0
- pyreprism-0.1.0/src/PyReprism/languages/brainfuck.py +42 -0
- pyreprism-0.1.0/src/PyReprism/languages/bro.py +44 -0
- pyreprism-0.1.0/src/PyReprism/languages/c.py +64 -0
- pyreprism-0.1.0/src/PyReprism/languages/clike.py +39 -0
- pyreprism-0.1.0/src/PyReprism/languages/clojure.py +50 -0
- pyreprism-0.1.0/src/PyReprism/languages/coffeescript.py +40 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/languages/cpp.py +30 -22
- pyreprism-0.1.0/src/PyReprism/languages/crystal.py +49 -0
- pyreprism-0.1.0/src/PyReprism/languages/csharp.py +53 -0
- pyreprism-0.1.0/src/PyReprism/languages/csp.py +45 -0
- pyreprism-0.1.0/src/PyReprism/languages/css.py +28 -0
- pyreprism-0.1.0/src/PyReprism/languages/css_extras.py +28 -0
- pyreprism-0.1.0/src/PyReprism/languages/d.py +54 -0
- pyreprism-0.1.0/src/PyReprism/languages/dart.py +55 -0
- pyreprism-0.1.0/src/PyReprism/languages/diff.py +42 -0
- pyreprism-0.1.0/src/PyReprism/languages/django.py +62 -0
- pyreprism-0.1.0/src/PyReprism/languages/docker.py +101 -0
- pyreprism-0.1.0/src/PyReprism/languages/eiffel.py +42 -0
- pyreprism-0.1.0/src/PyReprism/languages/elixir.py +54 -0
- pyreprism-0.1.0/src/PyReprism/languages/erb.py +46 -0
- pyreprism-0.1.0/src/PyReprism/languages/erlang.py +55 -0
- pyreprism-0.1.0/src/PyReprism/languages/flow.py +30 -0
- pyreprism-0.1.0/src/PyReprism/languages/fortran.py +51 -0
- pyreprism-0.1.0/src/PyReprism/languages/fsharp.py +52 -0
- pyreprism-0.1.0/src/PyReprism/languages/gedcom.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/gherkin.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/git.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/glsl.py +36 -0
- pyreprism-0.1.0/src/PyReprism/languages/go.py +47 -0
- pyreprism-0.1.0/src/PyReprism/languages/graphql.py +51 -0
- pyreprism-0.1.0/src/PyReprism/languages/groovy.py +55 -0
- pyreprism-0.1.0/src/PyReprism/languages/haml.py +29 -0
- pyreprism-0.1.0/src/PyReprism/languages/handlebars.py +41 -0
- pyreprism-0.1.0/src/PyReprism/languages/haskell.py +37 -0
- pyreprism-0.1.0/src/PyReprism/languages/haxe.py +57 -0
- pyreprism-0.1.0/src/PyReprism/languages/hpkp.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/hsts.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/html.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/ichigojam.py +55 -0
- pyreprism-0.1.0/src/PyReprism/languages/icon.py +59 -0
- pyreprism-0.1.0/src/PyReprism/languages/inform7.py +83 -0
- pyreprism-0.1.0/src/PyReprism/languages/ini.py +39 -0
- pyreprism-0.1.0/src/PyReprism/languages/io.py +43 -0
- pyreprism-0.1.0/src/PyReprism/languages/j.py +28 -0
- pyreprism-0.1.0/src/PyReprism/languages/java.py +101 -0
- pyreprism-0.1.0/src/PyReprism/languages/javascript.py +52 -0
- pyreprism-0.1.0/src/PyReprism/languages/jolie.py +29 -0
- pyreprism-0.1.0/src/PyReprism/languages/json.py +29 -0
- pyreprism-0.1.0/src/PyReprism/languages/jsx.py +118 -0
- pyreprism-0.1.0/src/PyReprism/languages/julia.py +79 -0
- pyreprism-0.1.0/src/PyReprism/languages/keyman.py +69 -0
- pyreprism-0.1.0/src/PyReprism/languages/kotlin.py +50 -0
- pyreprism-0.1.0/src/PyReprism/languages/latex.py +45 -0
- pyreprism-0.1.0/src/PyReprism/languages/less.py +45 -0
- pyreprism-0.1.0/src/PyReprism/languages/liquid.py +45 -0
- pyreprism-0.1.0/src/PyReprism/languages/livescript.py +45 -0
- pyreprism-0.1.0/src/PyReprism/languages/lolcode.py +73 -0
- pyreprism-0.1.0/src/PyReprism/languages/lua.py +42 -0
- pyreprism-0.1.0/src/PyReprism/languages/makefile.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/markdown.py +28 -0
- pyreprism-0.1.0/src/PyReprism/languages/markup.py +29 -0
- pyreprism-0.1.0/src/PyReprism/languages/markup_templating.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/matlab.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/mel.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/mizar.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/monkey.py +35 -0
- pyreprism-0.1.0/src/PyReprism/languages/n4js.py +35 -0
- pyreprism-0.1.0/src/PyReprism/languages/nasm.py +44 -0
- pyreprism-0.1.0/src/PyReprism/languages/nginx.py +44 -0
- pyreprism-0.1.0/src/PyReprism/languages/nim.py +54 -0
- pyreprism-0.1.0/src/PyReprism/languages/nix.py +39 -0
- pyreprism-0.1.0/src/PyReprism/languages/nsis.py +34 -0
- pyreprism-0.1.0/src/PyReprism/languages/objectivec.py +58 -0
- pyreprism-0.1.0/src/PyReprism/languages/ocaml.py +34 -0
- pyreprism-0.1.0/src/PyReprism/languages/opencl.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/oz.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/parigp.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/parser.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/pascal.py +49 -0
- pyreprism-0.1.0/src/PyReprism/languages/perl.py +70 -0
- pyreprism-0.1.0/src/PyReprism/languages/php.py +56 -0
- pyreprism-0.1.0/src/PyReprism/languages/php_extras.py +16 -0
- pyreprism-0.1.0/src/PyReprism/languages/plsql.py +43 -0
- pyreprism-0.1.0/src/PyReprism/languages/powershell.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/processing.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/prolog.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/properties.py +28 -0
- pyreprism-0.1.0/src/PyReprism/languages/protobuf.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/pug.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/puppet.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/pure.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/python.py +97 -0
- pyreprism-0.1.0/src/PyReprism/languages/q.py +27 -0
- pyreprism-0.1.0/src/PyReprism/languages/qore.py +23 -0
- pyreprism-0.1.0/src/PyReprism/languages/r.py +24 -0
- pyreprism-0.1.0/src/PyReprism/languages/reason.py +34 -0
- pyreprism-0.1.0/src/PyReprism/languages/registry.py +52 -0
- pyreprism-0.1.0/src/PyReprism/languages/renpy.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/rest.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/rip.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/roboconf.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/ruby.py +39 -0
- pyreprism-0.1.0/src/PyReprism/languages/rust.py +55 -0
- pyreprism-0.1.0/src/PyReprism/languages/sas.py +45 -0
- pyreprism-0.1.0/src/PyReprism/languages/sass.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/scala.py +50 -0
- pyreprism-0.1.0/src/PyReprism/languages/scheme.py +52 -0
- pyreprism-0.1.0/src/PyReprism/languages/scss.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/smalltalk.py +55 -0
- pyreprism-0.1.0/src/PyReprism/languages/smarty.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/soy.py +33 -0
- pyreprism-0.1.0/src/PyReprism/languages/sql.py +144 -0
- pyreprism-0.1.0/src/PyReprism/languages/stylus.py +56 -0
- pyreprism-0.1.0/src/PyReprism/languages/swift.py +57 -0
- pyreprism-0.1.0/src/PyReprism/languages/tcl.py +40 -0
- pyreprism-0.1.0/src/PyReprism/languages/textile.py +42 -0
- pyreprism-0.1.0/src/PyReprism/languages/tsx.py +52 -0
- pyreprism-0.1.0/src/PyReprism/languages/twig.py +77 -0
- pyreprism-0.1.0/src/PyReprism/languages/typescript.py +58 -0
- pyreprism-0.1.0/src/PyReprism/languages/vbnet.py +69 -0
- pyreprism-0.1.0/src/PyReprism/languages/velocity.py +31 -0
- pyreprism-0.1.0/src/PyReprism/languages/verilog.py +94 -0
- pyreprism-0.1.0/src/PyReprism/languages/vhdl.py +83 -0
- pyreprism-0.1.0/src/PyReprism/languages/vim.py +32 -0
- pyreprism-0.1.0/src/PyReprism/languages/visual_basic.py +41 -0
- pyreprism-0.1.0/src/PyReprism/languages/wasam.py +96 -0
- pyreprism-0.1.0/src/PyReprism/languages/xeora.py +78 -0
- pyreprism-0.1.0/src/PyReprism/languages/xojo.py +95 -0
- pyreprism-0.1.0/src/PyReprism/languages/yaml.py +28 -0
- pyreprism-0.1.0/src/PyReprism/metrics.py +41 -0
- pyreprism-0.1.0/src/PyReprism/tokens.py +37 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/utils/extension.py +1 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/utils/normalizer.py +3 -4
- pyreprism-0.0.3/.flake8 +0 -7
- pyreprism-0.0.3/.github/workflows/ci.yml +0 -41
- pyreprism-0.0.3/.github/workflows/publish.yml +0 -38
- pyreprism-0.0.3/PKG-INFO +0 -135
- pyreprism-0.0.3/README.md +0 -91
- pyreprism-0.0.3/pyproject.toml +0 -46
- pyreprism-0.0.3/pytest.ini +0 -4
- pyreprism-0.0.3/requirements.txt +0 -7
- pyreprism-0.0.3/src/PyReprism/languages/__init__.py +0 -147
- pyreprism-0.0.3/src/PyReprism/languages/abap.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/actionscript.py +0 -43
- pyreprism-0.0.3/src/PyReprism/languages/ada.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/apacheconf.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/apl.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/applescript.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/arduino.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/arff.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/asciidoc.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/asm6502.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/aspnet.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/autoit.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/bash.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/batch.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/bison.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/brainfuck.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/bro.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/c.py +0 -43
- pyreprism-0.0.3/src/PyReprism/languages/clike.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/clojure.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/coffeescript.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/crystal.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/csharp.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/csp.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/css.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/css_extras.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/d.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/dart.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/diff.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/django.py +0 -48
- pyreprism-0.0.3/src/PyReprism/languages/docker.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/eiffel.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/elixir.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/erb.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/erlang.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/flow.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/fortran.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/fsharp.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/gedcom.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/gherkin.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/git.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/glsl.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/go.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/graphql.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/groovy.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/haml.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/handlebars.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/haskell.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/haxe.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/hpkp.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/hsts.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/html.py +0 -43
- pyreprism-0.0.3/src/PyReprism/languages/ichigojam.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/icon.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/inform7.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/ini.py +0 -40
- pyreprism-0.0.3/src/PyReprism/languages/io.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/j.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/java.py +0 -43
- pyreprism-0.0.3/src/PyReprism/languages/javascript.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/jolie.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/json.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/jsx.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/julia.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/keyman.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/kotlin.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/latex.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/less.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/liquid.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/livescript.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/lolcode.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/lua.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/makefile.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/markdown.py +0 -30
- pyreprism-0.0.3/src/PyReprism/languages/markup.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/markup_templating.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/matlab.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/mel.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/mizar.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/monkey.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/n4js.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/nasm.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/nginx.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/nim.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/nix.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/nsis.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/objectivec.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/ocaml.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/opencl.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/oz.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/parigp.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/parser.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/pascal.py +0 -48
- pyreprism-0.0.3/src/PyReprism/languages/perl.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/php.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/php_extras.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/plsql.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/powershell.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/processing.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/prolog.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/properties.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/protobuf.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/pug.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/puppet.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/pure.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/python.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/q.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/qore.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/r.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/reason.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/renpy.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/rest.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/rip.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/roboconf.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/ruby.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/rust.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/sas.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/sass.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/scala.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/scheme.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/scss.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/smalltalk.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/smarty.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/soy.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/stylus.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/swift.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/tcl.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/textile.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/tsx.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/twig.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/typescript.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/vbnet.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/velocity.py +0 -49
- pyreprism-0.0.3/src/PyReprism/languages/verilog.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/vhdl.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/vim.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/visual_basic.py +0 -50
- pyreprism-0.0.3/src/PyReprism/languages/wasam.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/xeora.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/xojo.py +0 -0
- pyreprism-0.0.3/src/PyReprism/languages/yaml.py +0 -50
- {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/FUNDING.yaml +0 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/LICENSE +0 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/codecov.yml +0 -0
- /pyreprism-0.0.3/src/PyReprism/__init__.py → /pyreprism-0.1.0/src/PyReprism/py.typed +0 -0
- {pyreprism-0.0.3 → pyreprism-0.1.0}/src/PyReprism/utils/__init__.py +0 -0
pyreprism-0.1.0/.flake8
ADDED
|
@@ -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/*
|
|
@@ -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
|
-
#
|
|
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
|
|
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.
|
pyreprism-0.1.0/PKG-INFO
ADDED
|
@@ -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
|