kernpy 1.0.1__tar.gz → 1.0.2__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 (295) hide show
  1. {kernpy-1.0.1 → kernpy-1.0.2}/PKG-INFO +11 -11
  2. {kernpy-1.0.1 → kernpy-1.0.2}/README.md +10 -10
  3. {kernpy-1.0.1 → kernpy-1.0.2}/docs/get-started/tutorial.md +8 -8
  4. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/exporter.py +2 -2
  5. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/tokenizers.py +1 -1
  6. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/io/public.py +17 -15
  7. {kernpy-1.0.1 → kernpy-1.0.2}/pyproject.toml +1 -1
  8. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_exporter.py +1 -1
  9. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_humdrum_importer.py +4 -4
  10. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_tokenizer.py +14 -14
  11. {kernpy-1.0.1 → kernpy-1.0.2}/.github/workflows/publish-pypi.yml +0 -0
  12. {kernpy-1.0.1 → kernpy-1.0.2}/.github/workflows/run-tests.yml +0 -0
  13. {kernpy-1.0.1 → kernpy-1.0.2}/.github/workflows/update-docs.yml +0 -0
  14. {kernpy-1.0.1 → kernpy-1.0.2}/.gitignore +0 -0
  15. {kernpy-1.0.1 → kernpy-1.0.2}/CONTRIBUTING.md +0 -0
  16. {kernpy-1.0.1 → kernpy-1.0.2}/License +0 -0
  17. {kernpy-1.0.1 → kernpy-1.0.2}/antlr-4.13.1-complete.jar +0 -0
  18. {kernpy-1.0.1 → kernpy-1.0.2}/antlr4.sh +0 -0
  19. {kernpy-1.0.1 → kernpy-1.0.2}/docs/about.md +0 -0
  20. {kernpy-1.0.1 → kernpy-1.0.2}/docs/assets/001.svg +0 -0
  21. {kernpy-1.0.1 → kernpy-1.0.2}/docs/assets/book.svg +0 -0
  22. {kernpy-1.0.1 → kernpy-1.0.2}/docs/assets/learn.svg +0 -0
  23. {kernpy-1.0.1 → kernpy-1.0.2}/docs/assets/meeting.svg +0 -0
  24. {kernpy-1.0.1 → kernpy-1.0.2}/docs/assets/running.svg +0 -0
  25. {kernpy-1.0.1 → kernpy-1.0.2}/docs/css/extra.css +0 -0
  26. {kernpy-1.0.1 → kernpy-1.0.2}/docs/docs_requirements.txt +0 -0
  27. {kernpy-1.0.1 → kernpy-1.0.2}/docs/get-started.md +0 -0
  28. {kernpy-1.0.1 → kernpy-1.0.2}/docs/how-to-guides.md +0 -0
  29. {kernpy-1.0.1 → kernpy-1.0.2}/docs/index.md +0 -0
  30. {kernpy-1.0.1 → kernpy-1.0.2}/docs/overrides/partials/footer.html +0 -0
  31. {kernpy-1.0.1 → kernpy-1.0.2}/docs/reference.md +0 -0
  32. {kernpy-1.0.1 → kernpy-1.0.2}/docs/requirements.txt +0 -0
  33. {kernpy-1.0.1 → kernpy-1.0.2}/gen/kernLexer.interp +0 -0
  34. {kernpy-1.0.1 → kernpy-1.0.2}/gen/kernLexer.java +0 -0
  35. {kernpy-1.0.1 → kernpy-1.0.2}/gen/kernLexer.tokens +0 -0
  36. {kernpy-1.0.1 → kernpy-1.0.2}/kern/kernSpineLexer.g4 +0 -0
  37. {kernpy-1.0.1 → kernpy-1.0.2}/kern/kernSpineLexer.tokens +0 -0
  38. {kernpy-1.0.1 → kernpy-1.0.2}/kern/kernSpineParser.g4 +0 -0
  39. {kernpy-1.0.1 → kernpy-1.0.2}/kern/kernSpineParser.tokens +0 -0
  40. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/__init__.py +0 -0
  41. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/__main__.py +0 -0
  42. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/__init__.py +0 -0
  43. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/_io.py +0 -0
  44. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/base_antlr_importer.py +0 -0
  45. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/base_antlr_spine_parser_listener.py +0 -0
  46. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/basic_spine_importer.py +0 -0
  47. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/document.py +0 -0
  48. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/dyn_importer.py +0 -0
  49. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/dynam_spine_importer.py +0 -0
  50. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/error_listener.py +0 -0
  51. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/fing_spine_importer.py +0 -0
  52. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineLexer.interp +0 -0
  53. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineLexer.py +0 -0
  54. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineLexer.tokens +0 -0
  55. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineParser.interp +0 -0
  56. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineParser.py +0 -0
  57. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineParser.tokens +0 -0
  58. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineParserListener.py +0 -0
  59. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generated/kernSpineParserVisitor.py +0 -0
  60. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/generic.py +0 -0
  61. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/gkern.py +0 -0
  62. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/graphviz_exporter.py +0 -0
  63. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/harm_spine_importer.py +0 -0
  64. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/import_humdrum_old.py +0 -0
  65. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/importer.py +0 -0
  66. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/importer_factory.py +0 -0
  67. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/kern_spine_importer.py +0 -0
  68. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/mens_spine_importer.py +0 -0
  69. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/mhxm_spine_importer.py +0 -0
  70. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/pitch_models.py +0 -0
  71. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/root_spine_importer.py +0 -0
  72. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/spine_importer.py +0 -0
  73. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/text_spine_importer.py +0 -0
  74. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/tokens.py +0 -0
  75. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/core/transposer.py +0 -0
  76. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/io/__init__.py +0 -0
  77. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/polish_scores/__init__.py +0 -0
  78. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/polish_scores/download_polish_dataset.py +0 -0
  79. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/polish_scores/iiif.py +0 -0
  80. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/test_grammar.sh +0 -0
  81. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/util/__init__.py +0 -0
  82. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/util/helpers.py +0 -0
  83. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/util/store_cache.py +0 -0
  84. {kernpy-1.0.1 → kernpy-1.0.2}/kernpy/visualize_analysis.sh +0 -0
  85. {kernpy-1.0.1 → kernpy-1.0.2}/legacy-parsers-not-used/kernLexer.g4 +0 -0
  86. {kernpy-1.0.1 → kernpy-1.0.2}/legacy-parsers-not-used/kernParser.g4 +0 -0
  87. {kernpy-1.0.1 → kernpy-1.0.2}/mkdocs.yml +0 -0
  88. {kernpy-1.0.1 → kernpy-1.0.2}/requirements.txt +0 -0
  89. {kernpy-1.0.1 → kernpy-1.0.2}/test/__init__.py +0 -0
  90. {kernpy-1.0.1 → kernpy-1.0.2}/test/pytest.ini +0 -0
  91. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/all.krn +0 -0
  92. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/all_less_decorators.krn +0 -0
  93. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/all_less_durations.krn +0 -0
  94. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/all_less_note_rest.krn +0 -0
  95. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/all_less_pitches.krn +0 -0
  96. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/concerto-piano-12-allegro_with_all.krn +0 -0
  97. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/concerto-piano-12-allegro_without_barlines.krn +0 -0
  98. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/concerto-piano-12-allegro_without_harmony.krn +0 -0
  99. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/concerto-piano-12-allegro_without_only_signatures.krn +0 -0
  100. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/empty.krn +0 -0
  101. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/only_barlines.krn +0 -0
  102. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/only_decorators.krn +0 -0
  103. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/only_durations.krn +0 -0
  104. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/categories/only_pitches.krn +0 -0
  105. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_0.krn +0 -0
  106. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_0_merged.krn +0 -0
  107. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_1.krn +0 -0
  108. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_10.krn +0 -0
  109. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_10_merged.krn +0 -0
  110. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_11.krn +0 -0
  111. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_11_merged.krn +0 -0
  112. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_1_merged.krn +0 -0
  113. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_2.krn +0 -0
  114. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_2_merged.krn +0 -0
  115. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_3.krn +0 -0
  116. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_3_merged.krn +0 -0
  117. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_4.krn +0 -0
  118. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_4_merged.krn +0 -0
  119. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_5.krn +0 -0
  120. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_5_merged.krn +0 -0
  121. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_6.krn +0 -0
  122. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_7.krn +0 -0
  123. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_7_merged.krn +0 -0
  124. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_8.krn +0 -0
  125. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_8_merged.krn +0 -0
  126. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_9.krn +0 -0
  127. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/concat/0_9_merged.krn +0 -0
  128. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/input/sub/chor001.krn +0 -0
  129. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/input/sub/chor002.krn +0 -0
  130. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-1-to-3.krn +0 -0
  131. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-10-to-12.krn +0 -0
  132. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-11-to-13.krn +0 -0
  133. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-12-to-14.krn +0 -0
  134. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-13-to-15.krn +0 -0
  135. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-14-to-16.krn +0 -0
  136. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-15-to-17.krn +0 -0
  137. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-16-to-18.krn +0 -0
  138. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-17-to-19.krn +0 -0
  139. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-18-to-20.krn +0 -0
  140. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-19-to-21.krn +0 -0
  141. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-2-to-4.krn +0 -0
  142. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-20-to-22.krn +0 -0
  143. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-21-to-23.krn +0 -0
  144. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-22-to-24.krn +0 -0
  145. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-3-to-5.krn +0 -0
  146. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-4-to-6.krn +0 -0
  147. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-5-to-7.krn +0 -0
  148. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-6-to-8.krn +0 -0
  149. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-7-to-9.krn +0 -0
  150. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-8-to-10.krn +0 -0
  151. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor001/from-9-to-11.krn +0 -0
  152. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor002/from-1-to-5.krn +0 -0
  153. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor002/from-2-to-6.krn +0 -0
  154. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor002/from-3-to-7.krn +0 -0
  155. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor002/from-4-to-8.krn +0 -0
  156. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/fragments/output/chor002/from-5-to-9.krn +0 -0
  157. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/grandstaff/5901766-m24-to-m28.ekrn +0 -0
  158. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/grandstaff/5901766.krn +0 -0
  159. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/hierarchy/tree.txt +0 -0
  160. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/kern-scores/beethoven_sonata_12_4.krn +0 -0
  161. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet.ekrn +0 -0
  162. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet.krn +0 -0
  163. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet_longer.krn +0 -0
  164. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet_longer_m2-m4.ekrn +0 -0
  165. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet_longer_m2-m4.krn +0 -0
  166. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet_longer_m3-m3.krn +0 -0
  167. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/base_tuplet_longer_plus_octave.krn +0 -0
  168. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001-all_tokens.txt +0 -0
  169. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001-m1-to-m3.ekrn +0 -0
  170. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001-metadata-generic.txt +0 -0
  171. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001-unique_tokens.txt +0 -0
  172. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001-unique_tokens_with_category.txt +0 -0
  173. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001-unique_tokens_without_measure_numbers.txt +0 -0
  174. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001.ekrn +0 -0
  175. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor001.krn +0 -0
  176. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor009.krn +0 -0
  177. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/chor048.krn +0 -0
  178. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-1.ekrn +0 -0
  179. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-1.krn +0 -0
  180. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-2.ekrn +0 -0
  181. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-3.ekrn +0 -0
  182. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-3.krn +0 -0
  183. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-4.ekrn +0 -0
  184. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide02-example2-4.krn +0 -0
  185. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide06-example6-1.ekrn +0 -0
  186. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide06-example6-1.krn +0 -0
  187. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide06-example6-2.ekrn +0 -0
  188. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/guide06-example6-2.krn +0 -0
  189. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/kern2ekern.ekrn +0 -0
  190. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/kern2ekern.krn +0 -0
  191. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/spines_lexer.ekrn +0 -0
  192. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/spines_lexer.krn +0 -0
  193. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/spline_split.krn +0 -0
  194. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/spline_split_piston070.ekrn +0 -0
  195. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/legacy/spline_split_piston070.krn +0 -0
  196. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/metadata/frequency.json +0 -0
  197. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/mozart/concerto-piano-12-allegro-left-hand.krn +0 -0
  198. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/mozart/concerto-piano-12-allegro-right-hand-and-dyn.krn +0 -0
  199. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/mozart/concerto-piano-12-allegro-right-hand.krn +0 -0
  200. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/mozart/concerto-piano-12-allegro.krn +0 -0
  201. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/mozart/divertimento-quartet.krn +0 -0
  202. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pages/10.ekrn +0 -0
  203. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pages/10.jpg +0 -0
  204. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pages/11.ekrn +0 -0
  205. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pages/11.jpg +0 -0
  206. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pages/9.ekrn +0 -0
  207. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pages/9.jpg +0 -0
  208. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m16.ekrn +0 -0
  209. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m2.ekrn +0 -0
  210. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m3.ekrn +0 -0
  211. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante.krn +0 -0
  212. {kernpy-1.0.1 → kernpy-1.0.2}/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 +0 -0
  213. {kernpy-1.0.1 → kernpy-1.0.2}/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 +0 -0
  214. {kernpy-1.0.1 → kernpy-1.0.2}/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 +0 -0
  215. {kernpy-1.0.1 → kernpy-1.0.2}/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 +0 -0
  216. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/any_header.krn +0 -0
  217. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/bach-brandenburg-bwv1050a.krn +0 -0
  218. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/bach-chorale-chor205.krn +0 -0
  219. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/corelli-op01n12d.krn +0 -0
  220. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/harmonized-song-erk052.krn +0 -0
  221. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/haydn-quartet-op54n2-01.krn +0 -0
  222. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/haydn-sonate-15_1-original.krn +0 -0
  223. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/haydn-sonate-15_1-output.krn +0 -0
  224. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/jazzmus_with_mxhm.krn +0 -0
  225. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/permutations_of_2.bb-_ .krn +0 -0
  226. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/piano-beethoven-sonata21-3.krn +0 -0
  227. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/piano-chopin-prelude28-17.krn +0 -0
  228. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/piano-hummel-prelude67-15.krn +0 -0
  229. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/piano-joplin-bethena.krn +0 -0
  230. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/piano-mozart-sonata07-3.krn +0 -0
  231. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/piano-scarlatti-L523K205.krn +0 -0
  232. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/quartet-beethoven-quartet13-6.krn +0 -0
  233. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/quartet-mozart-k590-04.krn +0 -0
  234. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/score_with_dividing_one_spine.krn +0 -0
  235. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/score_with_dividing_one_spine_m9-m13.krn +0 -0
  236. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/score_with_dividing_two_spines.krn +0 -0
  237. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/score_with_dividing_two_spines_m49-m56.krn +0 -0
  238. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/unaccompanied-songs-nova073.krn +0 -0
  239. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/unexpected_header.krn +0 -0
  240. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/wrong_header.krn +0 -0
  241. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/wrong_number_of_columns.krn +0 -0
  242. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/samples/wrong_number_of_columns_fixed.krn +0 -0
  243. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/1.krn +0 -0
  244. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/2-m2-to-m2.ekrn +0 -0
  245. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/2.krn +0 -0
  246. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/3.krn +0 -0
  247. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/4.krn +0 -0
  248. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/5.krn +0 -0
  249. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/concerto-piano-12-allegro_only_kern_and_harm.krn +0 -0
  250. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/non_stacked_ends.krn +0 -0
  251. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/non_stacked_ends_2.krn +0 -0
  252. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/spines-from-piano-joplin-bethena-start.krn +0 -0
  253. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/spines/spines-piano-hummel-prelude67-15.krn +0 -0
  254. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/accidentals.krn +0 -0
  255. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/accidentals_alteration_display.krn +0 -0
  256. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/articulations.krn +0 -0
  257. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/auto_beaming.krn +0 -0
  258. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/bars.krn +0 -0
  259. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/beaming.krn +0 -0
  260. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/chords.krn +0 -0
  261. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/clefs.krn +0 -0
  262. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/headers.krn +0 -0
  263. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/key.krn +0 -0
  264. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/key_designation.krn +0 -0
  265. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/mensurations.krn +0 -0
  266. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/minimal.krn +0 -0
  267. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/minimal_incorrect.krn +0 -0
  268. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/modal.krn +0 -0
  269. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/octaves.krn +0 -0
  270. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/ornaments.krn +0 -0
  271. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/rests.krn +0 -0
  272. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/rhythm.krn +0 -0
  273. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/slurs.krn +0 -0
  274. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/ties.krn +0 -0
  275. {kernpy-1.0.1 → kernpy-1.0.2}/test/resource_dir/unit/time.krn +0 -0
  276. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_deprecated.py +0 -0
  277. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_document.py +0 -0
  278. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_download_polish_scores.py +0 -0
  279. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_export_options.py +0 -0
  280. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_generic.py +0 -0
  281. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_gkern.py +0 -0
  282. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_importer.py +0 -0
  283. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_main_cli_api.py +0 -0
  284. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_root_spine_root.py +0 -0
  285. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_imoprter_dynam.py +0 -0
  286. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_basic.py +0 -0
  287. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_dyn.py +0 -0
  288. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_fing.py +0 -0
  289. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_harm.py +0 -0
  290. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_kern.py +0 -0
  291. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_mxhm.py +0 -0
  292. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_spine_importer_text.py +0 -0
  293. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_token.py +0 -0
  294. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_transposer.py +0 -0
  295. {kernpy-1.0.1 → kernpy-1.0.2}/test/test_util_store_cache.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kernpy
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: Python Humdrum **kern and **mens utilities
5
5
  Project-URL: Homepage, https://github.com/OMR-PRAIG-UA-ES/kernpy
