kernpy 0.0.2__tar.gz → 1.0.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 (304) hide show
  1. kernpy-1.0.0/.github/workflows/publish-pypi.yml +17 -0
  2. kernpy-1.0.0/.github/workflows/run-tests.yml +31 -0
  3. kernpy-1.0.0/.github/workflows/update-docs.yml +35 -0
  4. kernpy-1.0.0/.gitignore +352 -0
  5. kernpy-1.0.0/CONTRIBUTING.md +47 -0
  6. kernpy-1.0.0/License +661 -0
  7. kernpy-1.0.0/PKG-INFO +501 -0
  8. kernpy-1.0.0/README.md +482 -0
  9. kernpy-1.0.0/antlr-4.13.1-complete.jar +0 -0
  10. kernpy-1.0.0/antlr4.sh +9 -0
  11. kernpy-1.0.0/docs/about.md +5 -0
  12. kernpy-1.0.0/docs/assets/001.svg +452 -0
  13. kernpy-1.0.0/docs/assets/book.svg +5 -0
  14. kernpy-1.0.0/docs/assets/learn.svg +8 -0
  15. kernpy-1.0.0/docs/assets/meeting.svg +34 -0
  16. kernpy-1.0.0/docs/assets/running.svg +11 -0
  17. kernpy-1.0.0/docs/css/extra.css +39 -0
  18. kernpy-1.0.0/docs/docs_requirements.txt +3 -0
  19. kernpy-1.0.0/docs/get-started/tutorial.md +358 -0
  20. kernpy-1.0.0/docs/get-started.md +32 -0
  21. kernpy-1.0.0/docs/how-to-guides.md +5 -0
  22. kernpy-1.0.0/docs/index.md +62 -0
  23. kernpy-1.0.0/docs/overrides/partials/footer.html +10 -0
  24. kernpy-1.0.0/docs/reference.md +17 -0
  25. kernpy-1.0.0/docs/requirements.txt +5 -0
  26. kernpy-1.0.0/gen/kernLexer.interp +517 -0
  27. kernpy-1.0.0/gen/kernLexer.java +1056 -0
  28. kernpy-1.0.0/gen/kernLexer.tokens +261 -0
  29. kernpy-1.0.0/kern/kernSpineLexer.g4 +167 -0
  30. kernpy-1.0.0/kern/kernSpineLexer.tokens +236 -0
  31. kernpy-1.0.0/kern/kernSpineParser.g4 +504 -0
  32. kernpy-1.0.0/kern/kernSpineParser.tokens +236 -0
  33. kernpy-1.0.0/kernpy/__init__.py +215 -0
  34. kernpy-1.0.0/kernpy/__main__.py +217 -0
  35. kernpy-1.0.0/kernpy/core/__init__.py +119 -0
  36. kernpy-1.0.0/kernpy/core/_io.py +48 -0
  37. kernpy-1.0.0/kernpy/core/base_antlr_importer.py +61 -0
  38. kernpy-1.0.0/kernpy/core/base_antlr_spine_parser_listener.py +196 -0
  39. kernpy-1.0.0/kernpy/core/basic_spine_importer.py +43 -0
  40. kernpy-1.0.0/kernpy/core/document.py +965 -0
  41. kernpy-1.0.0/kernpy/core/dyn_importer.py +30 -0
  42. kernpy-1.0.0/kernpy/core/dynam_spine_importer.py +42 -0
  43. kernpy-1.0.0/kernpy/core/error_listener.py +51 -0
  44. kernpy-1.0.0/kernpy/core/exporter.py +535 -0
  45. kernpy-1.0.0/kernpy/core/fing_spine_importer.py +42 -0
  46. kernpy-1.0.0/kernpy/core/generated/kernSpineLexer.interp +444 -0
  47. kernpy-1.0.0/kernpy/core/generated/kernSpineLexer.py +535 -0
  48. kernpy-1.0.0/kernpy/core/generated/kernSpineLexer.tokens +236 -0
  49. kernpy-1.0.0/kernpy/core/generated/kernSpineParser.interp +425 -0
  50. kernpy-1.0.0/kernpy/core/generated/kernSpineParser.py +9954 -0
  51. kernpy-1.0.0/kernpy/core/generated/kernSpineParser.tokens +236 -0
  52. kernpy-1.0.0/kernpy/core/generated/kernSpineParserListener.py +1200 -0
  53. kernpy-1.0.0/kernpy/core/generated/kernSpineParserVisitor.py +673 -0
  54. kernpy-1.0.0/kernpy/core/generic.py +426 -0
  55. kernpy-1.0.0/kernpy/core/gkern.py +526 -0
  56. kernpy-1.0.0/kernpy/core/graphviz_exporter.py +89 -0
  57. kernpy-1.0.0/kernpy/core/harm_spine_importer.py +41 -0
  58. kernpy-1.0.0/kernpy/core/import_humdrum_old.py +853 -0
  59. kernpy-1.0.0/kernpy/core/importer.py +285 -0
  60. kernpy-1.0.0/kernpy/core/importer_factory.py +43 -0
  61. kernpy-1.0.0/kernpy/core/kern_spine_importer.py +73 -0
  62. kernpy-1.0.0/kernpy/core/mens_spine_importer.py +23 -0
  63. kernpy-1.0.0/kernpy/core/mhxm_spine_importer.py +44 -0
  64. kernpy-1.0.0/kernpy/core/pitch_models.py +338 -0
  65. kernpy-1.0.0/kernpy/core/root_spine_importer.py +58 -0
  66. kernpy-1.0.0/kernpy/core/spine_importer.py +45 -0
  67. kernpy-1.0.0/kernpy/core/text_spine_importer.py +43 -0
  68. kernpy-1.0.0/kernpy/core/tokenizers.py +239 -0
  69. kernpy-1.0.0/kernpy/core/tokens.py +2011 -0
  70. kernpy-1.0.0/kernpy/core/transposer.py +300 -0
  71. kernpy-1.0.0/kernpy/io/__init__.py +14 -0
  72. kernpy-1.0.0/kernpy/io/public.py +355 -0
  73. kernpy-1.0.0/kernpy/polish_scores/__init__.py +13 -0
  74. kernpy-1.0.0/kernpy/polish_scores/download_polish_dataset.py +357 -0
  75. kernpy-1.0.0/kernpy/polish_scores/iiif.py +47 -0
  76. kernpy-1.0.0/kernpy/test_grammar.sh +22 -0
  77. kernpy-1.0.0/kernpy/util/__init__.py +14 -0
  78. kernpy-1.0.0/kernpy/util/helpers.py +55 -0
  79. kernpy-1.0.0/kernpy/util/store_cache.py +35 -0
  80. kernpy-1.0.0/kernpy/visualize_analysis.sh +23 -0
  81. kernpy-1.0.0/legacy-parsers-not-used/kernLexer.g4 +262 -0
  82. kernpy-1.0.0/legacy-parsers-not-used/kernParser.g4 +647 -0
  83. kernpy-1.0.0/mkdocs.yml +26 -0
  84. kernpy-1.0.0/pyproject.toml +34 -0
  85. kernpy-1.0.0/requirements.txt +7 -0
  86. kernpy-1.0.0/test/pytest.ini +5 -0
  87. kernpy-1.0.0/test/resource_dir/categories/all.krn +85 -0
  88. kernpy-1.0.0/test/resource_dir/categories/all_less_decorators.krn +85 -0
  89. kernpy-1.0.0/test/resource_dir/categories/all_less_durations.krn +85 -0
  90. kernpy-1.0.0/test/resource_dir/categories/all_less_note_rest.krn +62 -0
  91. kernpy-1.0.0/test/resource_dir/categories/all_less_pitches.krn +85 -0
  92. kernpy-1.0.0/test/resource_dir/categories/concerto-piano-12-allegro_with_all.krn +1644 -0
  93. kernpy-1.0.0/test/resource_dir/categories/concerto-piano-12-allegro_without_barlines.krn +1415 -0
  94. kernpy-1.0.0/test/resource_dir/categories/concerto-piano-12-allegro_without_harmony.krn +85 -0
  95. kernpy-1.0.0/test/resource_dir/categories/concerto-piano-12-allegro_without_only_signatures.krn +19 -0
  96. kernpy-1.0.0/test/resource_dir/categories/empty.krn +0 -0
  97. kernpy-1.0.0/test/resource_dir/categories/only_barlines.krn +10 -0
  98. kernpy-1.0.0/test/resource_dir/categories/only_decorators.krn +8 -0
  99. kernpy-1.0.0/test/resource_dir/categories/only_durations.krn +63 -0
  100. kernpy-1.0.0/test/resource_dir/categories/only_pitches.krn +63 -0
  101. kernpy-1.0.0/test/resource_dir/concat/0_0.krn +49 -0
  102. kernpy-1.0.0/test/resource_dir/concat/0_0_merged.krn +35 -0
  103. kernpy-1.0.0/test/resource_dir/concat/0_1.krn +50 -0
  104. kernpy-1.0.0/test/resource_dir/concat/0_10.krn +40 -0
  105. kernpy-1.0.0/test/resource_dir/concat/0_10_merged.krn +51 -0
  106. kernpy-1.0.0/test/resource_dir/concat/0_11.krn +50 -0
  107. kernpy-1.0.0/test/resource_dir/concat/0_11_merged.krn +67 -0
  108. kernpy-1.0.0/test/resource_dir/concat/0_1_merged.krn +63 -0
  109. kernpy-1.0.0/test/resource_dir/concat/0_2.krn +45 -0
  110. kernpy-1.0.0/test/resource_dir/concat/0_2_merged.krn +60 -0
  111. kernpy-1.0.0/test/resource_dir/concat/0_3.krn +44 -0
  112. kernpy-1.0.0/test/resource_dir/concat/0_3_merged.krn +58 -0
  113. kernpy-1.0.0/test/resource_dir/concat/0_4.krn +37 -0
  114. kernpy-1.0.0/test/resource_dir/concat/0_4_merged.krn +49 -0
  115. kernpy-1.0.0/test/resource_dir/concat/0_5.krn +38 -0
  116. kernpy-1.0.0/test/resource_dir/concat/0_5_merged.krn +51 -0
  117. kernpy-1.0.0/test/resource_dir/concat/0_6.krn +44 -0
  118. kernpy-1.0.0/test/resource_dir/concat/0_7.krn +46 -0
  119. kernpy-1.0.0/test/resource_dir/concat/0_7_merged.krn +61 -0
  120. kernpy-1.0.0/test/resource_dir/concat/0_8.krn +46 -0
  121. kernpy-1.0.0/test/resource_dir/concat/0_8_merged.krn +61 -0
  122. kernpy-1.0.0/test/resource_dir/concat/0_9.krn +37 -0
  123. kernpy-1.0.0/test/resource_dir/concat/0_9_merged.krn +53 -0
  124. kernpy-1.0.0/test/resource_dir/fragments/input/sub/chor001.krn +132 -0
  125. kernpy-1.0.0/test/resource_dir/fragments/input/sub/chor002.krn +59 -0
  126. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-1-to-3.krn +17 -0
  127. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-10-to-12.krn +22 -0
  128. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-11-to-13.krn +20 -0
  129. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-12-to-14.krn +20 -0
  130. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-13-to-15.krn +22 -0
  131. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-14-to-16.krn +20 -0
  132. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-15-to-17.krn +20 -0
  133. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-16-to-18.krn +20 -0
  134. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-17-to-19.krn +24 -0
  135. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-18-to-20.krn +21 -0
  136. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-19-to-21.krn +21 -0
  137. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-2-to-4.krn +22 -0
  138. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-20-to-22.krn +20 -0
  139. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-21-to-23.krn +19 -0
  140. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-22-to-24.krn +14 -0
  141. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-3-to-5.krn +20 -0
  142. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-4-to-6.krn +19 -0
  143. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-5-to-7.krn +18 -0
  144. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-6-to-8.krn +17 -0
  145. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-7-to-9.krn +15 -0
  146. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-8-to-10.krn +17 -0
  147. kernpy-1.0.0/test/resource_dir/fragments/output/chor001/from-9-to-11.krn +21 -0
  148. kernpy-1.0.0/test/resource_dir/fragments/output/chor002/from-1-to-5.krn +26 -0
  149. kernpy-1.0.0/test/resource_dir/fragments/output/chor002/from-2-to-6.krn +29 -0
  150. kernpy-1.0.0/test/resource_dir/fragments/output/chor002/from-3-to-7.krn +29 -0
  151. kernpy-1.0.0/test/resource_dir/fragments/output/chor002/from-4-to-8.krn +26 -0
  152. kernpy-1.0.0/test/resource_dir/fragments/output/chor002/from-5-to-9.krn +20 -0
  153. kernpy-1.0.0/test/resource_dir/grandstaff/5901766-m24-to-m28.ekrn +61 -0
  154. kernpy-1.0.0/test/resource_dir/grandstaff/5901766.krn +1113 -0
  155. kernpy-1.0.0/test/resource_dir/hierarchy/tree.txt +38 -0
  156. kernpy-1.0.0/test/resource_dir/kern-scores/beethoven_sonata_12_4.krn +1571 -0
  157. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet.ekrn +11 -0
  158. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet.krn +12 -0
  159. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet_longer.krn +41 -0
  160. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet_longer_m2-m4.ekrn +24 -0
  161. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet_longer_m2-m4.krn +24 -0
  162. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet_longer_m3-m3.krn +12 -0
  163. kernpy-1.0.0/test/resource_dir/legacy/base_tuplet_longer_plus_octave.krn +36 -0
  164. kernpy-1.0.0/test/resource_dir/legacy/chor001-all_tokens.txt +707 -0
  165. kernpy-1.0.0/test/resource_dir/legacy/chor001-m1-to-m3.ekrn +17 -0
  166. kernpy-1.0.0/test/resource_dir/legacy/chor001-metadata-generic.txt +17 -0
  167. kernpy-1.0.0/test/resource_dir/legacy/chor001-unique_tokens.txt +142 -0
  168. kernpy-1.0.0/test/resource_dir/legacy/chor001-unique_tokens_with_category.txt +102 -0
  169. kernpy-1.0.0/test/resource_dir/legacy/chor001-unique_tokens_without_measure_numbers.txt +163 -0
  170. kernpy-1.0.0/test/resource_dir/legacy/chor001.ekrn +108 -0
  171. kernpy-1.0.0/test/resource_dir/legacy/chor001.krn +132 -0
  172. kernpy-1.0.0/test/resource_dir/legacy/chor009.krn +141 -0
  173. kernpy-1.0.0/test/resource_dir/legacy/chor048.krn +100 -0
  174. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-1.ekrn +17 -0
  175. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-1.krn +18 -0
  176. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-2.ekrn +34 -0
  177. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-3.ekrn +36 -0
  178. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-3.krn +39 -0
  179. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-4.ekrn +51 -0
  180. kernpy-1.0.0/test/resource_dir/legacy/guide02-example2-4.krn +52 -0
  181. kernpy-1.0.0/test/resource_dir/legacy/guide06-example6-1.ekrn +41 -0
  182. kernpy-1.0.0/test/resource_dir/legacy/guide06-example6-1.krn +41 -0
  183. kernpy-1.0.0/test/resource_dir/legacy/guide06-example6-2.ekrn +41 -0
  184. kernpy-1.0.0/test/resource_dir/legacy/guide06-example6-2.krn +42 -0
  185. kernpy-1.0.0/test/resource_dir/legacy/kern2ekern.ekrn +10 -0
  186. kernpy-1.0.0/test/resource_dir/legacy/kern2ekern.krn +23 -0
  187. kernpy-1.0.0/test/resource_dir/legacy/spines_lexer.ekrn +17 -0
  188. kernpy-1.0.0/test/resource_dir/legacy/spines_lexer.krn +19 -0
  189. kernpy-1.0.0/test/resource_dir/legacy/spline_split.krn +16 -0
  190. kernpy-1.0.0/test/resource_dir/legacy/spline_split_piston070.ekrn +30 -0
  191. kernpy-1.0.0/test/resource_dir/legacy/spline_split_piston070.krn +40 -0
  192. kernpy-1.0.0/test/resource_dir/metadata/frequency.json +570 -0
  193. kernpy-1.0.0/test/resource_dir/mozart/concerto-piano-12-allegro-left-hand.krn +1212 -0
  194. kernpy-1.0.0/test/resource_dir/mozart/concerto-piano-12-allegro-right-hand-and-dyn.krn +1216 -0
  195. kernpy-1.0.0/test/resource_dir/mozart/concerto-piano-12-allegro-right-hand.krn +1429 -0
  196. kernpy-1.0.0/test/resource_dir/mozart/concerto-piano-12-allegro.krn +1709 -0
  197. kernpy-1.0.0/test/resource_dir/mozart/divertimento-quartet.krn +742 -0
  198. kernpy-1.0.0/test/resource_dir/polish/test1/pages/10.ekrn +232 -0
  199. kernpy-1.0.0/test/resource_dir/polish/test1/pages/10.jpg +0 -0
  200. kernpy-1.0.0/test/resource_dir/polish/test1/pages/11.ekrn +208 -0
  201. kernpy-1.0.0/test/resource_dir/polish/test1/pages/11.jpg +0 -0
  202. kernpy-1.0.0/test/resource_dir/polish/test1/pages/9.ekrn +144 -0
  203. kernpy-1.0.0/test/resource_dir/polish/test1/pages/9.jpg +0 -0
  204. kernpy-1.0.0/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m16.ekrn +144 -0
  205. kernpy-1.0.0/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m2.ekrn +23 -0
  206. kernpy-1.0.0/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m3.ekrn +38 -0
  207. kernpy-1.0.0/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante.krn +772 -0
  208. kernpy-1.0.0/test/resource_dir/polish/test2/pl-wn--mus-iii-123-982--001-004_wieniawski-henryk--l-ecole-moderne-etudes-caprices-pour-violon-seul-op-10-4-le-staccato-m0-to-m1.ekrn +8 -0
  209. kernpy-1.0.0/test/resource_dir/polish/test2/pl-wn--mus-iii-123-982--001-004_wieniawski-henryk--l-ecole-moderne-etudes-caprices-pour-violon-seul-op-10-4-le-staccato-m1-to-m2.ekrn +25 -0
  210. kernpy-1.0.0/test/resource_dir/polish/test2/pl-wn--mus-iii-123-982--001-004_wieniawski-henryk--l-ecole-moderne-etudes-caprices-pour-violon-seul-op-10-4-le-staccato.krn +865 -0
  211. kernpy-1.0.0/test/resource_dir/polish/test3/pl-wn--sd-xvi-qu-273--001-020_gomolka-mikolaj--melodiae-na-psalterz-polski-xx-wsiadaj-z-dobrym-sercem-o-krolu-cnotliwy.krn +118 -0
  212. kernpy-1.0.0/test/resource_dir/samples/any_header.krn +4 -0
  213. kernpy-1.0.0/test/resource_dir/samples/bach-brandenburg-bwv1050a.krn +4619 -0
  214. kernpy-1.0.0/test/resource_dir/samples/bach-chorale-chor205.krn +475 -0
  215. kernpy-1.0.0/test/resource_dir/samples/corelli-op01n12d.krn +658 -0
  216. kernpy-1.0.0/test/resource_dir/samples/harmonized-song-erk052.krn +488 -0
  217. kernpy-1.0.0/test/resource_dir/samples/haydn-quartet-op54n2-01.krn +1817 -0
  218. kernpy-1.0.0/test/resource_dir/samples/haydn-sonate-15_1-original.krn +786 -0
  219. kernpy-1.0.0/test/resource_dir/samples/haydn-sonate-15_1-output.krn +756 -0
  220. kernpy-1.0.0/test/resource_dir/samples/jazzmus_with_mxhm.krn +147 -0
  221. kernpy-1.0.0/test/resource_dir/samples/permutations_of_2.bb-_ .krn +120 -0
  222. kernpy-1.0.0/test/resource_dir/samples/piano-beethoven-sonata21-3.krn +5809 -0
  223. kernpy-1.0.0/test/resource_dir/samples/piano-chopin-prelude28-17.krn +764 -0
  224. kernpy-1.0.0/test/resource_dir/samples/piano-hummel-prelude67-15.krn +237 -0
  225. kernpy-1.0.0/test/resource_dir/samples/piano-joplin-bethena.krn +1240 -0
  226. kernpy-1.0.0/test/resource_dir/samples/piano-mozart-sonata07-3.krn +2664 -0
  227. kernpy-1.0.0/test/resource_dir/samples/piano-scarlatti-L523K205.krn +1768 -0
  228. kernpy-1.0.0/test/resource_dir/samples/quartet-beethoven-quartet13-6.krn +3311 -0
  229. kernpy-1.0.0/test/resource_dir/samples/quartet-mozart-k590-04.krn +2627 -0
  230. kernpy-1.0.0/test/resource_dir/samples/score_with_dividing_one_spine.krn +107 -0
  231. kernpy-1.0.0/test/resource_dir/samples/score_with_dividing_one_spine_m9-m13.krn +35 -0
  232. kernpy-1.0.0/test/resource_dir/samples/score_with_dividing_two_spines.krn +1571 -0
  233. kernpy-1.0.0/test/resource_dir/samples/score_with_dividing_two_spines_m49-m56.krn +2 -0
  234. kernpy-1.0.0/test/resource_dir/samples/unaccompanied-songs-nova073.krn +188 -0
  235. kernpy-1.0.0/test/resource_dir/samples/unexpected_header.krn +5 -0
  236. kernpy-1.0.0/test/resource_dir/samples/wrong_header.krn +9 -0
  237. kernpy-1.0.0/test/resource_dir/samples/wrong_number_of_columns.krn +17 -0
  238. kernpy-1.0.0/test/resource_dir/samples/wrong_number_of_columns_fixed.krn +16 -0
  239. kernpy-1.0.0/test/resource_dir/spines/1.krn +18 -0
  240. kernpy-1.0.0/test/resource_dir/spines/2-m2-to-m2.ekrn +11 -0
  241. kernpy-1.0.0/test/resource_dir/spines/2.krn +18 -0
  242. kernpy-1.0.0/test/resource_dir/spines/3.krn +16 -0
  243. kernpy-1.0.0/test/resource_dir/spines/4.krn +17 -0
  244. kernpy-1.0.0/test/resource_dir/spines/5.krn +24 -0
  245. kernpy-1.0.0/test/resource_dir/spines/concerto-piano-12-allegro_only_kern_and_harm.krn +85 -0
  246. kernpy-1.0.0/test/resource_dir/spines/non_stacked_ends.krn +12 -0
  247. kernpy-1.0.0/test/resource_dir/spines/non_stacked_ends_2.krn +10 -0
  248. kernpy-1.0.0/test/resource_dir/spines/spines-from-piano-joplin-bethena-start.krn +23 -0
  249. kernpy-1.0.0/test/resource_dir/spines/spines-piano-hummel-prelude67-15.krn +19 -0
  250. kernpy-1.0.0/test/resource_dir/unit/accidentals.krn +9 -0
  251. kernpy-1.0.0/test/resource_dir/unit/accidentals_alteration_display.krn +10 -0
  252. kernpy-1.0.0/test/resource_dir/unit/articulations.krn +11 -0
  253. kernpy-1.0.0/test/resource_dir/unit/auto_beaming.krn +17 -0
  254. kernpy-1.0.0/test/resource_dir/unit/bars.krn +15 -0
  255. kernpy-1.0.0/test/resource_dir/unit/beaming.krn +12 -0
  256. kernpy-1.0.0/test/resource_dir/unit/chords.krn +7 -0
  257. kernpy-1.0.0/test/resource_dir/unit/clefs.krn +4 -0
  258. kernpy-1.0.0/test/resource_dir/unit/headers.krn +1 -0
  259. kernpy-1.0.0/test/resource_dir/unit/key.krn +12 -0
  260. kernpy-1.0.0/test/resource_dir/unit/key_designation.krn +6 -0
  261. kernpy-1.0.0/test/resource_dir/unit/mensurations.krn +58 -0
  262. kernpy-1.0.0/test/resource_dir/unit/minimal.krn +6 -0
  263. kernpy-1.0.0/test/resource_dir/unit/minimal_incorrect.krn +6 -0
  264. kernpy-1.0.0/test/resource_dir/unit/modal.krn +12 -0
  265. kernpy-1.0.0/test/resource_dir/unit/octaves.krn +6 -0
  266. kernpy-1.0.0/test/resource_dir/unit/ornaments.krn +13 -0
  267. kernpy-1.0.0/test/resource_dir/unit/rests.krn +8 -0
  268. kernpy-1.0.0/test/resource_dir/unit/rhythm.krn +17 -0
  269. kernpy-1.0.0/test/resource_dir/unit/slurs.krn +17 -0
  270. kernpy-1.0.0/test/resource_dir/unit/ties.krn +11 -0
  271. kernpy-1.0.0/test/resource_dir/unit/time.krn +13 -0
  272. kernpy-1.0.0/test/test_deprecated.py +42 -0
  273. kernpy-1.0.0/test/test_document.py +215 -0
  274. kernpy-1.0.0/test/test_download_polish_scores.py +57 -0
  275. kernpy-1.0.0/test/test_export_options.py +32 -0
  276. kernpy-1.0.0/test/test_exporter.py +149 -0
  277. kernpy-1.0.0/test/test_generic.py +246 -0
  278. kernpy-1.0.0/test/test_gkern.py +436 -0
  279. kernpy-1.0.0/test/test_humdrum_importer.py +771 -0
  280. kernpy-1.0.0/test/test_importer.py +83 -0
  281. kernpy-1.0.0/test/test_root_spine_root.py +58 -0
  282. kernpy-1.0.0/test/test_spine_imoprter_dynam.py +65 -0
  283. kernpy-1.0.0/test/test_spine_importer_basic.py +65 -0
  284. kernpy-1.0.0/test/test_spine_importer_dyn.py +65 -0
  285. kernpy-1.0.0/test/test_spine_importer_fing.py +63 -0
  286. kernpy-1.0.0/test/test_spine_importer_harm.py +65 -0
  287. kernpy-1.0.0/test/test_spine_importer_kern.py +146 -0
  288. kernpy-1.0.0/test/test_spine_importer_mxhm.py +27 -0
  289. kernpy-1.0.0/test/test_spine_importer_text.py +65 -0
  290. kernpy-1.0.0/test/test_token.py +823 -0
  291. kernpy-1.0.0/test/test_tokenizer.py +64 -0
  292. kernpy-1.0.0/test/test_transposer.py +525 -0
  293. kernpy-1.0.0/test/test_util_store_cache.py +69 -0
  294. kernpy-0.0.2/LICENSE +0 -19
  295. kernpy-0.0.2/PKG-INFO +0 -19
  296. kernpy-0.0.2/README.md +0 -5
  297. kernpy-0.0.2/pyproject.toml +0 -18
  298. kernpy-0.0.2/setup.cfg +0 -4
  299. kernpy-0.0.2/src/kernpy/example.py +0 -1
  300. kernpy-0.0.2/src/kernpy.egg-info/PKG-INFO +0 -19
  301. kernpy-0.0.2/src/kernpy.egg-info/SOURCES.txt +0 -9
  302. kernpy-0.0.2/src/kernpy.egg-info/dependency_links.txt +0 -1
  303. kernpy-0.0.2/src/kernpy.egg-info/top_level.txt +0 -1
  304. {kernpy-0.0.2/src/kernpy → kernpy-1.0.0/test}/__init__.py +0 -0