6
6
  Project-URL: Documentation, https://github.com/OMR-PRAIG-UA-ES/kernpy#readme
@@ -174,32 +174,32 @@ kp.dump(document, "newfile_custom.krn",
174
174
  print(kp.BEKERN_CATEGORIES)
175
175
  ```
176
176
 
177
- - Use `tokenizer` to select how the categories are split. By default, the `normalizedKern` tokenizer is used.
177
+ - Use `encoding` to select how the categories are split. By default, the `normalizedKern` encoding is used.
178
178
 
179
179
  ```python
180
180
  import kernpy as kp
181
181
 
182
182
  kp.dump(document, "newfile_normalized.krn",
183
- tokenizer=kp.Encoding.normalizedKern) # Default tokenizer
183
+ encoding=kp.Encoding.normalizedKern) # Default encoding
184
184
  ```
185
- Select the proper Humdrum **kern tokenizer:
185
+ Select the proper Humdrum **kern encoding:
186
186
 
187
- `kernpy` provides different tokenizers to export the content each symbol in different formats.
187
+ `kernpy` provides different encodings to export the content each symbol in different formats.
188
188
 
189
- | Encoding | Tokenized | Description |
189
+ | Encoding | Output | Description |
190
190
  |----------|--------------|----------------------------------------|
191
191
  | kern | 2.bb-_L | Traditional Humdrum **kern encoding |
192
192
  | ekern | 2@.@bb@-·_·L | Extended Humdrum **kern encoding |
193
193
 
194
- Use the `Encoding` enum class to select the tokenizer:
194
+ Use the `Encoding` enum class to select the encoding:
195
195
 
196
196
  ```python
197
197
  import kernpy as kp
198
198
 
199
199
  doc, _ = kp.load('resource_dir/legacy/chor048.krn')
200
200
 
201
- kern_content = kp.dumps(doc, tokenizer=kp.Encoding.normalizedKern)
202
- ekern_content = kp.dumps(doc, tokenizer=kp.Encoding.eKern)
201
+ kern_content = kp.dumps(doc, encoding=kp.Encoding.normalizedKern)
202
+ ekern_content = kp.dumps(doc, encoding=kp.Encoding.eKern)
203
203
  ```
204
204
 
205
205
  - Use `from_measure` and `to_measure` to select the measures to export. By default, all the measures are exported.
@@ -236,7 +236,7 @@ kp.dump(document, "newfile.krn",
236
236
  spine_types=['**kern'], # Export only the **kern spines
237
237
  include=kp.BEKERN_CATEGORIES, # Token categories to include
238
238
  exclude={kp.TokenCategory.PITCH}, # Token categories to exclude
239
- tokenizer=kp.Encoding.eKern, # Kern encoding
239
+ encoding=kp.Encoding.eKern, # Kern encoding
240
240
  from_measure=1, # First from measure 1
241
241
  to_measure=10, # Last measure exported
242
242
  spine_ids=[0, 1], # Export only the first and the second spine
@@ -339,7 +339,7 @@ for page_label, bounding_box_measure in doc.page_bounding_boxes.items():
339
339
  kp.dump(doc, f"foo_{page_label}.ekrn",
340
340
  spine_types=['**kern'],
341
341
  token_categories=kp.BEKERN_CATEGORIES,
342
- tokenizer=kp.Encoding.eKern,
342
+ encoding=kp.Encoding.eKern,
343
343
  from_measure=bounding_box_measure.from_measure,
344
344
  to_measure=bounding_box_measure.to_measure - 1 # TODO: Check bounds
345
345
  )
@@ -155,32 +155,32 @@ kp.dump(document, "newfile_custom.krn",
155
155
  print(kp.BEKERN_CATEGORIES)
156
156
  ```