@@ -0,0 +1,17 @@
1
+ name: Publish to PyPI.org
2
+ on:
3
+ release:
4
+ types: [published]
5
+ jobs:
6
+ pypi:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout
10
+ uses: actions/checkout@v3
11
+ with:
12
+ fetch-depth: 0
13
+ - run: python3 -m pip install --upgrade build && python3 -m build
14
+ - name: Publish package
15
+ uses: pypa/gh-action-pypi-publish@release/v1
16
+ with:
17
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,31 @@
1
+ name: Test package using pytest
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ build:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v3
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v3
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -r requirements.txt
28
+ ./antlr4.sh
29
+ - name: Test with pytest
30
+ run: |
31
+ cd test && python -m pytest
@@ -0,0 +1,35 @@
1
+ name: Update Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ update-docs:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v2
18
+ with:
19
+ python-version: 3.8
20
+
21
+ - name: Install MkDocs
22
+ run: |
23
+ python -m pip install -r docs/docs_requirements.txt
24
+
25
+ - name: Build Documentation
26
+ run: mkdocs build
27
+
28
+ - name: Deploy Documentation
29
+ uses: peaceiris/actions-gh-pages@v3
30
+ with:
31
+ personal_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
32
+ publish_dir: ./site
33
+ user_name: GitHub Actions
34
+ user_email: actions@github.com
35
+ publish_branch: gh-pages
@@ -0,0 +1,352 @@
1
+ /.idea/
2
+ /kern/kernLexer.tokens
3
+ /core/generated/
4
+ **/tmp/
5
+ *test_temporal.py
6
+
7
+ # Created by https://www.toptal.com/developers/gitignore/api/python,pythonvanilla,compressed,venv,pycharm,pydev
8
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,pythonvanilla,compressed,venv,pycharm,pydev
9
+
10
+ ### Compressed ###
11
+ *.7z
12
+ *.deb
13
+ *.gz
14
+ *.pkg
15
+ *.rar
16
+ *.rpm
17
+ *.sit
18
+ *.sitx
19
+ *.tar
20
+ *.zip
21
+ *.zipx
22
+ *.tgz
23
+
24
+ ### PyCharm ###
25
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
26
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
27
+
28
+ # User-specific stuff
29
+ .idea/**/workspace.xml
30
+ .idea/**/tasks.xml
31
+ .idea/**/usage.statistics.xml
32
+ .idea/**/dictionaries
33
+ .idea/**/shelf
34
+
35
+ # AWS User-specific
36
+ .idea/**/aws.xml
37
+
38
+ # Generated files
39
+ .idea/**/contentModel.xml
40
+
41
+ # Sensitive or high-churn files
42
+ .idea/**/dataSources/
43
+ .idea/**/dataSources.ids
44
+ .idea/**/dataSources.local.xml
45
+ .idea/**/sqlDataSources.xml
46
+ .idea/**/dynamic.xml
47
+ .idea/**/uiDesigner.xml
48
+ .idea/**/dbnavigator.xml
49
+
50
+ # Gradle
51
+ .idea/**/gradle.xml
52
+ .idea/**/libraries
53
+
54
+ # Gradle and Maven with auto-import
55
+ # When using Gradle or Maven with auto-import, you should exclude module files,
56
+ # since they will be recreated, and may cause churn. Uncomment if using
57
+ # auto-import.
58
+ # .idea/artifacts
59
+ # .idea/compiler.xml
60
+ # .idea/jarRepositories.xml
61
+ # .idea/modules.xml
62
+ # .idea/*.iml
63
+ # .idea/modules
64
+ # *.iml
65
+ # *.ipr
66
+
67
+ # CMake
68
+ cmake-build-*/
69
+
70
+ # Mongo Explorer plugin
71
+ .idea/**/mongoSettings.xml
72
+
73
+ # File-based project format
74
+ *.iws
75
+
76
+ # IntelliJ
77
+ out/
78
+
79
+ # mpeltonen/sbt-idea plugin
80
+ .idea_modules/
81
+
82
+ # JIRA plugin
83
+ atlassian-ide-plugin.xml
84
+
85
+ # Cursive Clojure plugin
86
+ .idea/replstate.xml
87
+
88
+ # SonarLint plugin
89
+ .idea/sonarlint/
90
+
91
+ # Crashlytics plugin (for Android Studio and IntelliJ)
92
+ com_crashlytics_export_strings.xml
93
+ crashlytics.properties
94
+ crashlytics-build.properties
95
+ fabric.properties
96
+
97
+ # Editor-based Rest Client
98
+ .idea/httpRequests
99
+
100
+ # Android studio 3.1+ serialized cache file
101
+ .idea/caches/build_file_checksums.ser
102
+
103
+ ### PyCharm Patch ###
104
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
105
+
106
+ # *.iml
107
+ # modules.xml
108
+ # .idea/misc.xml
109
+ # *.ipr
110
+
111
+ # Sonarlint plugin
112
+ # https://plugins.jetbrains.com/plugin/7973-sonarlint
113
+ .idea/**/sonarlint/
114
+
115
+ # SonarQube Plugin
116
+ # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
117
+ .idea/**/sonarIssues.xml
118
+
119
+ # Markdown Navigator plugin
120
+ # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
121
+ .idea/**/markdown-navigator.xml
122
+ .idea/**/markdown-navigator-enh.xml
123
+ .idea/**/markdown-navigator/
124
+
125
+ # Cache file creation bug
126
+ # See https://youtrack.jetbrains.com/issue/JBR-2257
127
+ .idea/$CACHE_FILE$
128
+
129
+ # CodeStream plugin
130
+ # https://plugins.jetbrains.com/plugin/12206-codestream
131
+ .idea/codestream.xml
132
+
133
+ # Azure Toolkit for IntelliJ plugin
134
+ # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
135
+ .idea/**/azureSettings.xml
136
+
137
+ ### pydev ###
138
+ .pydevproject
139
+
140
+ ### Python ###
141
+ # Byte-compiled / optimized / DLL files
142
+ __pycache__/
143
+ *.py[cod]
144
+ *$py.class
145
+
146
+ # C extensions
147
+ *.so
148
+
149
+ # Distribution / packaging
150
+ .Python
151
+ build/
152
+ develop-eggs/
153
+ dist/
154
+ downloads/
155
+ eggs/
156
+ .eggs/
157
+ lib/
158
+ lib64/
159
+ parts/
160
+ sdist/
161
+ var/
162
+ wheels/
163
+ share/python-wheels/
164
+ *.egg-info/
165
+ .installed.cfg
166
+ *.egg
167
+ MANIFEST
168
+
169
+ # PyInstaller
170
+ # Usually these files are written by a python script from a template
171
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
172
+ *.manifest
173
+ *.spec
174
+
175
+ # Installer logs
176
+ pip-log.txt
177
+ pip-delete-this-directory.txt
178
+
179
+ # Unit test / coverage reports
180
+ htmlcov/
181
+ .tox/
182
+ .nox/
183
+ .coverage
184
+ .coverage.*
185
+ .cache
186
+ nosetests.xml
187
+ coverage.xml
188
+ *.cover
189
+ *.py,cover
190
+ .hypothesis/
191
+ .pytest_cache/
192
+ cover/
193
+
194
+ # Translations
195
+ *.mo
196
+ *.pot
197
+
198
+ # Django stuff:
199
+ *.log
200
+ local_settings.py
201
+ db.sqlite3
202
+ db.sqlite3-journal
203
+
204
+ # Flask stuff:
205
+ instance/
206
+ .webassets-cache
207
+
208
+ # Scrapy stuff:
209
+ .scrapy
210
+
211
+ # Sphinx documentation
212
+ docs/_build/
213
+
214
+ # PyBuilder
215
+ .pybuilder/
216
+ target/
217
+
218
+ # Jupyter Notebook
219
+ .ipynb_checkpoints
220
+
221
+ # IPython
222
+ profile_default/
223
+ ipython_config.py
224
+
225
+ # pyenv
226
+ # For a library or package, you might want to ignore these files since the code is
227
+ # intended to run in multiple environments; otherwise, check them in:
228
+ # .python-version
229
+
230
+ # pipenv
231
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
232
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
233
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
234
+ # install all needed dependencies.
235
+ #Pipfile.lock
236
+
237
+ # poetry
238
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
239
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
240
+ # commonly ignored for libraries.
241
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
242
+ #poetry.lock
243
+
244
+ # pdm
245
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
246
+ #pdm.lock
247
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
248
+ # in version control.
249
+ # https://pdm.fming.dev/#use-with-ide
250
+ .pdm.toml
251
+
252
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
253
+ __pypackages__/
254
+
255
+ # Celery stuff
256
+ celerybeat-schedule
257
+ celerybeat.pid
258
+
259
+ # SageMath parsed files
260
+ *.sage.py
261
+
262
+ # Environments
263
+ .env
264
+ .venv
265
+ env/
266
+ venv/
267
+ ENV/
268
+ env.bak/
269
+ venv.bak/
270
+
271
+ # Spyder project settings
272
+ .spyderproject
273
+ .spyproject
274
+
275
+ # Rope project settings
276
+ .ropeproject
277
+
278
+ # mkdocs documentation
279
+ /site
280
+
281
+ # mypy
282
+ .mypy_cache/
283
+ .dmypy.json
284
+ dmypy.json
285
+
286
+ # Pyre type checker
287
+ .pyre/
288
+
289
+ # pytype static type analyzer
290
+ .pytype/
291
+
292
+ # Cython debug symbols
293
+ cython_debug/
294
+
295
+ # PyCharm
296
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
297
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
298
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
299
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
300
+ #.idea/
301
+
302
+ ### Python Patch ###
303
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
304
+ poetry.toml
305
+
306
+ # ruff
307
+ .ruff_cache/
308
+
309
+ # LSP config files
310
+ pyrightconfig.json
311
+
312
+ ### PythonVanilla ###
313
+ # Byte-compiled / optimized / DLL files
314
+
315
+ # C extensions
316
+
317
+ # Distribution / packaging
318
+
319
+ # Installer logs
320
+
321
+ # Unit test / coverage reports
322
+
323
+ # Translations
324
+
325
+ # pyenv
326
+ # For a library or package, you might want to ignore these files since the code is
327
+ # intended to run in multiple environments; otherwise, check them in:
328
+ # .python-version
329
+
330
+ # pipenv
331
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
332
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
333
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
334
+ # install all needed dependencies.
335
+
336
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
337
+
338
+
339
+ ### venv ###
340
+ # Virtualenv
341
+ # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
342
+ [Bb]in
343
+ [Ii]nclude
344
+ [Ll]ib
345
+ [Ll]ib64
346
+ [Ll]ocal
347
+ [Ss]cripts
348
+ pyvenv.cfg
349
+ pip-selfcheck.json
350
+
351
+ # End of https://www.toptal.com/developers/gitignore/api/python,pythonvanilla,compressed,venv,pycharm,pydev
352
+ /kernpy.iml
@@ -0,0 +1,47 @@
1
+ # Contributing to kernpy
2
+
3
+ We welcome your contributions to `kernpy`‼️
4
+ Our goal is to make contributing as easy and transparent as possible. Whether you're fixing bugs, improving documentation, or adding new features, or creating new tests, thank you for helping improve `kernpy`!
5
+
6
+ ## How to Contribute
7
+
8
+ ## Step-by-Step Guide 📖
9
+ 1. Fork the Repository
10
+ - **Fork the repo:** Start by forking the kernpy repository to your GitHub account.
11
+ - **Clone your fork:** Clone your fork locally.
12
+ - **Create a branch:** Always create your branch from `main` for any changes:
13
+ ```bash
14
+ git checkout -b <your-feature-name>
15
+ ```
16
+
17
+ 2. Make Your Changes 🔧
18
+ Develop your feature or fix: Write your code and include tests for any new functionality. If you're fixing a bug or adding a new feature, please include a test that demonstrates the issue.
19
+ Build and run tests: Ensure that your changes pass all tests. Run:
20
+
21
+ ```bash
22
+ python3 -m pip install -r requirements.txt
23
+ cd tests && python -m pytest
24
+ ```
25
+
26
+ 3. Create a Pull Request (PR) 📬
27
+ Commit your changes: Use clear and descriptive commit messages.
28
+ Push your branch: Push your branch to your fork:
29
+ git push origin feature/your-feature-name
30
+ Open a PR: Open a pull request from your branch in your fork to the main branch of the kernpy repository. Provide a detailed description of your changes, reference any related issues, and feel free to thank the community for their support! 😊
31
+
32
+ 4. Issues and Feedback 🗣️
33
+ Report issues: If you find a bug or have a feature request, please open an issue with clear steps to reproduce the problem.
34
+ Engage with the community: Discuss ideas and ask for clarifications by commenting on issues. We’re open and collaborative!
35
+
36
+ ### Additional Guidelines
37
+
38
+ Documentation: Update or add documentation as needed, including usage examples or API changes.
39
+ Acknowledgments: We appreciate every contribution. A huge thank you to all contributors! 🙏
40
+ Testing: Every change must pass the build tests. Run tests locally using the provided script to confirm that your changes do not break the build.
41
+
42
+
43
+ ### License
44
+
45
+ By contributing to `kernpy`, you agree that your contributions will be licensed under the terms specified in the LICENSE file at the root of this project.
46
+
47
+ Happy coding and thank you for contributing! 🚀