157
157
 
158
- - Use `tokenizer` to select how the categories are split. By default, the `normalizedKern` tokenizer is used.
158
+ - Use `encoding` to select how the categories are split. By default, the `normalizedKern` encoding is used.
159
159
 
160
160
  ```python
161
161
  import kernpy as kp
162
162
 
163
163
  kp.dump(document, "newfile_normalized.krn",
164
- tokenizer=kp.Encoding.normalizedKern) # Default tokenizer
164
+ encoding=kp.Encoding.normalizedKern) # Default encoding
165
165
  ```
166
- Select the proper Humdrum **kern tokenizer:
166
+ Select the proper Humdrum **kern encoding:
167
167
 
168
- `kernpy` provides different tokenizers to export the content each symbol in different formats.
168
+ `kernpy` provides different encodings to export the content each symbol in different formats.
169
169
 
170
- | Encoding | Tokenized | Description |
170
+ | Encoding | Output | Description |
171
171
  |----------|--------------|----------------------------------------|
172
172
  | kern | 2.bb-_L | Traditional Humdrum **kern encoding |
173
173
  | ekern | 2@.@bb@-·_·L | Extended Humdrum **kern encoding |
174
174
 
175
- Use the `Encoding` enum class to select the tokenizer:
175
+ Use the `Encoding` enum class to select the encoding:
176
176
 
177
177
  ```python
178
178
  import kernpy as kp
179
179
 
180
180
  doc, _ = kp.load('resource_dir/legacy/chor048.krn')
181
181
 
182
- kern_content = kp.dumps(doc, tokenizer=kp.Encoding.normalizedKern)
183
- ekern_content = kp.dumps(doc, tokenizer=kp.Encoding.eKern)
182
+ kern_content = kp.dumps(doc, encoding=kp.Encoding.normalizedKern)
183
+ ekern_content = kp.dumps(doc, encoding=kp.Encoding.eKern)
184
184
  ```
185
185
 
186
186
  - Use `from_measure` and `to_measure` to select the measures to export. By default, all the measures are exported.
@@ -217,7 +217,7 @@ kp.dump(document, "newfile.krn",
217
217
  spine_types=['**kern'], # Export only the **kern spines
218
218
  include=kp.BEKERN_CATEGORIES, # Token categories to include
219
219
  exclude={kp.TokenCategory.PITCH}, # Token categories to exclude
220
- tokenizer=kp.Encoding.eKern, # Kern encoding
220
+ encoding=kp.Encoding.eKern, # Kern encoding
221
221
  from_measure=1, # First from measure 1
222
222
  to_measure=10, # Last measure exported
223
223
  spine_ids=[0, 1], # Export only the first and the second spine
@@ -320,7 +320,7 @@ for page_label, bounding_box_measure in doc.page_bounding_boxes.items():
320
320
  kp.dump(doc, f"foo_{page_label}.ekrn",
321
321
  spine_types=['**kern'],
322
322
  token_categories=kp.BEKERN_CATEGORIES,
323
- tokenizer=kp.Encoding.eKern,
323
+ encoding=kp.Encoding.eKern,
324
324
  from_measure=bounding_box_measure.from_measure,
325
325
  to_measure=bounding_box_measure.to_measure - 1 # TODO: Check bounds
326
326
  )
@@ -117,15 +117,15 @@ kp.dump(document, "newfile_custom.krn",
117
117
  exclude={kp.TokenCategory.PITCH})
118
118
  ```
119
119
 
120
- - Use `tokenizer` to select how the categories are split. By default, the `normalizedKern` tokenizer is used.
120
+ - Use `encoding` to select how the categories are split. By default, the `normalizedKern` encoding is used.
121
121
 
122
122
  ```python
123
123
  import kernpy as kp
124
124
 
125
125
  kp.dump(document, "newfile_normalized.krn",
126
- tokenizer=kp.Encoding.normalizedKern) # Default tokenizer
126
+ encoding=kp.Encoding.normalizedKern) # Default encoding
127
127
  ```
128
- Select the proper Humdrum **kern tokenizer:
128
+ Select the proper Humdrum **kern encoding:
129
129
 
130
130
  `kernpy` provides different tokenizers to export the content each symbol in different formats.
131
131
 
@@ -134,15 +134,15 @@ Select the proper Humdrum **kern tokenizer:
134
134
  | kern | 2.bb-_L | Traditional Humdrum **kern encoding |
135
135
  | ekern | 2@.@bb@-·_·L | Extended Humdrum **kern encoding |
136
136
 
137
- Use the `Encoding` enum class to select the tokenizer:
137
+ Use the `Encoding` enum class to select the encoding:
138
138
 
139
139
  ```python
140
140
  import kernpy as kp
141
141
 
142
142
  doc, _ = kp.load('resource_dir/legacy/chor048.krn')
143
143
 
144
- kern_content = kp.dumps(doc, tokenizer=kp.Encoding.normalizedKern)
145
- ekern_content = kp.dumps(doc, tokenizer=kp.Encoding.eKern)
144
+ kern_content = kp.dumps(doc, encoding=kp.Encoding.normalizedKern)
145
+ ekern_content = kp.dumps(doc, encoding=kp.Encoding.eKern)
146
146
  ```
147
147
 
148
148
  - Use `from_measure` and `to_measure` to select the measures to export. By default, all the measures are exported.
@@ -179,7 +179,7 @@ kp.dump(document, "newfile.krn",
179
179
  spine_types=['**kern'], # Export only the **kern spines
180
180
  include=kp.BEKERN_CATEGORIES, # Token categories to include
181
181
  exclude={kp.TokenCategory.PITCH}, # Token categories to exclude
182
- tokenizer=kp.Encoding.eKern, # Kern encoding
182
+ encoding=kp.Encoding.eKern, # Kern encoding
183
183
  from_measure=1, # First from measure 1
184
184
  to_measure=10, # Last measure exported
185
185
  spine_ids=[0, 1], # Export only the first and the second spine
@@ -282,7 +282,7 @@ for page_label, bounding_box_measure in doc.page_bounding_boxes.items():
282
282
  kp.dump(doc, f"foo_{page_label}.ekrn",
283
283
  spine_types=['**kern'],
284
284
  token_categories=kp.BEKERN_CATEGORIES,
285
- tokenizer=kp.Encoding.eKern,
285
+ encoding=kp.Encoding.eKern,
286
286
  from_measure=bounding_box_measure.from_measure,
287
287
  to_measure=bounding_box_measure.to_measure - 1 # TODO: Check bounds
288
288
  )
@@ -153,7 +153,7 @@ class HeaderTokenGenerator:
153
153
  """
154
154
  HeaderTokenGenerator class.
155
155
 
156
- This class is used to translate the HeaderTokens to the specific tokenizer format.
156
+ This class is used to translate the HeaderTokens to the specific encoding format.
157
157
  """
158
158
  @classmethod
159
159
  def new(cls, *, token: HeaderToken, type: Encoding):
@@ -162,7 +162,7 @@ class HeaderTokenGenerator:
162
162
 
163
163
  Args:
164
164
  token (HeaderToken): The HeaderToken to be translated.
165
- type (Encoding): The tokenizer to be used.
165
+ type (Encoding): The encoding to be used.
166
166
 
167
167
  Examples:
168
168
  >>> header = HeaderToken('**kern', 0)
@@ -18,7 +18,7 @@ class Encoding(Enum): # TODO: Eventually, polymorphism will be used to export d
18
18
  >>> doc, _ = kp.load('path/to/file.krn')
19
19
  >>>
20
20
  >>> # Save the file using the specified encoding
21
- >>> exported_content = kp.dumps(tokenizer=kp.Encoding.normalizedKern)
21
+ >>> exported_content = kp.dumps(encoding=kp.Encoding.normalizedKern)
22
22
  """
23
23
  eKern = 'ekern'
24
24
  normalizedKern = 'kern'
@@ -12,7 +12,9 @@ from kernpy import Encoding
12
12
  from kernpy.core import (
13
13
  Document, Importer, Exporter, ExportOptions, GraphvizExporter,
14
14
  generic,
15
- TokenCategoryHierarchyMapper)
15
+ TokenCategoryHierarchyMapper,
16
+ TokenCategory,
17
+ )
16
18
 
17
19
 
18
20
  def load(fp: Union[str, Path], *, raise_on_errors: Optional[bool] = False, **kwargs) -> (Document, List[str]):
@@ -84,13 +86,13 @@ def loads(s, *, raise_on_errors: Optional[bool] = False, **kwargs) -> (Document,
84
86
 
85
87
 
86
88
  def dump(document: Document, fp: Union[str, Path], *,
87
- spine_types: [] = None,
88
- include: [] = None,
89
- exclude: [] = None,
89
+ spine_types: [str] = None,
90
+ include: [TokenCategory] = None,
91
+ exclude: [TokenCategory] = None,
90
92
  from_measure: int = None,
91
93
  to_measure: int = None,
92
- tokenizer: Encoding = None,
93
- instruments: [] = None,
94
+ encoding: Encoding = None,
95
+ instruments: [str] = None,
94
96
  show_measure_numbers: bool = None,
95
97
  spine_ids: [int] = None
96
98
  ) -> None:
@@ -104,7 +106,7 @@ def dump(document: Document, fp: Union[str, Path], *,
104
106
  exclude (Iterable): The token categories to exclude from the exported file. When None, no token categories will be excluded.
105
107
  from_measure (int): The measure to start exporting. When None, the exporter will start from the beginning of the file. The first measure is 1
106
108
  to_measure (int): The measure to end exporting. When None, the exporter will end at the end of the file.
107
- tokenizer (Encoding): The type of the **kern file to export.
109
+ encoding (Encoding): The type of the **kern file to export.
108
110
  instruments (Iterable): The instruments to export. If None, all the instruments will be exported.
109
111
  show_measure_numbers (Bool): Show the measure numbers in the exported file.
110
112
  spine_ids (Iterable): The ids of the spines to export. When None, all the spines will be exported. \
@@ -130,7 +132,7 @@ def dump(document: Document, fp: Union[str, Path], *,
130
132
  exclude=exclude,
131
133
  from_measure=from_measure,
132
134
  to_measure=to_measure,
133
- kern_type=tokenizer,
135
+ kern_type=encoding,
134
136
  instruments=instruments,
135
137
  show_measure_numbers=show_measure_numbers,
136
138
  spine_ids=spine_ids
@@ -144,13 +146,13 @@ def dump(document: Document, fp: Union[str, Path], *,
144
146
 
145
147
 
146
148
  def dumps(document: Document, *,
147
- spine_types: [] = None,
148
- include: [] = None,
149
- exclude: [] = None,
149
+ spine_types: [str] = None,
150
+ include: [TokenCategory] = None,
151
+ exclude: [TokenCategory] = None,
150
152
  from_measure: int = None,
151
153
  to_measure: int = None,
152
- tokenizer: Encoding = None,
153
- instruments: [] = None,
154
+ encoding: Encoding = None,
155
+ instruments: [str] = None,
154
156
  show_measure_numbers: bool = None,
155
157
  spine_ids: [int] = None
156
158
  ) -> str:
@@ -164,7 +166,7 @@ def dumps(document: Document, *,
164
166
  exclude (Iterable): The token categories to exclude from the exported file. When None, no token categories will be excluded.
165
167
  from_measure (int): The measure to start exporting. When None, the exporter will start from the beginning of the file. The first measure is 1
166
168
  to_measure (int): The measure to end exporting. When None, the exporter will end at the end of the file.
167
- tokenizer (Encoding): The type of the **kern file to export.
169
+ encoding (Encoding): The type of the **kern file to export.
168
170
  instruments (Iterable): The instruments to export. If None, all the instruments will be exported.
169
171
  show_measure_numbers (Bool): Show the measure numbers in the exported file.
170
172
  spine_ids (Iterable): The ids of the spines to export. When None, all the spines will be exported. \
@@ -189,7 +191,7 @@ def dumps(document: Document, *,
189
191
  exclude=exclude,
190
192
  from_measure=from_measure,
191
193
  to_measure=to_measure,
192
- kern_type=tokenizer,
194
+ kern_type=encoding,
193
195
  instruments=instruments,
194
196
  show_measure_numbers=show_measure_numbers,
195
197
  spine_ids=spine_ids
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "kernpy"
7
- version = "1.0.1"
7
+ version = "1.0.2"
8
8
  authors = [
9
9
  { name = "David Rizo Valero", email = "drizo@ua.es"},
10
10
  { name = "Joan Cerveto Serrano", email = "joan.cerveto@ua.es"}
@@ -87,7 +87,7 @@ class ExporterTestCase(unittest.TestCase):
87
87
  expected_content = f.read()
88
88
 
89
89
  doc, _ = kp.read(input_path)
90
- real_content = kp.dumps(doc, tokenizer=kp.Encoding.eKern, include=kp.BEKERN_CATEGORIES)
90
+ real_content = kp.dumps(doc, encoding=kp.Encoding.eKern, include=kp.BEKERN_CATEGORIES)
91
91
 
92
92
  self.assertEqual(expected_content, real_content,
93
93
  f"File content mismatch: \nExpected:\n{expected_content}\n{40 * '='}\nReal\n{real_content}")
@@ -44,7 +44,7 @@ class ImporterTestCase(unittest.TestCase):
44
44
  from_measure=from_measure,
45
45
  to_measure=to_measure,
46
46
  include=kp.BEKERN_CATEGORIES,
47
- tokenizer=kp.Encoding.eKern)
47
+ encoding=kp.Encoding.eKern)
48
48
 
49
49
  if exported_ekern != expected_content:
50
50
  logging.info('---- Expected content ----')
@@ -346,7 +346,7 @@ class ImporterTestCase(unittest.TestCase):
346
346
  kp.store_graph(doc, '/tmp/x.dot')
347
347
  exported_real = kp.dumps(doc,
348
348
  spine_types=['**kern'],
349
- tokenizer=kp.Encoding.normalizedKern,
349
+ encoding=kp.Encoding.normalizedKern,
350
350
  from_measure=9,
351
351
  to_measure=13)
352
352
 
@@ -381,7 +381,7 @@ class ImporterTestCase(unittest.TestCase):
381
381
  output_kern = kp.dumps(document,
382
382
  spine_types=['**kern'],
383
383
  include=kp.BEKERN_CATEGORIES,
384
- tokenizer=kp.Encoding.eKern, )
384
+ encoding=kp.Encoding.eKern, )
385
385
  expected_ekern = "**ekern\n4@c\n4@d\n4@e\n4@f\n*-\n"
386
386
  self.assertEqual(expected_ekern, output_kern)
387
387
 
@@ -710,7 +710,7 @@ class ImporterTestCase(unittest.TestCase):
710
710
  doc, err = kp.load('resource_dir/legacy/chor048.krn')
711
711
 
712
712
  content = kp.dumps(doc, spine_types=['**kern', '**root', '**harm'],
713
- tokenizer=kp.Encoding.eKern)
713
+ encoding=kp.Encoding.eKern)
714
714
 
715
715
  doc_2, _ = kp.loads(content) # raise error if the content is not valid
716
716
 
@@ -20,40 +20,40 @@ class TestTokenizer(unittest.TestCase):
20
20
 
21
21
 
22
22
  def test_ekern_tokenizer_1(self):
23
- tokenizer = kp.EkernTokenizer(token_categories=self.default_categories)
24
- token_str = tokenizer.tokenize(self.token_1)
23
+ encoding = kp.EkernTokenizer(token_categories=self.default_categories)
24
+ token_str = encoding.tokenize(self.token_1)
25
25
  self.assertEqual('2@.@bb@-·_·L', token_str)
26
26
  self.token_1.export.assert_called()
27
27
 
28
28
  def test_kern_tokenizer_1(self):
29
- tokenizer = kp.KernTokenizer(token_categories=self.default_categories)
30
- token_str = tokenizer.tokenize(self.token_1)
29
+ encoding = kp.KernTokenizer(token_categories=self.default_categories)
30
+ token_str = encoding.tokenize(self.token_1)
31
31
  self.assertEqual('2.bb-_L', token_str)
32
32
  self.token_1.export.assert_called()
33
33
 
34
34
  def test_bkern_tokenizer_1(self):
35
- tokenizer = kp.BkernTokenizer(token_categories=self.default_categories)
36
- token_str = tokenizer.tokenize(self.token_1)
35
+ encoding = kp.BkernTokenizer(token_categories=self.default_categories)
36
+ token_str = encoding.tokenize(self.token_1)
37
37
  self.assertEqual('2.bb-', token_str)
38
38
  self.token_1.export.assert_called()
39
39
 
40
40
  def test_bekern_tokenizer_1(self):
41
- tokenizer = kp.BekernTokenizer(token_categories=self.default_categories)
42
- token_str = tokenizer.tokenize(self.token_1)
41
+ encoding = kp.BekernTokenizer(token_categories=self.default_categories)
42
+ token_str = encoding.tokenize(self.token_1)
43
43
  self.assertEqual('2@.@bb@-', token_str)
44
44
  self.token_1.export.assert_called()
45
45
 
46
46
  def test_tokenizer_factory_kern(self):
47
- tokenizer = kp.TokenizerFactory.create(kp.Encoding.normalizedKern.value, token_categories=self.default_categories)
48
- self.assertIsInstance(tokenizer, kp.KernTokenizer)
47
+ encoding = kp.TokenizerFactory.create(kp.Encoding.normalizedKern.value, token_categories=self.default_categories)
48
+ self.assertIsInstance(encoding, kp.KernTokenizer)
49
49
 
50
50
  def test_tokenizer_factory_ekern(self):
51
- tokenizer = kp.TokenizerFactory.create(kp.Encoding.eKern.value, token_categories=self.default_categories)
52
- self.assertIsInstance(tokenizer, kp.EkernTokenizer)
51
+ encoding = kp.TokenizerFactory.create(kp.Encoding.eKern.value, token_categories=self.default_categories)
52
+ self.assertIsInstance(encoding, kp.EkernTokenizer)
53
53
 
54
54
  def test_tokenizer_factory_bkern(self):
55
- tokenizer = kp.TokenizerFactory.create(kp.Encoding.bKern.value, token_categories=self.default_categories)
56
- self.assertIsInstance(tokenizer, kp.BekernTokenizer)
55
+ encoding = kp.TokenizerFactory.create(kp.Encoding.bKern.value, token_categories=self.default_categories)
56
+ self.assertIsInstance(encoding, kp.BekernTokenizer)
57
57
 
58
58
  def test_tokenizer_factory_raise_error_if_none(self):
59
59
  with self.assertRaises(ValueError):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes